diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-08-03 10:02:48 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-08-03 10:02:48 +0000 |
commit | c72d7bdafa5400200ab12301e29417689658ac5e (patch) | |
tree | 5eb177046775b263849999478dc13f6901638e9a /draklive | |
parent | a9fa8e298ae530af842dce7be92c32cfd3a34626 (diff) | |
download | drakiso-c72d7bdafa5400200ab12301e29417689658ac5e.tar drakiso-c72d7bdafa5400200ab12301e29417689658ac5e.tar.gz drakiso-c72d7bdafa5400200ab12301e29417689658ac5e.tar.bz2 drakiso-c72d7bdafa5400200ab12301e29417689658ac5e.tar.xz drakiso-c72d7bdafa5400200ab12301e29417689658ac5e.zip |
allow to install bootloader on separate /boot partition
Diffstat (limited to 'draklive')
-rwxr-xr-x | draklive | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -117,6 +117,9 @@ sub build_grub_cfg_raw { #- FIXME: use the bootloader module from drakx my $grub_part = "(hd0" . (defined $part_idx ? "," . $part_idx : "") . ")"; my $boot = $live->get_media_prefix('boot'); #- FIXME handle boot media + #- remove prefix if installing bootloader on separate /boot partition + $media->{partitions}[$part_idx]{mntpoint} eq $boot and $boot = ""; + my $title = $media->{title} || $live->{media}{title}; join("\n", "timeout " . get_bootloader_timeout($live), @@ -565,7 +568,7 @@ sub create_classical_bootloader { my ($live) = @_; my $initrd_prefix = "/initrd.img"; my $initrd = $live->get_system_root . $live->get_media_prefix('boot') . $initrd_prefix; - my $part_idx = $live->{media}->find_partition_index('/'); + my $part_idx = $live->{media}->find_boot_partition_index; my $oem_rescue_idx = $live->{media}->find_partition_index('OEM_RESCUE'); output_p($live->get_system_root . '/boot/grub/menu.lst', build_grub_cfg_raw($live, $live->{media}, -e $initrd && $initrd_prefix, { oem_rescue_idx => $oem_rescue_idx }, $part_idx)); } @@ -799,7 +802,7 @@ sub install_grub_to_image { mkdir_p($live->{mnt} . $grub_dir); cp_af(glob_($live->get_system_root . "/lib/grub/i386-mandriva/*"), $live->{mnt} . $grub_dir); - my $part_idx = $media->find_partition_index('/'); + my $part_idx = $media->find_boot_partition_index; open(my $grub, "| /sbin/grub --batch --no-floppy"); # using disk loopback fails, have to use image path |