[Merge] ~mwhudson/livecd-rootfs/+git/livecd-rootfs:lp-2100148 into livecd-rootfs:ubuntu/master
Dan Bungert
mp+481992 at code.launchpad.net
Wed Feb 26 23:38:17 UTC 2025
Diff comments:
> diff --git a/live-build/ubuntu-server/hooks/03-initramfs-enforcement.chroot b/live-build/ubuntu-server/hooks/03-initramfs-enforcement.chroot
> new file mode 100755
> index 0000000..b3694b1
> --- /dev/null
> +++ b/live-build/ubuntu-server/hooks/03-initramfs-enforcement.chroot
> @@ -0,0 +1,31 @@
> +#!/bin/bash -ex
> +# vi: ts=4 noexpandtab
> +
> +# In a kernel layer, we need a freshly updated initrd (to ensure it
> +# has been casperized with an appropriate config). A binary hook will
> +# pull this out to be a separate build artifact to eventually end up
> +# in /casper on the generated ISO.
> +
> +# In all lower layers, having an initrd just wastes space, as curtin
> +# will always call update-initramfs after the layer has been copied to
> +# the target system.
> +
> +# The netboot "layers" are not made into squashfses so there's no need
> +# to do anything in those.
> +
> +case $PASS in
> + ubuntu-server-minimal.ubuntu-server.installer.*.*)
> + exit 0
> + ;;
> + ubuntu-server-minimal.ubuntu-server.installer.*)
> + ;;
> + *)
> + rm -f /boot/initrd.img-*
> + exit 0
> + ;;
> +esac
> +
> +cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
Do we need casperization and LAYERFS_PATH in the same PASS?
> +LAYERFS_PATH=${PASS}.squashfs
> +EOF
> +update-initramfs -u
--
https://code.launchpad.net/~mwhudson/livecd-rootfs/+git/livecd-rootfs/+merge/481992
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.
More information about the Ubuntu-reviews
mailing list