From c3a1bd73c4160cb16ede66efbb3b3a87e64634da Mon Sep 17 00:00:00 2001 From: Martin Whitaker Date: Tue, 23 Oct 2018 20:17:45 +0100 Subject: BuildBoot: copy rather than move the initrd into the build directory. We need the initrd in /boot of the live filesystem to allow us to pivot back to the initramfs on shutdown. Without this, we can't cleanly unmount a persistent filesystem. --- lib/MGA/DrakISO/BuildBoot.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/MGA/DrakISO/BuildBoot.pm b/lib/MGA/DrakISO/BuildBoot.pm index a7481fd..95c1a10 100644 --- a/lib/MGA/DrakISO/BuildBoot.pm +++ b/lib/MGA/DrakISO/BuildBoot.pm @@ -79,9 +79,8 @@ sub prepare_live_system_boot { run_as_root('chmod', '644', $root . $initrd) or die "ERROR: cannot chmod initrd\n"; - # Move the initrd into the build directory. - run_as_root('mv', $root . $initrd, $boot_dir . '/initrd.img') - or die "ERROR: cannot move initrd\n"; + # Copy the initrd into the build directory. + cp_f($root . $initrd, $boot_dir . '/initrd.img'); } catch { $error_message = $_; } finally { -- cgit v1.2.1