mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 09:21:53 +00:00
Move casper from filesystem.squashfs to installer.squashfs.
This commit is contained in:
commit
002495b264
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
livecd-rootfs (2.505) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
* Move casper from filesystem.squashfs to installer.squashfs.
|
||||||
|
|
||||||
|
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Fri, 23 Feb 2018 13:40:35 +1300
|
||||||
|
|
||||||
livecd-rootfs (2.504) bionic; urgency=medium
|
livecd-rootfs (2.504) bionic; urgency=medium
|
||||||
|
|
||||||
* Override JobRunningTimeoutSec to 0s on the .device unit that
|
* Override JobRunningTimeoutSec to 0s on the .device unit that
|
||||||
|
@ -116,6 +116,12 @@ if [ -z "${IMAGEFORMAT:-}" ]; then
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
skip_lb_stage() {
|
||||||
|
STAGE="$1"
|
||||||
|
mkdir -p .build
|
||||||
|
touch ".build/$STAGE"
|
||||||
|
}
|
||||||
|
|
||||||
case $IMAGEFORMAT in
|
case $IMAGEFORMAT in
|
||||||
ext2|ext3|ext4)
|
ext2|ext3|ext4)
|
||||||
OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT"
|
OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT"
|
||||||
@ -141,7 +147,9 @@ case $IMAGEFORMAT in
|
|||||||
INITRAMFS_TYPE=none
|
INITRAMFS_TYPE=none
|
||||||
case $PROJECT:${SUBPROJECT:-} in
|
case $PROJECT:${SUBPROJECT:-} in
|
||||||
ubuntu-server:live)
|
ubuntu-server:live)
|
||||||
add_package live lupin-casper
|
# Stop lb installing casper into filesystem.squashfs
|
||||||
|
# by skipping lb_chroot_live-packages.
|
||||||
|
skip_lb_stage chroot_live-packages
|
||||||
INITRAMFS_TYPE=auto
|
INITRAMFS_TYPE=auto
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -329,3 +329,34 @@ undivert_grub() {
|
|||||||
chroot "$CHROOT_ROOT" dpkg-divert --remove --local \
|
chroot "$CHROOT_ROOT" dpkg-divert --remove --local \
|
||||||
--rename /usr/bin/systemd-detect-virt
|
--rename /usr/bin/systemd-detect-virt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
recreate_initramfs() {
|
||||||
|
# Regenerate the initramfs by running update-initramfs in the
|
||||||
|
# chroot at $1 and copying the generated initramfs
|
||||||
|
# around. Beware that this was written for a single use case
|
||||||
|
# (live-server) and may not work in all cases without
|
||||||
|
# tweaking...
|
||||||
|
# config/common must be sourced before calling this function.
|
||||||
|
CHROOT="$1"
|
||||||
|
# Start by cargo culting bits of lb_chroot_hacks:
|
||||||
|
if [ -n "$LB_INITRAMFS_COMPRESSION" ]; then
|
||||||
|
echo "COMPRESS=$LB_INITRAMFS_COMPRESSION" > "$CHROOT"/etc/initramfs-tools/conf.d/livecd-rootfs.conf
|
||||||
|
fi
|
||||||
|
chroot "$CHROOT" sh -c "${UPDATE_INITRAMFS_OPTIONS:-} update-initramfs -k all -t -u"
|
||||||
|
rm -rf "$CHROOT"/etc/initramfs-tools/conf.d/livecd-rootfs.conf
|
||||||
|
# Then bits of lb_binary_linux-image:
|
||||||
|
case "${LB_INITRAMFS}" in
|
||||||
|
casper)
|
||||||
|
DESTDIR="binary/casper"
|
||||||
|
;;
|
||||||
|
|
||||||
|
live-boot)
|
||||||
|
DESTDIR="binary/live"
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
DESTDIR="binary/boot"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
mv "$CHROOT"/boot/initrd.img-* $DESTDIR
|
||||||
|
}
|
||||||
|
@ -22,6 +22,7 @@ if [ -n "$SUBARCH" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
. config/functions
|
. config/functions
|
||||||
|
. config/common
|
||||||
|
|
||||||
SQUASH_ROOT=binary/boot/squashfs.dir
|
SQUASH_ROOT=binary/boot/squashfs.dir
|
||||||
OVERLAY_ROOT=binary/overlay
|
OVERLAY_ROOT=binary/overlay
|
||||||
@ -50,8 +51,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
|
chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper
|
||||||
chroot $SQUASH_ROOT apt-get -y install curtin
|
|
||||||
|
# Installing casper means we need a new initramfs
|
||||||
|
UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs $SQUASH_ROOT
|
||||||
|
|
||||||
# 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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user