live-image: symlink /initrd.img to match /vmlinuz
CI / Lint + build + test (push) Successful in 1m47s
Release / release (push) Successful in 2m14s

The linux-image-amd64 postinst creates /vmlinuz but the paired
/initrd.img symlink only shows up via an initramfs-tools hook that
doesn't fire when we call update-initramfs ourselves. Without it,
the top-level Makefile's `cp live-image/build/initrd.img` fails and
`make release` aborts with a broken bundle.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-18 10:54:25 -04:00
parent 41a273b47f
commit caebd00d8d
+7
View File
@@ -15,3 +15,10 @@ ln -sf /etc/systemd/system/vetting-agent.service \
# Makefile's cp of live-image/build/initrd.img has something to copy.
kver=$(ls "$BUILDROOT/lib/modules/" | head -n1)
chroot "$BUILDROOT" update-initramfs -c -k "$kver"
# linux-image-amd64 creates /vmlinuz -> boot/vmlinuz-<kver>, but the
# corresponding /initrd.img symlink only gets created by an
# initramfs-tools postinst hook that relies on the kernel package's
# "postinst_hook" infrastructure — which doesn't fire when we invoke
# update-initramfs ourselves. Create it to mirror /vmlinuz.
ln -sf "boot/initrd.img-${kver}" "$BUILDROOT/initrd.img"