-----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 Dan Nicholson wrote: > On 8/11/07, Bryan Kadzban <[EMAIL PROTECTED]> wrote: >> I should also note that the boot scripts are useless the way they >> are, unless you have an initramfs. > > You mean in the case that you're using LVM or something else > devmapper backed? Or always unless you're using initramfs? When I > started using an initramfs, I had to change the udev script to check > whether /dev was mounted already and if the static devices already > existed, but that was it. But I can't see any issues going the other > way for a regular partition as root.
The scripts I wrote were only to recreate the devmapper and md devices in the /dev tmpfs after udev finishes; they're not needed unless your root is devmapper or md. They also won't work unless you use an initramfs, because they assume the devices have all been activated (from the initramfs), just their nodes are missing. If your root is devmapper or md, then you need to set up the devmapper or md devices in the initramfs, and those nodes don't get moved to the host (at least, not in my initramfs). So the boot script for dmraid runs "dmsetup mknodes" (dmsetup is part of the device-mapper library) to recreate its devices, just before checkfs. The LVM2 script runs a similar LVM2 program (vgmknodes). md-raid runs a loop over each /dev/md[0-9]* device and manually creates the nodes. Anyway, this setup can use the existing LFS udev script as-is, since I don't move the initramfs /dev. I just need a couple additions to udev depending on which features were used for the root FS, so that checkfs can work. Those additions are what I wrote. :-) There's another kind of setup that would require different scripts, though (LVM2 for /usr, and / on a normal partition, for instance). Since root is on a normal partition, you wouldn't need an initramfs, but you'd still need to bring up the LVM2 volumes. So you'd run the real "vgchange -ay" instead of my script's "vgmknodes". It may be easier to say "anyone using LVM2 anywhere should use the initramfs"; that way the script doesn't have to worry about detecting which type of setup the user has. The initramfs will build all the LVM2 volumes the way it's written now, and the script will recreate the devices after udev runs. Of course, mounting a tmpfs on /dev in the initramfs and moving it to the host would be another way to handle this; then the scripts I wrote are completely pointless. ;-) I didn't want to do that because it'd require changes to the udev script, and at the time, I figured that it could wait until after a bootscript release matching the 6.3 book was made. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGvlTDS5vET1Wea5wRA46qAKDXDj3E0titMwLC3OGub40Z6ttkQACgt12T w6s5+4+Y3VbNNsk8wEocggI= =iSm2 -----END PGP SIGNATURE----- -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
