On Jan 22, 2012, at 9:05 PM, Bruce Dubbs wrote: > The times I have had problems have been when grub can't load the kernel > and if I can load the kernel I can always edit the command line in grub > to use init=/bin/bash.
Only if the kernel can mount the root file system as-is. Given an initramfs there's an opportunity to run repairs or switch to a backup disk from a userspace environment that's as rich as you'd like it to be and guaranteed to be available so long as the boot loader can find the kernel/initramfs files. You may or may not care; if you're sitting at the machine in question it's probably just as easy to slap in a boot CD and fix it that way, versus maintaining a full-featured initramfs. But if you're building a machine that lives in a data center 2000 miles away it's nice to be able to run fsck without needing to boot from alternate media. >> 3. Auto-detecting which device the root is on, > > Can't you use 'mount'? I get something like: > > /dev/sda8 on / type ext3 (rw) On my system I don't always get the same device at /dev/sda. Rebooting can change my /dev/sda to /dev/sdg, or any other device letter, without any physical change in the underlying disks or cabling. This is not a problem in the eyes of the kernel devs, and will never be "fixed", because there's no general way to guarantee consistent naming short of a configurable system like udev (which obviously isn't available at the time root is mounted by the kernel). Depending on your hardware that may or may not be an issue for you, but it's a possible problem on any system with more than one SCSI disks (including SAS and SATA disks, and most USB disks). Something as simple as inserting a thumb drive could change device names and break a static kernel boot config. Or let's say you've burned a CD with LFS on it. The BIOS can find the boot loader, but how do you determine if the root is at /dev/hda or /dev/sdb and pass that string to the kernel? Even on writable media the same situation occurs any time you can't predict the device name -- if you are booting from a USB block device, even on a single machine, it can be difficult to reliably predict the root device name, and all but impossible if you share the same disk among non-identical machines. Zach
smime.p7s
Description: S/MIME cryptographic signature
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page