diff --git a/ChangeLog b/ChangeLog index ed0bc71d6..d36d3441f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-05-10 Vladimir Serbinenko + + * util/grub.d/10_linux.in: Correctly handle the Linux in root. + 2011-05-09 Vladimir Serbinenko * grub-core/loader/efi/chainloader.c (grub_chainloader_unload): Set diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index 1dbcad90c..3c3a2a5d5 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -98,10 +98,17 @@ EOF EOF fi - if [ -z "${prepare_boot_cache}" ]; then - prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" + if [ x$dirname = x/ ]; then + if [ -z "${prepare_root_cache}" ]; then + prepare_root_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/")" + fi + printf '%s\n' "${prepare_root_cache}" + else + if [ -z "${prepare_boot_cache}" ]; then + prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")" + fi + printf '%s\n' "${prepare_boot_cache}" fi - printf '%s\n' "${prepare_boot_cache}" message="$(gettext_printf "Loading Linux %s ..." ${version})" cat << EOF echo '$message' @@ -131,6 +138,7 @@ case x`uname -m` in esac prepare_boot_cache= +prepare_root_cache= while [ "x$list" != "x" ] ; do linux=`version_find_latest $list`