Re: [arch-projects] [udev][RFC][2/5] moving static nodes to udev-compat
On Sun, May 15, 2011 at 12:31 AM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
I was under the impression that some of these nodes are needed for udev to start working. At least, back in the day, I know that console, null, and zero needed to be created before udev started. If this is no longer true, then I see no issues with making them go away. Unless they're needed in early userspace before udev starts... but mkinitcpio could always create those nodes.
They used to be needed. However, with devtmpfs they are not. The essential ones (for early userspace) exist by default and the rest are created when udev is started. A quick test: delete /lib/udev/devices from your machine and notice that everything still works. A more thorough test: move /lib/udev/devices to /lib/udev/devcise.old (say) and reboot with init=/bin/bash (it would be best to do this with a self-compiled kernel that can boot without a initramfs to make sure nothing touches /dev at all). Now compare the contents of /dev with /lib/udev/devices.old. Cheers, Tom
On 05/14/2011 07:39 PM, Tom Gundersen wrote:
On Sun, May 15, 2011 at 12:31 AM, Aaron Griffin<aaronmgriffin@gmail.com> wrote:
I was under the impression that some of these nodes are needed for udev to start working. At least, back in the day, I know that console, null, and zero needed to be created before udev started. If this is no longer true, then I see no issues with making them go away. Unless they're needed in early userspace before udev starts... but mkinitcpio could always create those nodes. They used to be needed. However, with devtmpfs they are not. The essential ones (for early userspace) exist by default and the rest are created when udev is started.
A quick test: delete /lib/udev/devices from your machine and notice that everything still works.
A more thorough test: move /lib/udev/devices to /lib/udev/devcise.old (say) and reboot with init=/bin/bash (it would be best to do this with a self-compiled kernel that can boot without a initramfs to make sure nothing touches /dev at all). Now compare the contents of /dev with /lib/udev/devices.old.
Cheers,
Tom
At least loop0 should exists. Having /dev/loop0 make this command (mount pepito.img /mnt/pepito) works without loading before loop module. This is because loop.ko is autoloaded when something tries access to a loop device. -- Gerardo Exequiel Pozzi \cos^2\alpha + \sin^2\alpha = 1
On Sun, May 15, 2011 at 1:15 AM, Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
At least loop0 should exists. Having /dev/loop0 make this command (mount pepito.img /mnt/pepito) works without loading before loop module. This is because loop.ko is autoloaded when something tries access to a loop device.
You are right. I just rebooted to check, loop0 is the only node that we don't get for free. I therefore amend my suggestion to keep the loop module, but move everything else to udev-compat. FWIW: I also checked what others do (I picked fedora and opensuse for no particular reason) and found that fedora have the static loop nodes (and nothing else) and opensuse have no static nodes at all. Thanks for the feedback! Cheers, Tom
participants (2)
-
Gerardo Exequiel Pozzi
-
Tom Gundersen