From: Vladimir 'phcoder' Serbinenko Date: Sat, 16 Oct 2010 22:28:19 +0000 (+0200) Subject: * util/grub-install.in: Handle partitionless disks. X-Git-Tag: 1.99~380 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=861dfd4cb2dcb882ea4a4334172ee7114fd85d6e;p=thirdparty%2Fgrub.git * util/grub-install.in: Handle partitionless disks. --- diff --git a/ChangeLog b/ChangeLog index 731abcb0f..b5c091ee1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-10-17 Vladimir Serbinenko + + * util/grub-install.in: Handle partitionless disks. + 2010-10-17 Vladimir Serbinenko * util/grub-setup.c (setup): Don't clean blocklists before readability diff --git a/util/grub-install.in b/util/grub-install.in index cace82593..21ac20f8d 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -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,7 +537,11 @@ 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. - prefix_drive="(,$grub_partition)" + 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