I was thinking about this.... looking at kernel, code, etc. Some
ideas came up:
1. Use a kernel patched with "linuxrc-always" patch only
2. Use a fake root (other than /dev/ram0), then linuxrc would build up
/dev/ram0 and change the real root to /dev/ram0.
3. Use a root of /dev/ram1, then linuxrc would build up /dev/ram1.
4. Use /dev/ram0, and don't run linuxrc at all, but make it an entry
in inittab.
Personal comments and discussion:
1. Not a really good idea - we're trying to use unmodified kernels,
yes?
2. This requires special handling, just like patches do. Not a good
thing. However, see note below.
3. This doesn't require special handling, but requires more memory.
During operation one needs memory for the initrd.gz image plus room
for the full initial system volume - plus kernel space. However, this
does have the advantage that now you can specify the size of this
volume outside of the kernel's command line... such as in the Oxygen
configuration files.
4. This is an interesting idea I've not heard propounded before. I'm
not sure what the problems or requirements of such an approach would
be.
NOTE: The patches for the kernel allow /linux.tty to be used for the
console initially instead of /dev/console. Seems like there's no
reason for not have /dev/console present in the initrd.gz image
instead.
NOTE: #2 and #3 could be combined: if the root is /dev/ram1, then #2
and #3 can be combined this way: a configuration option or kernel
command line parameter could determine whether a new /dev/ram1 is
created and switched to, or whether the present /dev/ram0 is populated
and used.
Code could go like this:
if (MakeNewSysVol)
create(/dev/ram1,size)
root = /_root
mkdir -p $root && mount /dev/ram1 $root
cp -a /[a-z]* $root
else
root = /
echo /dev/ram0 > /proc/sys/kernel/real-root-dev
fi
...then package loading code would use $root to determine the top
level to extract to.
...when linuxrc was done, then the kernel tests the real-root-dev to
see if it is /dev/ram0. If not, it does a pivot_root. Then (no
matter what) init is run.
More I think on it, the more I like this combined approach...
--
David Douthitt
UNIX Systems Administrator
HP-UX, Unixware, Linux
[EMAIL PROTECTED]
_______________________________________________
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel