diff --git a/ChangeLog b/ChangeLog index fb14bd3bf..17c0347c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-08-01 Robert Millan + + * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from + within menuentries, not before them. + util/grub.d/10_hurd.in: Likewise. + 2008-08-01 Bean * conf/common.rmk (pkglib_MODULES): Add bufio.mod. diff --git a/util/grub.d/10_hurd.in b/util/grub.d/10_hurd.in index ed54f2f0a..833b24fc6 100644 --- a/util/grub.d/10_hurd.in +++ b/util/grub.d/10_hurd.in @@ -68,10 +68,11 @@ if ${all_of_them} && test -e /lib/ld.so.1 ; then : ; else exit 1 fi -prepare_grub_to_access_device ${GRUB_DEVICE} - cat << EOF menuentry "${OS}" { +EOF +prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/" +cat << EOF multiboot ${kernel} root=device:${GRUB_DEVICE} module /hurd/${hurd_fs}.static --readonly \\ --multiboot-command-line='\${kernel-command-line}' \\ diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 2512bd26e..9045904cb 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -97,10 +97,6 @@ list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi done` -if [ "x$list" != "x" ] ; then - prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} -fi - while [ "x$list" != "x" ] ; do linux=`find_latest $list` echo "Found linux image: $linux" >&2 @@ -128,6 +124,9 @@ while [ "x$list" != "x" ] ; do cat << EOF menuentry "${OS}, linux ${version}" { +EOF + prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/" + cat << EOF linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT} EOF if test -n "${initrd}" ; then @@ -141,6 +140,9 @@ EOF cat << EOF menuentry "${OS}, linux ${version} (single-user mode)" { +EOF + prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/" + cat << EOF linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro single ${GRUB_CMDLINE_LINUX} EOF if test -n "${initrd}" ; then