dracut/modules.d
Harald Hoyer c4da240717 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" 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.
2009-03-04 17:23:03 +01:00
..
00dash Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
10redhat-i18n Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
40network Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
90crypt Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
90kernel-modules Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
90lvm Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
95debug Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
95terminfo Create a self-contained structure for dracut modules 2009-03-04 16:55:14 +01:00
95udev-rules Get rid of some RedHat specific modules and udev rules 2009-03-04 17:14:53 +01:00
99base replace switch_root shell script with binary 2009-03-04 17:23:03 +01:00