17.10 installer has trouble with swap partitions

Bug #1726855 reported by Hadmut Danisch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
New
Undecided
Unassigned
ubiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi,

I just ran with both the graphical installer from 17.10 ubuntu desktop and the console installer from 17.10 lubuntu alternate into a problem, that I already had reported some time ago for an older release, but which has now become a more severe problem. Before, it occasionally kept ubuntu from booting, now it always keeps ubuntu from booting.

Problem:

I use that scheme to install machines with SSD:

/dev/sda1 small ext4 as /boot , not encrypted
/dev/sda2 luks-encrypted swap
/dev/sda3 luks-encrypted root (ext4 or btrfs)

both installers do create the swap partition, but do put the "swap" flag into /etc/crypttab. The system then fails to boot.

The reason is that systemd can't deal with that and tries to create a fresh plain or randomly generated swap partition, while at the same time trying to decrypt the device with the given UUID. While this former UUID as mentioned in /etc/crypttab does not exist anymore, systemd's task to create and mount that waits forever.

Simple solution: take the swap flag from /etc/crypttab and recreate the initramfs, without the swap flag systemd works well and just decrypts as expected, then attaches as a swap device without trying to recreated this.

That swap flag worked before the migration to systemd, and the installers still use it, although systemd can't properly cope with it.

Only with the graphical installer, I ran into another, related problem.

When I create these partitions as described and in the order above, the installer becomes unable to generate /dev/sda3. Reason: the installer creates /dev/sda2 as described. But then, systemd immediately finds this as a swap devices and uses it as a swap. After entering the configuration for sda3, the installer checks, finds an "unencrypted swap" (not sure whether the installer takes the encrypted as unencryptd or whether systemd again misinterpretes /etc/crypttab and randomly creates a plain swap in the raw device) and aborts with an error message before finishing /dev/sda3.

However, if I change the order and configure in the order sda1 sda3 sda2 , thinks work normally. It's because the installer then does not perform the check again after creating the swap.

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1726855/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Paul White (paulw2u)
affects: ubuntu → debian-installer (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.