diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | defaults/linuxrc | 1 | ||||
-rwxr-xr-x | gen_cmdline.sh | 5 | ||||
-rw-r--r-- | gen_determineargs.sh | 1 | ||||
-rw-r--r-- | gen_initramfs.sh | 5 |
5 files changed, 16 insertions, 1 deletions
@@ -2,6 +2,11 @@ # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney # Distributed under the GPL v2 + 13 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> defaults/linuxrc, + gen_cmdline.sh, gen_determineargs.sh, gen_initramfs.sh: + Add --real-root=<foo> parameter to specify a default for real_root= in the + initramfs for gentoo bug #249783 + 12 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> -arch/alpha/busy-config, -arch/arm/busy-config, -arch/ia64/busy-config, -arch/mips/busy-config, -arch/parisc/busy-config, -arch/parisc64/busy-config, diff --git a/defaults/linuxrc b/defaults/linuxrc index 4dd1b7c..4d21314 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -41,7 +41,6 @@ quiet_kmsg CMDLINE=`cat /proc/cmdline` # Scan CMDLINE for any specified real_root= or cdroot arguments -REAL_ROOT='' FAKE_ROOT='' REAL_ROOTFLAGS='' CRYPT_SILENT=0 diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 60a1ab9..84e135e 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -92,6 +92,7 @@ longusage() { echo " --no-busybox Do not include busybox in the initramfs." echo " --unionfs Include support for unionfs" echo " --netboot Create a self-contained env in the initramfs" + echo " --real-root=<foo> Specify a default for real_root= echo " Internals" echo " --arch-override=<arch> Force to arch instead of autodetect" echo " --cachedir=<dir> Override the default cache location" @@ -254,6 +255,10 @@ parse_cmdline() { CMD_NETBOOT=1 print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}" ;; + --real-root=*) + CMD_REAL_ROOT=`parse_opt "$*"` + print_info 2 "CMD_REAL_ROOT: ${CMD_REAL_ROOT}" + ;; --slowusb) CMD_SLOWUSB=1 print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}" diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 6e9c259..02995bc 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -105,6 +105,7 @@ determine_real_args() { set_config_with_override 1 BUSYBOX CMD_BUSYBOX "yes" set_config_with_override 1 UNIONFS CMD_UNIONFS set_config_with_override 1 NETBOOT CMD_NETBOOT + set_config_with_override 2 REAL_ROOT CMD_REAL_ROOT set_config_with_override 1 DISKLABEL CMD_DISKLABEL set_config_with_override 1 LUKS CMD_LUKS set_config_with_override 1 MDADM CMD_MDADM diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 045574a..e14604c 100644 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -451,6 +451,11 @@ append_auxilary() { else cp "${GK_SHARE}/defaults/initrd.defaults" "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" fi + + if [ -n "${REAL_ROOT}" ] + then + sed -i "s/^REAL_ROOT=.*$/REAL_ROOT='${REAL_ROOT}'/" "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" + fi echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults" for group_modules in ${!MODULES_*}; do |