summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
Diffstat (limited to 'draklive')
-rwxr-xr-xdraklive3
1 files changed, 2 insertions, 1 deletions
diff --git a/draklive b/draklive
index b15efb4..244b4cb 100755
--- a/draklive
+++ b/draklive
@@ -852,13 +852,14 @@ sub install_grub_to_image {
cp_af(glob_($live->get_system_root . "/lib/grub/i386-mandriva/*"), $live->{mnt} . $grub_dir);
my $part_idx = $media->find_boot_partition_index;
+ my $grub_prefix = $media->find_partition_index('/boot') ? "/grub" : $grub_dir;
open(my $grub, "| /sbin/grub --batch --no-floppy");
# using disk loopback fails, have to use image path
print $grub <<EOF;
device (hd0) $img
root (hd0,$part_idx)
-setup --prefix=$grub_dir (hd0)
+setup --prefix=$grub_prefix (hd0)
quit
EOF
close($grub) or die "unable to run grub\n";