On Jan 13, 2012, at 11:27 AM, Kevin Lyda wrote: > I assume that if you're using LFS to build an embedded system (I did > that a long time ago), you want to reduce boot times.
To me an embedded system seems like the perfect use of an initramfs -- boot
directly from a ram-loaded image and never bother to re-root onto local media
(if any exists).
But to the more general point of direct-boot-is-faster -- that's probably true,
though I doubt by much if you aren't waiting around for auto-detection or
similar polling. All the initramfs needs to do is mount the root. So I don't
disagree, but I think the loss is minor compared to the gain.
For example, if you don't want the initramfs to run device detection, you could
pass these parameters from the bootloader:
root=/dev/sda1 dev="/dev/sda1 b 8 1"
and have the initramfs boot script know that you'd like it to create a specific
device file and boot from it rather than running any sort of device or
filesystem detection. That's only more expensive than a direct boot by a couple
of lines of script execution, a call to mknod (only necessary if you haven't
embedded the device node in your initramfs), and the userland-end of a call to
mount.
And the upside is other people could use exactly the same initramfs without
those parameters to get a fully automated boot that search for disks, detect
RAID, LVM, encryption, etc.
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
