Bug#335067: grub: cannot disable "root" lines

Kees Cook kees at osdl.org
Fri Oct 21 18:29:28 UTC 2005


Package: grub
Version: 0.95+cvs20040624-17
Severity: important
Tags: patch


To boot grub with a software RAID across multiple drives, grub must use
it's internal default of the "root" device, and as such, the "root"
device line cannot appear in the configs.  There is currently no way to
disable the "root" option.  (It defaults to "hd0,0" when empty.)

This patch allows for "none" to be set, so that grub can continue to
boot off of whatever drive it loaded itself from.

--- update-grub.orig    2005-10-21 11:06:58.000000000 -0700
+++ update-grub 2005-10-21 11:12:30.000000000 -0700
@@ -560,7 +560,9 @@
                echo "lock" >> $buffer
        fi
 
-       echo "root              $grub_root_device" >> $buffer
+       if test x"$grub_root_device" != x"none" ; then
+               echo "root              $grub_root_device" >> $buffer
+       fi
        echo "kernel            $kernel $kernel_options $recovery_suffix"  >> $buffer
 
        if [ -n "$initrd" ]; then
@@ -718,12 +720,16 @@
 
 echo -n "Searching for splash image... "
 if [ -f "$grub_dir/splash.xpm.gz" ]; then
+       splash_root_device="$grub_root_device"
+       if test x"splash_root_device" = x"none" ; then
+               splash_root_device=""
+       fi
        splash="$grub_dir/splash.xpm.gz"
        echo "found: $splash ."
        if [ -n "$boot_device" ]; then
                splash="${splash#/boot}"
        fi
-       echo "splashimage=$grub_root_device$splash" >> $buffer
+       echo "splashimage=$splash_root_device$splash" >> $buffer
        echo >> $buffer
 else
        echo "none found, skipping..."



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686-smp
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages grub depends on:
ii  libc6                         2.3.5-7    GNU C Library: Shared libraries an
ii  libncurses5                   5.5-1      Shared libraries for terminal hand

grub recommends no packages.

-- no debconf information




More information about the Pkg-grub-devel mailing list