On Monday, September 12, 2011 09:49:22 AM Neil Bothwick wrote: > On Mon, 12 Sep 2011 09:45:44 +0200, Joost Roeleveld wrote: > > As long as filesystem-support for /usr is in the kernel, why can't > > "/usr" be mounted right after "/"? > > > > Eg. instead of worrying with an init*, why not edit the boot-scripts to > > have "/usr" mounted before udev and colleagues start? > > Because it is udev that creates the device entries needed to mount /usr - > and that doesn't even touch other cases, like /usr being on a software > block device, like LVM or dmcrypt.
Thanks Alex and Neil. I didn't think it through properly. Which is why I posted it here, rather then try to see how to get the scripts updated for it. > The problem here is that udev is trying to do too much. On the one hand > it handles the initial population of /dev/ and all that is needed to > mount the contents of fstab. On the other hand, it is trying to be an > all-encompassing device and hotplug manager. the latter function should > be started relatively late in the boot sequence, the former as soon as > possible. > > I'd like to know why these functions cannot be separated, run the command > to populate /dev early on, then start the udev daemon after the > filesystems have been mounted. > > Some sort of early boot rules file would need to be used to handle things > like setting up symlinks for block devices to avoid breaking some users' > fstabs. Yes, which means "udev" would need to be split into: * devd (which controls the /dev-tree) * plugd (which handles all the "hotplug-events" where special things happen) The communication between the 2 could be done using a simple /dev/udev_pipe device. "devd" throws events onto the pipe and plugd handles these events. That would also make things easier to configure as the renaming and such is for "devd". But the commands to be executed can then be based on the actual name in /dev. Rather then on the kernel-name/id/..../whatever. Any thoughts on this? -- Joost PS. I'm throwing ideas here, hopefully we can come to a sane and logical option here