* util/grub-install.in (grub_partition): New variable.

Set prefix_drive on EFI and PC to (,$grub_partition) as last resort.
	* util/i386/pc/grub-setup.c (setup): Don't touch prefix.
	Fixes a bug reported by Yves Blusseau.
This commit is contained in:
Vladimir Serbinenko 2010-09-11 17:21:48 +02:00 committed by Vladimir 'phcoder' Serbinenko
parent 050abaeaa8
commit 25761e13ee
3 changed files with 12 additions and 19 deletions

View file

@ -367,6 +367,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)
@ -389,6 +390,9 @@ 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 ] || [ "x$platform" = xpc ]; then
# 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