> Here is the two methods compared:
>
> EWALD/JACQUES
>
> 1. initrd.gz is loaded into /dev/ram0 (ROOT=/dev/ram0)
> 2. The kernel recognizes root is /dev/ram0, and does NOT run /linuxrc
> 3. The kernel then releases memory and exits the load process
> 4. The kernel runs init (INIT=/linuxrc)
> 5. Your linuxrc performs a pivot_root (if necessary) and runs init by
> hand.

I would generally frown on this...you want the kernel to run linuxrc
normally, then mount the real-root-device and run init when linuxrc is
finished.

> OXYGEN
>
> 1. initrd.gz is loaded into /dev/ram0 (ROOT=/dev/ram1)
> 2. The kernel recognizes that root is NOT /dev/ram0, and then DOES run
> /linuxrc
> 3. The kernel then releases memory, performs a pivot_root, and runs
> /bin/init
>
> No unusual kernel parameters required.

This is the right way to do it, except the 2.5 step of linuxrc building a
root filesystem on /dev/ram1 was omitted.

> I might suggest too, something that had occured to me: what about an
> entry in the inittab that runs /linuxrc?

Um...bad idea IMHO.  The whole point of using the initrd functionality is to
get a tiny environment that can create the root OS, which will then be
mounted & run by the kernel.  If you do linuxrc things with init, you have
to have the root filesystem built beforehand (ie larger initial ramdisk),
and if you want to build a different root filesystem, you've got the whole
pivot_root problem to deal with again.

Just use the initrd stuff the way it's intended and let the kernel deal with
mounting the newly created root filesystem and running init like normal...

> But I digress: I think my way is the most standard way; what do you
> all think?  No need to explain the need for INIT=/linuxrc, etc.

You've got my vote.

Charles Steinkuehler
http://lrp.steinkuehler.net
http://c0wz.steinkuehler.net (lrp.c0wz.com mirror)



_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel

Reply via email to