From 57f8c033f132b309cfb77309b7aaa552d8c89041 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 12 Nov 2009 14:16:29 +0000 Subject: simplify by using install_grub_to_image for real devices too (running chroot's grub from build host was segfaulting, some glibc mismatch?) --- draklive | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'draklive') 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"; -- cgit v1.2.1