diff options
-rwxr-xr-x | draklive | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -840,7 +840,7 @@ EOG } sub install_usb_bootloader { - my ($live, $media, $opts) = @_; + my ($live, $media, $boot_device $opts) = @_; my $media_boot = $live->get_media_prefix('boot', $opts->{boot}); my $device = get_media_device($live, $opts); my $bootloader = $media->get_boot_setting('bootloader', $opts); @@ -855,13 +855,13 @@ sub install_usb_bootloader { # and get_bootloader_path (when copying) mkdir_p($live->{mnt} . $media_boot . '/grub'); cp_f($live->get_builddir . $live->{prefix}{build}{boot} . '/gfxmenu', $live->{mnt} . $media_boot); - output_p($live->{mnt} . $media_boot . '/grub/menu.lst', build_grub_cfg($live, $media, $opts, $device)); + output_p($live->{mnt} . $media_boot . '/grub/menu.lst', build_grub_cfg($live, $media, $opts, $boot_device)); } - if (-b $device) { + if (-b $boot_device) { if ($bootloader eq 'syslinux') { #- use syslinux -s, "safe, slow and stupid" version of SYSLINUX, unless specified otherwise - run_('syslinux', if_(!$media->{fast_syslinux}, '-s'), $device) + run_('syslinux', if_(!$media->{fast_syslinux}, '-s'), $boot_device) or die "unable to run syslinux on $device\n"; } elsif ($bootloader eq 'grub') { my $master_device = $opts->{disk_device}; @@ -882,7 +882,7 @@ sub install_usb_bootloader { } $local_grub_install; my $grub_device_map = $live->{mnt} . $media_boot . "/grub/device.map"; unlink $grub_device_map; - foreach ($master_device, $device) { + foreach ($master_device, $boot_device) { run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_) or die "unable to run grub on $device\n"; } @@ -914,7 +914,7 @@ sub record_usb_master { rm_rf($live->{mnt} . $media_boot) if -e $live->{mnt} . $media_boot; cp_af($live->get_builddir . $live->{prefix}{build}{boot}, $live->{mnt} . $media_boot); - install_usb_bootloader($live, $media, $opts); + install_usb_bootloader($live, $media, $opts->{device}, $opts); do { my $loopbacks_source = $live->get_builddir . $live->{prefix}{build}{loopbacks} . '/'; @@ -1154,7 +1154,7 @@ sub record_usb_replicator { run_('mount', $device, $live->{mnt}) or die "unable to mount $device\n"; rm_rf($live->{mnt} . $media_boot) if -e $live->{mnt} . $media_boot; - install_usb_bootloader($live, $media, $opts); + install_usb_bootloader($live, $media, $opts->{device}, $opts); record_rescue_files($live->{mnt}, $device, [ get_disk_replicator_files($live) ]); output_p($live->{mnt} . "/images/list", "EN,English," . basename(get_disk_image_path($live)) . ",on\n"); |