Steve Crosby wrote: > On Mon, Jan 23, 2012 at 7:58 PM, Zachary Kotlarek <[email protected]> > wrote: >> On Jan 22, 2012, at 7:33 PM, Steve Crosby wrote: >> >>> 3. Populate /dev using busybox cutdown version of udev (mdev) >> >> Is there a benefit to mdev over just using tmpdevfs? >> >> I say that as a current user of mdev; I haven't yet tried a >> tmpdevfs initramfs device system. But if I'm understanding it >> correctly tmpdevfs should be sufficient for any use were an >> default-config mdev run would work, and requires less >> configuration/tools, less boot scripting, and the need to wait for >> a coldplug scan in the initramfs. > > I haven't yet reviewed devtmpfs, so didn't implement it in my initial > cut of scripts. From reading, it has several significant advantages, > including the ability to move the /dev mount to the new root and thus > not miss any events and thus not require udev to replay them in the > real bootscripts.
UGH. FWIW I really don't like this "feature".
It causes the booted-with-initramfs case to require different handling
from the booted-without-initramfs case, once the bootscripts are
running, and therefore requires changes to the bootscripts if you use an
initramfs.
Just bite the bullet and replay the events. The only way to avoid that
is to go through insane contortions with systemd and automatically
spawning /lib/udev/udevd when an event shows up, plus an atomic /dev
move, plus somehow convincing udevd to change its rootfs before you blow
away the contents of / in the initramfs as part of switching over to the
real root. (Which you want to do to avoid sucking up memory.) All
without losing an event? Bleh, just kill udevd in the initramfs, blow
away the contents of /, and rescan in the bootscripts; it's *far* less
fragile. :-)
> It is not however automatically mounted in an initramfs
> (deliberately), so still needs the mount line, but the kernel hotplug
> helper and scan can be eliminated. Will add to todo list ;)
Don't you still need udevd if you want to find the rootfs based on
config stored in /etc/fstab, and you want to support all the (somewhat
exotic) options for that, like /dev/disk/by-{id,uuid,label,path}?
(by-label, by-id, and by-path are probably useless for a livecd, but
by-uuid isn't, if the iso9660 FS exposes a UUID to udev. by-label is
really useful on a SCSI-device boot if there are ever any usb-storage
devices plugged in.)
I doubt mdev creates those symlinks, and I know devtmpfs doesn't. :-)
signature.asc
Description: OpenPGP digital signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
