From 26753602fee86a0dd576568b5ba9552e05341af5 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 12 Dec 2017 23:29:59 +1300 Subject: [PATCH 01/16] Move casper from filesystem.squashfs to installer.squashfs. --- debian/changelog | 6 ++++++ live-build/auto/config | 4 +++- .../ubuntu-server/hooks/032-installer-squashfs.binary | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 26cf864e..6314a75e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.488~ppa1) bionic; urgency=medium + + * Move casper from filesystem.squashfs to installer.squashfs. + + -- Michael Hudson-Doyle Tue, 12 Dec 2017 10:55:10 +1300 + livecd-rootfs (2.487) bionic; urgency=medium * Drop android-tools-fsutils dependency, and instead install it on diff --git a/live-build/auto/config b/live-build/auto/config index 4f3304b2..48be4ca0 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -143,7 +143,9 @@ case $IMAGEFORMAT in INITRAMFS_TYPE=none case $PROJECT:${SUBPROJECT:-} in ubuntu-server:live) - add_package live lupin-casper + # Hack to stop lb installing casper into filesystem.squashfs + mkdir -p .build + touch .build/chroot_live-packages INITRAMFS_TYPE=auto ;; *) diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 87c743dd..83df629e 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -39,6 +39,7 @@ setup_mountpoint binary/boot/squashfs.dir # to see on the installed system chroot $SQUASH_ROOT apt-get update chroot $SQUASH_ROOT apt-get -y install user-setup +chroot $SQUASH_ROOT apt-get -y install lupin-casper chroot $SQUASH_ROOT apt-get -y install curtin # Don't let cloud-init run in the live session. From 6ddf832b20eec1ba6107208f87317f51aafe7368 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 13 Dec 2017 10:07:14 +1300 Subject: [PATCH 02/16] slimy hack to get a casper-ized initrd in place --- debian/changelog | 2 +- live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6314a75e..4776a030 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.488~ppa1) bionic; urgency=medium +livecd-rootfs (2.488~ppa2) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 83df629e..bbf8f09c 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -40,8 +40,12 @@ setup_mountpoint binary/boot/squashfs.dir chroot $SQUASH_ROOT apt-get update chroot $SQUASH_ROOT apt-get -y install user-setup chroot $SQUASH_ROOT apt-get -y install lupin-casper + +mv $SQUASH_ROOT/boot/initrd.img-* livecd.ubuntu-server.initrd-generic + chroot $SQUASH_ROOT apt-get -y install curtin + # Don't let cloud-init run in the live session. touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled From b913dcdf1c411491489becbe3089ed9c9b7c5737 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 13 Dec 2017 15:42:37 +1300 Subject: [PATCH 03/16] gen the initramfs with the right options and repack it with lzma --- debian/changelog | 2 +- .../ubuntu-server/hooks/032-installer-squashfs.binary | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4776a030..8cca7e75 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.488~ppa2) bionic; urgency=medium +livecd-rootfs (2.488~ppa4) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index bbf8f09c..f87fe5e8 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -41,7 +41,16 @@ chroot $SQUASH_ROOT apt-get update chroot $SQUASH_ROOT apt-get -y install user-setup chroot $SQUASH_ROOT apt-get -y install lupin-casper -mv $SQUASH_ROOT/boot/initrd.img-* livecd.ubuntu-server.initrd-generic +# Installing lupin-casper means we need a new initramfs, so we +# cargo cult stuff from lb_chroot_hacks: +chroot $SQUASH_ROOT CASPER_GENERATE_UUID=1 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 From 0113b9aad780af30df2f667a886b5e4e2a2db96e Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 13 Dec 2017 16:13:14 +1300 Subject: [PATCH 04/16] self-review --- debian/changelog | 2 +- live-build/auto/config | 2 ++ live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8cca7e75..6b66e3d8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.488~ppa4) bionic; urgency=medium +livecd-rootfs (2.488~ppa5) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/auto/config b/live-build/auto/config index 48be4ca0..2b542ace 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -144,6 +144,8 @@ case $IMAGEFORMAT in case $PROJECT:${SUBPROJECT:-} in ubuntu-server:live) # Hack to stop lb installing casper into filesystem.squashfs + # (It's manually installed into installer.sqashfs in + # 032-installer-squashfs.binary) mkdir -p .build touch .build/chroot_live-packages INITRAMFS_TYPE=auto diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index f87fe5e8..e5e94ed4 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -54,7 +54,6 @@ mv $SQUASH_ROOT/boot/initrd.img-* binary/casper/ chroot $SQUASH_ROOT apt-get -y install curtin - # Don't let cloud-init run in the live session. touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled From 8c8b16b5e6c63de7d8c175e4c3b1779b1e371fd9 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 13 Dec 2017 19:27:37 +1300 Subject: [PATCH 05/16] sigh --- live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index e5e94ed4..a6bc08a1 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -43,7 +43,7 @@ chroot $SQUASH_ROOT apt-get -y install lupin-casper # Installing lupin-casper means we need a new initramfs, so we # cargo cult stuff from lb_chroot_hacks: -chroot $SQUASH_ROOT CASPER_GENERATE_UUID=1 update-initramfs -k all -t -u +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}" From 3ecbd2802e4c44fa51923655f33bb972894e267c Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 13 Dec 2017 22:32:22 +1300 Subject: [PATCH 06/16] tweaks before review --- debian/changelog | 2 +- live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6b66e3d8..3b959a69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.488~ppa5) bionic; urgency=medium +livecd-rootfs (2.488) UNRELEASED; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index a6bc08a1..ce66d209 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -50,7 +50,7 @@ for INITRAMFS in $(find $SQUASH_ROOT/boot -name 'initrd*' -not -type l); do done # and lb_binary_linux-image: mv $SQUASH_ROOT/boot/initrd.img-* binary/casper/ -# To replace the previously built one with it. +# to replace the previously built one with it. chroot $SQUASH_ROOT apt-get -y install curtin From a7e7ee9154d48d8ae59366ac91a67b0d70db22af Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 22 Feb 2018 13:59:18 +1300 Subject: [PATCH 07/16] fix mis-merge --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 169870c5..14f736b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -124,7 +124,7 @@ livecd-rootfs (2.488) bionic; urgency=medium * Enable systemd-networkd by default for live-server installs. - -- Michael Hudson-Doyle Tue, 12 Dec 2017 10:55:10 +1300 + -- Michael Hudson-Doyle Thu, 04 Jan 2018 09:36:56 +1300 livecd-rootfs (2.487) bionic; urgency=medium From c85cae9bfe419f2ff0dbded92bbebda356ba6557 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 09:18:33 +1300 Subject: [PATCH 08/16] respond to some review feedback --- debian/changelog | 2 +- live-build/auto/config | 8 +++----- live-build/functions | 6 ++++++ .../ubuntu-server/hooks/032-installer-squashfs.binary | 3 +-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index 14f736b1..8e1030e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.505) UNRELEASED; urgency=medium +livecd-rootfs (2.505~ppa1) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/auto/config b/live-build/auto/config index 1c762def..d97b0517 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -141,11 +141,9 @@ case $IMAGEFORMAT in INITRAMFS_TYPE=none case $PROJECT:${SUBPROJECT:-} in ubuntu-server:live) - # Hack to stop lb installing casper into filesystem.squashfs - # (It's manually installed into installer.sqashfs in - # 032-installer-squashfs.binary) - mkdir -p .build - touch .build/chroot_live-packages + # Stop lp installing casper into filesystem.squashfs + # by skipping lb_chroot_live-packages. + skip_lb_stage chroot_live-packages INITRAMFS_TYPE=auto ;; *) diff --git a/live-build/functions b/live-build/functions index 04397fdb..e5eeedaf 100644 --- a/live-build/functions +++ b/live-build/functions @@ -329,3 +329,9 @@ undivert_grub() { chroot "$CHROOT_ROOT" dpkg-divert --remove --local \ --rename /usr/bin/systemd-detect-virt } + +skip_lb_stage() { + STAGE="$1" + mkdir -p .build + touch ".build/$STAGE" +} diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index ce1a6cb1..47110bb3 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -50,8 +50,7 @@ EOF # Install any requirements for the installer, for things we don't want # to see on the installed system chroot $SQUASH_ROOT apt-get update -chroot $SQUASH_ROOT apt-get -y install user-setup -chroot $SQUASH_ROOT apt-get -y install lupin-casper +chroot $SQUASH_ROOT apt-get -y install user-setup lupin-casper # Installing lupin-casper means we need a new initramfs, so we # cargo cult stuff from lb_chroot_hacks: From 416ef912ed33fb906f5000bace6056d8c597a072 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 09:30:29 +1300 Subject: [PATCH 09/16] make another possibly more generally useful function --- live-build/functions | 47 +++++++++++++++++++ .../hooks/032-installer-squashfs.binary | 18 ++----- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/live-build/functions b/live-build/functions index e5eeedaf..82365df6 100644 --- a/live-build/functions +++ b/live-build/functions @@ -335,3 +335,50 @@ skip_lb_stage() { mkdir -p .build touch ".build/$STAGE" } + +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... + CHROOT="$1" + # Start by cargo culting bits of lb_chroot_hacks: + chroot "$CHROOT" sh -c "${UPDATE_INITRAMFS_OPTIONS:-} update-initramfs -k all -t -u" + case "${LB_INITRAMFS_COMPRESSION}" in + gzip) + ;; + + bzip2) + for INITRAMFS in $(find "$CHROOT"/boot -name 'initrd*' -not -type l); do + zcat "${INITRAMFS}" | bzip2 -c ${BZIP2_OPTIONS} > "${INITRAMFS}.new" + mv "${INITRAMFS}.new" "${INITRAMFS}" + done + ;; + + lzma) + # We probably ought to use COMPRESS= in a temporary file in + # /etc/initramfs-tools/conf.d/ instead, but it's hard to + # pass options that way. + for INITRAMFS in $(find "$CHROOT"/boot -name 'initrd*' -not -type l); do + zcat "${INITRAMFS}" | lzma -c ${LZMA_OPTIONS} > "${INITRAMFS}.new" + mv "${INITRAMFS}.new" "${INITRAMFS}" + done + ;; + esac + # 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 +} diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 47110bb3..97572684 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -50,20 +50,10 @@ EOF # Install any requirements for the installer, for things we don't want # to see on the installed system chroot $SQUASH_ROOT apt-get update -chroot $SQUASH_ROOT apt-get -y install user-setup lupin-casper - -# Installing lupin-casper means we need a new initramfs, so we -# cargo cult stuff from lb_chroot_hacks: -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 +chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper + +# Installing casper means we need a new initramfs +UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs # Don't let cloud-init run in the live session. touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled From 4b66f89e56494dc0d7af1f32db7b9cae3e3977ac Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 09:37:51 +1300 Subject: [PATCH 10/16] move skip_lb_stage to config --- debian/changelog | 2 +- live-build/auto/config | 6 ++++++ live-build/functions | 6 ------ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8e1030e3..8190d822 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.505~ppa1) bionic; urgency=medium +livecd-rootfs (2.505~ppa2) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/auto/config b/live-build/auto/config index d97b0517..e0e06c88 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -116,6 +116,12 @@ if [ -z "${IMAGEFORMAT:-}" ]; then esac fi +skip_lb_stage() { + STAGE="$1" + mkdir -p .build + touch ".build/$STAGE" +} + case $IMAGEFORMAT in ext2|ext3|ext4) OPTS="${OPTS:+$OPTS }--initramfs none --chroot-filesystem $IMAGEFORMAT" diff --git a/live-build/functions b/live-build/functions index 82365df6..09edef12 100644 --- a/live-build/functions +++ b/live-build/functions @@ -330,12 +330,6 @@ undivert_grub() { --rename /usr/bin/systemd-detect-virt } -skip_lb_stage() { - STAGE="$1" - mkdir -p .build - touch ".build/$STAGE" -} - recreate_initramfs() { # Regenerate the initramfs by running update-initramfs in the # chroot at $1 and copying the generated initramfs From b163743456723606e56202bc7353b36d81eb0e37 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 09:41:50 +1300 Subject: [PATCH 11/16] call recreate_initramfs with the argument it needs --- debian/changelog | 2 +- live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8190d822..8a7104dd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.505~ppa2) bionic; urgency=medium +livecd-rootfs (2.505~ppa3) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 97572684..2b385a03 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -53,7 +53,7 @@ chroot $SQUASH_ROOT apt-get update chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper # Installing casper means we need a new initramfs -UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs +UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs $SQUASH_ROOT # Don't let cloud-init run in the live session. touch $SQUASH_ROOT/etc/cloud/cloud-init.disabled From 3e69d30c9e7fa646ac5e50bf531c83437f45e345 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 09:52:26 +1300 Subject: [PATCH 12/16] remove some of the cargo culted scorpions --- debian/changelog | 2 +- live-build/functions | 25 ++++--------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8a7104dd..57fe6ee4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.505~ppa3) bionic; urgency=medium +livecd-rootfs (2.505~ppa4) bionic; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. diff --git a/live-build/functions b/live-build/functions index 09edef12..c31d306f 100644 --- a/live-build/functions +++ b/live-build/functions @@ -338,28 +338,11 @@ recreate_initramfs() { # tweaking... 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" - case "${LB_INITRAMFS_COMPRESSION}" in - gzip) - ;; - - bzip2) - for INITRAMFS in $(find "$CHROOT"/boot -name 'initrd*' -not -type l); do - zcat "${INITRAMFS}" | bzip2 -c ${BZIP2_OPTIONS} > "${INITRAMFS}.new" - mv "${INITRAMFS}.new" "${INITRAMFS}" - done - ;; - - lzma) - # We probably ought to use COMPRESS= in a temporary file in - # /etc/initramfs-tools/conf.d/ instead, but it's hard to - # pass options that way. - for INITRAMFS in $(find "$CHROOT"/boot -name 'initrd*' -not -type l); do - zcat "${INITRAMFS}" | lzma -c ${LZMA_OPTIONS} > "${INITRAMFS}.new" - mv "${INITRAMFS}.new" "${INITRAMFS}" - done - ;; - esac + rm -rf "$CHROOT"/etc/initramfs-tools/conf.d/livecd-rootfs.conf # Then bits of lb_binary_linux-image: case "${LB_INITRAMFS}" in casper) From 27eaa9328a0bc54c8cb2d21a07a7425e34af8100 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 13:38:15 +1300 Subject: [PATCH 13/16] source config/binary in 032-installer-squashfs.binary --- live-build/functions | 1 + live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 1 + 2 files changed, 2 insertions(+) diff --git a/live-build/functions b/live-build/functions index c31d306f..93d4a0dc 100644 --- a/live-build/functions +++ b/live-build/functions @@ -336,6 +336,7 @@ recreate_initramfs() { # around. Beware that this was written for a single use case # (live-server) and may not work in all cases without # tweaking... + # config/binary must be sourced before calling this function. CHROOT="$1" # Start by cargo culting bits of lb_chroot_hacks: if [ -n "$LB_INITRAMFS_COMPRESSION" ]; then diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index 2b385a03..f92976ad 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -22,6 +22,7 @@ if [ -n "$SUBARCH" ]; then fi . config/functions +. config/binary SQUASH_ROOT=binary/boot/squashfs.dir OVERLAY_ROOT=binary/overlay From adcd8928fc427d00d924605b654621b572bd7348 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 13:41:00 +1300 Subject: [PATCH 14/16] clean up changelog --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 57fe6ee4..23f8ff31 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,8 @@ -livecd-rootfs (2.505~ppa4) bionic; urgency=medium +livecd-rootfs (2.505) UNRELEASED; urgency=medium * Move casper from filesystem.squashfs to installer.squashfs. - -- Michael Hudson-Doyle Thu, 22 Feb 2018 13:57:35 +1300 + -- Michael Hudson-Doyle Fri, 23 Feb 2018 13:40:35 +1300 livecd-rootfs (2.504) bionic; urgency=medium From 4407aaf1aeb767860c07a55279d3375b855c3ce8 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 14:58:03 +1300 Subject: [PATCH 15/16] it is config/common, not config/binary, grr --- live-build/functions | 2 +- live-build/ubuntu-server/hooks/032-installer-squashfs.binary | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/live-build/functions b/live-build/functions index 93d4a0dc..239169ad 100644 --- a/live-build/functions +++ b/live-build/functions @@ -336,7 +336,7 @@ recreate_initramfs() { # around. Beware that this was written for a single use case # (live-server) and may not work in all cases without # tweaking... - # config/binary must be sourced before calling this function. + # 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 diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index f92976ad..a0b77a20 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -22,7 +22,7 @@ if [ -n "$SUBARCH" ]; then fi . config/functions -. config/binary +. config/common SQUASH_ROOT=binary/boot/squashfs.dir OVERLAY_ROOT=binary/overlay From 57200eaa01005bf2453f2e0a86aa93928aff97eb Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Fri, 23 Feb 2018 16:53:20 +1300 Subject: [PATCH 16/16] tyop --- live-build/auto/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index e0e06c88..a94fd990 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -147,7 +147,7 @@ case $IMAGEFORMAT in INITRAMFS_TYPE=none case $PROJECT:${SUBPROJECT:-} in ubuntu-server:live) - # Stop lp installing casper into filesystem.squashfs + # Stop lb installing casper into filesystem.squashfs # by skipping lb_chroot_live-packages. skip_lb_stage chroot_live-packages INITRAMFS_TYPE=auto