From fdff6f0be97ff0dcc7a0a74b21b98f6c8107de6b Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 8 Sep 2010 14:11:45 +0100 Subject: [PATCH] For EFI, hardcode the partition number in the core image's prefix. --- util/grub-install.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/util/grub-install.in b/util/grub-install.in index b0823642a..0956c0902 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -498,6 +498,7 @@ if [ "x${devabstraction_module}" = "x" ] ; then grub_drive="`$grub_probe --target=drive --device ${grub_device}`" || exit 1 # Strip partition number + grub_partition="`echo ${grub_drive} | sed -e 's/^[^,]*,//; s/)$//'`" grub_drive="`echo ${grub_drive} | sed -e s/,[a-z0-9,]*//g`" if [ "$disk_module" = ata ] ; then # generic method (used on coreboot and ata mod) @@ -520,6 +521,10 @@ if [ "x${devabstraction_module}" = "x" ] ; then echo 'set prefix=($root)'"${relative_grubdir}" >> ${grubdir}/load.cfg config_opt="-c ${grubdir}/load.cfg " modules="$modules search_fs_uuid" + elif [ "x$platform" = xefi ]; then + # No grub-setup, so we need to hardcode the partition number in the + # core image's prefix. + prefix_drive="(,$grub_partition)" fi else prefix_drive=`$grub_probe --target=drive --device ${grub_device}` || exit 1