summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive8
-rw-r--r--lib/MDV/Draklive/Initrd.pm4
2 files changed, 8 insertions, 4 deletions
diff --git a/draklive b/draklive
index 3dee46b..6165b4d 100755
--- a/draklive
+++ b/draklive
@@ -489,11 +489,19 @@ sub prepare_bootloader {
sub create_initrd {
my ($live) = @_;
+ my $root = $live->get_system_root;
+
+ run_('mount', '-t', 'proc', 'none', $root . '/proc');
+ run_('mount', '-t', 'sysfs', 'none', $root . '/sys');
+
if (need_media_specific_boot($live)) {
MDV::Draklive::Initrd::create_media_initrd($live);
} else {
MDV::Draklive::Initrd::create_classical_initrd($live);
}
+
+ run_('umount', $root . '/sys');
+ run_('umount', $root . '/proc');
}
sub create_bootloader {
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index b88b9c7..e869cbf 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -304,15 +304,11 @@ sub create_classical_initrd {
my $initrd_long = '/boot/initrd-'. $kernel . '.img';
unlink($root . $initrd_long);
- run_('mount', '-t', 'proc', '/proc', $root . '/proc');
- run_('mount', '-t', 'sysfs', '/sys', $root . '/sys');
{
my $bootloader = {};
local $::prefix = $root;
bootloader::add_kernel($bootloader, $kernel, { label => 'linux', vga => $live->{system}{vga_mode} }, '', $live->{system}{no_initrd});
}
- run_('umount', $root . '/sys');
- run_('umount', $root . '/proc');
}
1;