Why '-c DEV' option for switch_root?
Didier Kryn
kryn at in2p3.fr
Mon Dec 16 10:33:20 UTC 2013
Hi Laurent.
I am using initramfs with static Busybox on VME Single Board
Computers. These are used as servers and can be plugged into various
locations where there is a dedicated NFS server. A USB or sata disk can
also be connected. The kernel boots from onboard flash and the console
is a serial port.
The user-space code in the initramfs configures the network,
requests its own hostname from DNS, detects available bootable
filesystems (disk or NFS), figures out from a list at which address
there might be an NFS server, then presents a list of systems to boot to
-- after 15 seconds, selects the first in the list -- Then mounts proc,
sys and dev in the mounted filesystem, and switch_root to /sbin/init.
The mounted filesystem is currently Debian-7.
I apreciate your knowledge of Linux and the boot process. But about
the usefullness of initramfs, I think you are wrong. I don't think I
could do the job without it.
Didier
Le 16/12/2013 09:05, Laurent Bercot a écrit :
> On 2013-12-16 01:08, Rob Landley wrote:
>> The most recent kernel has my initmpfs patches, meaning initramfs
>> can now be a tmpfs instead of ramfs.
>> [snip blurb]
>
> You're listing reasons why initramfs (or initmpfs, if you prefer) is
> more logical than it was before, more convenient, etc. All this may be
> true, but it does not mean initramfs is actually *useful*.
>
> I have yet to see a case where initramfs is really needed. Every time
> I've seen a system boot on initramfs, the same goals could have been
> achieved via booting on the real root filesystem and doing work during
> initialization, which implies a lot less code, and is more maintainable,
> and safer (if something fails early on).
>
> I liked initramfs back in the day. It looked flexible and powerful,
> which it is, and maybe your initmpfs patches make it even more so. But
> I've come to realize it's just a fancy toy, and yes, a trap : people are
> blinded by the shinies and diverted from simpler solutions.
>
More information about the busybox
mailing list