summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-11-12 14:16:29 +0000
committerOlivier Blin <oblin@mandriva.com>2009-11-12 14:16:29 +0000
commit57f8c033f132b309cfb77309b7aaa552d8c89041 (patch)
tree575e0852f5aca16ef8744f9c2912d52cc3a7dccc
parent8a589fcaa8f36ead0d07ae396e63763a13a3209a (diff)
downloaddraklive-57f8c033f132b309cfb77309b7aaa552d8c89041.tar
draklive-57f8c033f132b309cfb77309b7aaa552d8c89041.tar.gz
draklive-57f8c033f132b309cfb77309b7aaa552d8c89041.tar.bz2
draklive-57f8c033f132b309cfb77309b7aaa552d8c89041.tar.xz
draklive-57f8c033f132b309cfb77309b7aaa552d8c89041.zip
simplify by using install_grub_to_image for real devices too (running
chroot's grub from build host was segfaulting, some glibc mismatch?)
-rwxr-xr-xdraklive24
1 files changed, 1 insertions, 23 deletions
diff --git a/draklive b/draklive
index e79fcd2..212b727 100755
--- a/draklive
+++ b/draklive
@@ -926,29 +926,7 @@ sub install_disk_bootloader {
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 = $device;
- if ($master_device =~ m!/dev/!) {
- my $local_grub_install = $live->get_builddir . $live->{prefix}{build}{scripts} . '/grub-install';
- mkdir_p(dirname($local_grub_install));
- cp_f($live->get_system_root . '/sbin/grub-install', $local_grub_install);
- my $root = $live->get_system_root;
- #- FIXME: use a grub/install.sh script?
- substInFile {
- s!^\s*exec_prefix=.*!exec_prefix=$root!;
- s!^\s*grub_prefix=/boot/!grub_prefix=${media_boot}/!;
- s!^\s*bootdir=(.*)/boot$!bootdir=$1${media_boot}!;
- } $local_grub_install;
- my $grub_device_map = $live->{mnt} . $media_boot . "/grub/device.map";
- unlink $grub_device_map;
- foreach ($master_device, $boot_device) {
- local $ENV{LD_LIBRARY_PATH} = $root . $live->get_lib_prefix;
- run_($local_grub_install, '--root-directory=' . $live->{mnt}, '--no-floppy', $_)
- or die "unable to run grub on $device\n";
- }
- unlink $grub_device_map;
- } else {
- install_grub_to_image($live, $media, $master_device, $opts);
- }
+ install_grub_to_image($live, $media, $device, $opts);
}
} else {
warn "not running $bootloader on non block device $device\n";