If we purport to test booting to an md raid, we may as well test it.
We do not need the plymouth module and the normal crypt module to include
duplicate functionality.
The switch_root shell script did not work with bash-4.0-2, because
"exec" gets the real path of the executable which is then
"/sysroot/lib/ld-linux.so.2" instread of "./lib/ld-linux.so.2".
Also the required chroot binary might live in /usr/bin, which can
be mounted later.
Here is the switch_root code from nash, which can be stripped down
further, but which works.
>From f1b1e4f8694104f007e4483c36b0bf40a5760167 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Date: Wed, 4 Mar 2009 13:41:07 +0100
Subject: [PATCH] replace switch_root shell script with binary
The switch_root shell script did not work with bash-4.0-2, because
"exec" gets the real path of the executable which is then
"/sysroot/lib/ld-linux.so.2" instead of "./lib/ld-linux.so.2".
Also the required chroot binary might live in /usr/bin, which can
be mounted later.
Here is the switch_root code from nash, which can be stripped down
further, but which works.
rules, hooks and modules are installed in $(DESTDIR)/usr/libexec/dracut/
instead of their corresponding sub-directories.
This patch fixes this.
--
Makefile | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Modules are now responsible for loading their hooks into the initrd.
This should be all the structure we need to make it easy for things
to integrate with dracut -- now to document and test it all.
We can use sh -c to accomplish the same goal
Also move cat back on to the list of debugging tools -- all the files we were
using it on in the initrd can use read to accomplish the same goal.
Any script placed in /pre-udev will be sourced just before udev starts
device scanning and loading.
Any script placed in /pre-mount will be sourced just before we try to
mount a root filesystem.
Any script placed in /pre-pivot will be sourced just before we switch to the
new root filesystem.
These hooks should be the minimum needed to add back plymouth and deal with
more advanced filesysem mounting needs (multipath, iscsi, nfs, nbd, etc.)