|
|
@ -50,20 +50,10 @@ EOF
|
|
|
|
# Install any requirements for the installer, for things we don't want
|
|
|
|
# Install any requirements for the installer, for things we don't want
|
|
|
|
# to see on the installed system
|
|
|
|
# to see on the installed system
|
|
|
|
chroot $SQUASH_ROOT apt-get update
|
|
|
|
chroot $SQUASH_ROOT apt-get update
|
|
|
|
chroot $SQUASH_ROOT apt-get -y install user-setup lupin-casper
|
|
|
|
chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper
|
|
|
|
|
|
|
|
|
|
|
|
# Installing lupin-casper means we need a new initramfs, so we
|
|
|
|
# Installing casper means we need a new initramfs
|
|
|
|
# cargo cult stuff from lb_chroot_hacks:
|
|
|
|
UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs
|
|
|
|
CASPER_GENERATE_UUID=1 chroot $SQUASH_ROOT update-initramfs -k all -t -u
|
|
|
|
|
|
|
|
for INITRAMFS in $(find $SQUASH_ROOT/boot -name 'initrd*' -not -type l); do
|
|
|
|
|
|
|
|
zcat "${INITRAMFS}" | lzma -c -6 > "${INITRAMFS}.new"
|
|
|
|
|
|
|
|
mv "${INITRAMFS}.new" "${INITRAMFS}"
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
# and lb_binary_linux-image:
|
|
|
|
|
|
|
|
mv $SQUASH_ROOT/boot/initrd.img-* binary/casper/
|
|
|
|
|
|
|
|
# to replace the previously built one with it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
chroot $SQUASH_ROOT apt-get -y install curtin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Don't let cloud-init run in the live session.
|
|
|
|
# Don't let cloud-init run in the live session.
|
|
|
|
touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled
|
|
|
|
touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled
|
|
|
|