From c1a71f933b1c96492c632cbc61f82b011950ee35 Mon Sep 17 00:00:00 2001 From: David Krauser Date: Mon, 28 Sep 2020 11:12:19 -0400 Subject: [PATCH] Produce buildd kernel and initrd as separate artifacts Multipass on Mac OS X requires standalone kernel and initrd artifacts to boot. Also call update-initramfs on all installed kernels. We only have one kernel installed, so we don't need to specify an explicit version. --- debian/changelog | 9 +++++++++ live-build/buildd/hooks/52-linux-virtual-image.binary | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5c6639f4..17a0a9a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +livecd-rootfs (2.408.66) UNRELEASED; urgency=medium + + * buildd: produce kernel and initrd as separate artifacts + * buildd: call update-initramfs for all installed kernels + We only have one kernel installed, so we don't need to + specify an explicit version. + + -- David Krauser Tue, 20 Oct 2020 15:00:38 -0400 + livecd-rootfs (2.408.65) xenial; urgency=medium [ Joshua Powers ] diff --git a/live-build/buildd/hooks/52-linux-virtual-image.binary b/live-build/buildd/hooks/52-linux-virtual-image.binary index e99b5c71..78c4d71a 100755 --- a/live-build/buildd/hooks/52-linux-virtual-image.binary +++ b/live-build/buildd/hooks/52-linux-virtual-image.binary @@ -60,8 +60,11 @@ chroot "$mount_d" update-grub undivert_grub "$mount_d" # Update initramfs image -chroot "$mount_d" \ - sh -c 'update-initramfs -c -v -k $(ls /boot/vmlinuz*generic | sed 1q | cut -d- -f2-3)' +chroot "$mount_d" update-initramfs -c -v -k all + +# extract kernel and initrd +cp $mount_d/boot/initrd.img-* livecd.$PROJECT.initrd-generic +cp $mount_d/boot/vmlinuz-* livecd.$PROJECT.vmlinuz-generic # Set up resolvconf setup_resolvconf "$mount_d"