summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive9
1 files changed, 5 insertions, 4 deletions
diff --git a/draklive b/draklive
index 2c15362..70e0426 100755
--- a/draklive
+++ b/draklive
@@ -851,7 +851,8 @@ sub record_cdrom_master {
sub install_grub_to_image {
my ($live, $media, $img, $opts) = @_;
- my $grub_dir = "/boot/grub";
+ my $media_boot = $live->get_media_prefix('boot', $opts->{boot});
+ my $grub_dir = "$media_boot/grub";
my $grub_script = $grub_dir . "/install.sh";
mkdir_p($live->{mnt} . $grub_dir);
cp_af(glob_($live->get_system_root . "/lib/grub/i386-mandriva/*"), $live->{mnt} . $grub_dir);
@@ -863,15 +864,15 @@ sub install_grub_to_image {
print $grub <<EOF;
device (hd0) $img
root (hd0,$part_idx)
-setup (hd0)
+setup --prefix=$grub_dir (hd0)
quit
EOF
close($grub) or die "unable to run grub\n";
output($live->{mnt} . $grub_script, <<EOG);
-grub --device-map=/boot/grub/device.map --batch <<EOF
+grub --device-map=$media_boot/grub/device.map --batch <<EOF
root (hd0,$part_idx)
-setup --stage2=/boot/grub/stage2 (hd0)
+setup --stage2=$media_boot/grub/stage2 (hd0)
quit
EOF
EOG