diff options
-rwxr-xr-x | draklive | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -124,7 +124,7 @@ sub build_grub_cfg_raw { my ($name, $cmdline) = @$_; "title " . $title . if_($name, " ($name)"), "kernel $grub_part" . $boot . "/vmlinuz " . get_default_append($live, $opts) . if_($cmdline, " $cmdline"), - "initrd " . $boot . $initrd; + if_($initrd, "initrd " . $boot . $initrd); } group_by2('' => '', @{$live->{system}{boot_entries}})), "", ); @@ -555,8 +555,10 @@ $live->{media}{title} <kernel options> 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_nb = 1; #- FIXME: get from partition layout config - output_p($live->get_system_root . '/boot/grub/menu.lst', build_grub_cfg_raw($live, $live->{media}, "/initrd.img", {}, $part_nb)); + output_p($live->get_system_root . '/boot/grub/menu.lst', build_grub_cfg_raw($live, $live->{media}, -e $initrd && $initrd_prefix, {}, $part_nb)); } sub set_device_label { |