[arch-dev-public] udev changes - and the comeback of a long lost feature

Thomas Bächler thomas at archlinux.org
Sat Mar 7 17:55:36 EST 2009

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 device:

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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://www.archlinux.org/pipermail/arch-dev-public/attachments/20090307/10641688/attachment.pgp>

More information about the arch-dev-public mailing list