Failed to start Cryptography Setup for cryptswap1

Bug #1731870 reported by Joseph Borg on 2017-11-13
78
This bug affects 16 people
Affects Status Importance Assigned to Milestone
systemd
New
Undecided
Unassigned
systemd (Ubuntu)
Undecided
Unassigned

Bug Description

Fresh install of 17.10. On first boot, after install, there were no issues; the desktop booted fine. I then ran an `apt upgrade`, set my home encryption passphrase and rebooted. Now, after typing my password, rather than Gnome starting, I get systemd errors:

Failed to start Cryptography Setup for cryptswap1
Dependency failed for dev-mapper-cryptswap1.device
Dependency failed for /dev/mapper/cryptswap1

If I wait long enough, I get the gdm3 login window again. If I try to log in after this, I get the Gnome desktop without any issue.

Joseph Borg (joeborg) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cryptsetup (Ubuntu):
status: New → Confirmed
tags: added: artful
Max Markmanrud (max-markmanrud) wrote :

After many flashes of the screen and ~10 minutes of waiting, I gave up. No login window for me. Is there a workaround?

Note: I had just enabled proprietary Nvidia drivers prior to reboot

Andrea (tulimiero-andrea) wrote :

The same issue for me, and it showed up as well after installing Nvidia drivers

Antti K (alketola) wrote :

Me too having this issue; on MSI GV62 7RE with i7-7700HQ, 8GB RAM, GTX 1050 ti, Crucial SSD (275GB M.2 SATA) + 1 TB rotating HD.

Problem occurred after installation of Nvidia drivers (propably 384), after that the boot stuck in a loop, alternating black and the boot log shown in attachment.

Previously booted to Ubuntu 17.10, but 3D graphics seemed to be out on vanilla Nouveau (e.g. OpenArena crashed upon game start)

Jud Taylor (dagmarprime) wrote :

New U 17.10 on Lenovo X230.

Bootlog contains

[FAILED] Failed to start Cryptography Setup for cryptswap1.
See 'systemctl status <email address hidden>' for details.

$ systemctl status <email address hidden>

shows

● <email address hidden> - Cryptography Setup for cryptswap1
   Loaded: loaded (/etc/crypttab; generated; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2017-12-29 17:03:26 EST; 32min ago
     Docs: man:crypttab(5)
           man:systemd-cryptsetup-generator(8)
           man:systemd-cryptsetup@.service(8)
  Process: 5647 ExecStart=/lib/systemd/systemd-cryptsetup attach cryptswap1 /target/swapfile /dev/urandom swap,offset=1024,cipher=aes-xts-p
 Main PID: 5647 (code=exited, status=1/FAILURE)

Dec 29 17:03:26 gt-ThinkPad-X230 systemd[1]: Starting Cryptography Setup for cryptswap1...
Dec 29 17:03:26 gt-ThinkPad-X230 systemd-cryptsetup[5647]: crypt_init() failed: Block device required
Dec 29 17:03:26 gt-ThinkPad-X230 systemd[1]: <email address hidden>: Main process exited, code=exited, status=1/FAILURE
Dec 29 17:03:26 gt-ThinkPad-X230 systemd[1]: Failed to start Cryptography Setup for cryptswap1.
Dec 29 17:03:26 gt-ThinkPad-X230 systemd[1]: <email address hidden>: Unit entered failed state.
Dec 29 17:03:26 gt-ThinkPad-X230 systemd[1]: <email address hidden>: Failed with result 'exit-code'.

Help me, Obiwan...

Steve Langasek (vorlon) wrote :

This appears to be a bug in the systemd cryptsetup helper, which has a constraint requiring a block device where no such constraint exists in cryptsetup itself. Since Ubuntu 17.10 now uses swap files by default instead of swap partitions, this will fail.

affects: cryptsetup (Ubuntu) → systemd (Ubuntu)
rubo77 (rubo77) wrote :

I had the same problem on Ubuntu 17.10 after installing bumblebee-nvidia.

I fixed it by commenting out the cryptswap1 partition in fstab and /etc/crypttab

see: https://askubuntu.com/a/997339/34298

Carsten Fuchs (carsten78) wrote :

@rubo77:
why not as described at https://bugs.launchpad.net/ecryptfs/+bug/1670336, comments #21 and #23?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers