More info from the source code of systemd-cryptsetup:

 else if (streq(option, "luks"))
                arg_type = CRYPT_LUKS1;
...
 } else if (STR_IN_SET(option, "plain", "swap", "tmp"))
                arg_type = CRYPT_PLAIN;


so the swap argument overwrites the luks argument and resets the ecryption type 
to plain. 


And indeed, when using

/lib/systemd/systemd-cryptsetup attach sda2_crypt /dev/sda2 none
swap,luks,discard


(i.e. just change the order of the parameters,  use   swap,luks,discard   
instead of  luks, swap, discard , as the ubuntu installer creates, it works and 
uses the luks partition correctly.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1506139

Title:
  15.10beta crashes encrypted swap partition

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1506139/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to