* util/grub-install.in: Handle partitionless disks.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-10-17 00:28:19 +02:00
parent f77a8c2470
commit 861dfd4cb2
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2010-10-17 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-install.in: Handle partitionless disks.
2010-10-17 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-setup.c (setup): Don't clean blocklists before readability

View file

@ -512,7 +512,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_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)
@ -537,8 +537,12 @@ if [ "x${devabstraction_module}" = "x" ] ; then
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.
if [ x"$grub_partition" = x ]; then
prefix_drive="()"
else
prefix_drive="(,$grub_partition)"
fi
fi
else
prefix_drive=`$grub_probe --target=drive --device ${grub_device}` || exit 1
fi