From 8ece245153da9fa0562946c15634d2fe5048fe2e Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 15 Mar 2018 20:26:00 +1300 Subject: [PATCH] In the live-server build, prevent casper from mounting any existing swap partitions from drives we might later be installing to. --- debian/changelog | 7 +++++++ .../ubuntu-server/hooks/032-installer-squashfs.binary | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4a922a40..42d45fc3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.511) UNRELEASED; urgency=medium + + * In the live-server build, prevent casper from mounting any existing swap + partitions from drives we might later be installing to. + + -- Michael Hudson-Doyle Thu, 15 Mar 2018 20:23:27 +1300 + livecd-rootfs (2.510) bionic; urgency=medium * Rename the directory containing the systemd override file for subiquity to diff --git a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary index a0b77a20..bab6ab76 100755 --- a/live-build/ubuntu-server/hooks/032-installer-squashfs.binary +++ b/live-build/ubuntu-server/hooks/032-installer-squashfs.binary @@ -53,6 +53,10 @@ EOF chroot $SQUASH_ROOT apt-get update chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper +# For bug #1743643 "Install to dirty disk with swap fails" remove the +# "helpful" casper script that mounts any swap partitions it finds. +rm -f $SQUASH_ROOT/usr/share/initramfs-tools/scripts/casper-bottom/*swap + # Installing casper means we need a new initramfs UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs $SQUASH_ROOT