summaryrefslogtreecommitdiffstats
path: root/draklive
diff options
context:
space:
mode:
Diffstat (limited to 'draklive')
-rwxr-xr-xdraklive21
1 files changed, 11 insertions, 10 deletions
diff --git a/draklive b/draklive
index 27bbbde..ad0ce5c 100755
--- a/draklive
+++ b/draklive
@@ -36,13 +36,9 @@ use MDV::Draklive::Utils;
use MDV::Draklive::Live;
use MDV::Draklive::Progress;
use MDV::Draklive::Loopback;
-use MDV::Draklive::Initrd;
use MDV::Draklive::Config;
use MDV::Draklive::Storage;
-#- FIXME: remove completely code handling old draklive-style initrds
-my $use_dracut = 1;
-
sub get_syslinux_path {
my ($media, $opts) = @_;
'/' . $media->{storage} . '/syslinux' . ($opts->{boot} && '-boot-' . $opts->{boot}) . '.cfg';
@@ -57,8 +53,7 @@ sub get_default_append {
my ($live, $opts) = @_;
my $append = $opts->{append} || $live->{system}{append};
join(' ',
- if_($use_dracut || !need_media_specific_boot($live),
- 'root=mgalive:' . $live->{media}->get_media_source_for_nash),
+ 'root=mgalive:' . $live->{media}->get_media_source_for_nash,
if_($live->{system}{vga_mode} && $append !~ /\bvga=\b/,
'splash quiet noiswmd audit=0 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0',
'vga=' . $live->{system}{vga_mode}),
@@ -510,10 +505,16 @@ sub create_initrd {
mount_system_fs($live);
- if (!$use_dracut && need_media_specific_boot($live)) {
- MDV::Draklive::Initrd::create_media_initrd($live);
- } else {
- MDV::Draklive::Initrd::create_classical_initrd($live);
+ my $kernel = $live->find_kernel;
+ print "using kernel $kernel->{version}\n";
+
+ my $initrd_file = $root . '/boot/' . $live->get_initrd_name;
+ unlink($initrd_file);
+
+ {
+ my $bootloader = {};
+ local $::prefix = $root;
+ bootloader::add_kernel($bootloader, $kernel, { label => 'linux', vga => $live->{system}{vga_mode} }, '', $live->{system}{no_initrd});
}
umount_system_fs($live);