summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive8
1 files changed, 5 insertions, 3 deletions
diff --git a/draklive b/draklive
index 1997d48..2932f62 100755
--- a/draklive
+++ b/draklive
@@ -1434,6 +1434,11 @@ sub install_usb_bootloader {
run_('syslinux', if_(!$media->{fast_syslinux}, '-s'), $device)
or die "unable to run syslinux on $device\n";
} elsif ($bootloader eq 'grub') {
+ my $master_device = $opts->{disk_device};
+ if (!$master_device) {
+ $master_device = $device;
+ $master_device =~ s/(\d+)$//;
+ }
my $local_grub_install = get_builddir($live) . $live->{prefix}{build}{scripts} . '/grub-install';
mkdir_p(dirname($local_grub_install));
cp_f(get_system_root($live) . '/sbin/grub-install', $local_grub_install);
@@ -1443,9 +1448,6 @@ sub install_usb_bootloader {
s!^\s*grub_prefix=/boot/!grub_prefix=${media_boot}/!;
s!^\s*bootdir=(.*)/boot$!bootdir=$1${media_boot}!;
} $local_grub_install;
-
- my $master_device = $device;
- $master_device =~ s/(\d+)$//;
foreach ($master_device, $device) {
run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_)
or die "unable to run grub on $device\n";