[arch-dev-public] udev changes - and the comeback of a long lost feature
dpmcgee at gmail.com
Sun Mar 8 17:35:24 EDT 2009
On Sat, Mar 7, 2009 at 5:55 PM, Thomas Bächler <thomas at archlinux.org> wrote:
> tpowa did some work today updating udev to 139, cleaning up the rules and
> fixing some small bugs.
> With it comes the implementation of a recommendation of the udev team: We
> now have a directory /lib/udev/devices/ which contains a number of static
> devices nodes which are always present. A udev rule also makes sure that
> none of these devices is deleted even if udev normally would do so (the
> stock udev rule for that is broken, but I fixed it).
> This simplifies our rc.sysinit a bit:
> In that context, I thought of an old feature: "module autoloading" as Linux
> 2.4 understood it: Imagine you have a static /dev, and you try to open a
> 1) /dev/XYZ is a block/char device with major X and minor Y
> 2) the kernel looks it up, but doesn't find it
> 3) the kernel issues "modprobe block-major-X-Y" or "modprobe char-major-X-Y"
> 4) the kernel looks up the device again, it can now find it
> Note that step 1 requires that /dev/XYZ exists! This feature completely
> broke with the introduction of udev. This feature is obsolete for most
> devices, but there are those devices that are not bound to physical hardware
> - best examples here are tun and loop.
> I am going to add the loop and tun (any maybe fuse) devices to the static
> device list that we now support. That means that you can use loop mounts
> again without running "modprobe loop" manually, the module will be loaded as
> soon as you access /dev/loopX. Same goes for /dev/net/tun or /dev/fuse. This
> basically works with all modules that have a block-major-X-* or
> char-major-X-* alias, so if you think of any more modules that do this, we
> could add them too.
Nice, all these changes look good. Thanks for doing this.
More information about the arch-dev-public