Merge lp:~mwhudson/livecd-rootfs/lp-1743643 into lp:livecd-rootfs

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: 1644
Proposed branch: lp:~mwhudson/livecd-rootfs/lp-1743643
Merge into: lp:livecd-rootfs
Diff against target: 28 lines (+11/-0)
2 files modified
debian/changelog (+7/-0)
live-build/ubuntu-server/hooks/032-installer-squashfs.binary (+4/-0)
To merge this branch: bzr merge lp:~mwhudson/livecd-rootfs/lp-1743643
Reviewer Review Type Date Requested Status
Steve Langasek Approve
Review via email: mp+341440@code.launchpad.net

Description of the change

This is obviously vile but is it too vile? See https://bugs.launchpad.net/subiquity/+bug/1743643

To post a comment you must log in.
Revision history for this message
Ryan Harper (raharper) wrote :

I'm +1 on this;

It could be useful to examine the original use-case for this feature; but generally it seems like a bad idea; if you don't have enough memory to run the live environment, swapping isn't going to give you a great experience and certainly going to cause issues when we swapoff and then trigger OOM.

Revision history for this message
Steve Langasek (vorlon) wrote :

Discussed with Michael on IRC various options that might be "cleaner" than removing a file belonging to a package, and none of them are so clean that I care to stand on ceremony - considering this bit of the casper code will only successfully run once at image build time, and the casper package will never be upgraded within the installer squashfs. +1.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-03-15 01:10:02 +0000
3+++ debian/changelog 2018-03-15 07:28:30 +0000
4@@ -1,3 +1,10 @@
5+livecd-rootfs (2.511) UNRELEASED; urgency=medium
6+
7+ * In the live-server build, prevent casper from mounting any existing swap
8+ partitions from drives we might later be installing to.
9+
10+ -- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 15 Mar 2018 20:23:27 +1300
11+
12 livecd-rootfs (2.510) bionic; urgency=medium
13
14 * Rename the directory containing the systemd override file for subiquity to
15
16=== modified file 'live-build/ubuntu-server/hooks/032-installer-squashfs.binary'
17--- live-build/ubuntu-server/hooks/032-installer-squashfs.binary 2018-02-23 01:58:03 +0000
18+++ live-build/ubuntu-server/hooks/032-installer-squashfs.binary 2018-03-15 07:28:30 +0000
19@@ -53,6 +53,10 @@
20 chroot $SQUASH_ROOT apt-get update
21 chroot $SQUASH_ROOT apt-get -y install user-setup curtin lupin-casper
22
23+# For bug #1743643 "Install to dirty disk with swap fails" remove the
24+# "helpful" casper script that mounts any swap partitions it finds.
25+rm -f $SQUASH_ROOT/usr/share/initramfs-tools/scripts/casper-bottom/*swap
26+
27 # Installing casper means we need a new initramfs
28 UPDATE_INITRAMFS_OPTIONS=CASPER_GENERATE_UUID=1 recreate_initramfs $SQUASH_ROOT
29

Subscribers

People subscribed via source and target branches