live-image: symlink /initrd.img to match /vmlinuz
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user