Ubuntu: upon reboot, forever waiting for encrypted swapfile ...
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
### Issue description
When restarting my machine, cryptsetup waits forever. Waiting for the swapfile. Unable to start Ubuntu at all. Error message is:
```
cryptsetup: Waiting for encrypted source device /swapfile...
```
### Steps for reproducing the issue
1. Do a fresh installation of Ubuntu, unencrypted.
2. Later, due to restrictions at work, encrypt Ubuntu POST installation accordingly to this article: https:/
3. Reboot, all works fine, but ...
4. Later, after a couple of months, install a new Linux kernel and then ...
5. Upon boot cryptsetup gets stuck, waits forever. See attached photo.
### Additional info
I've found a temporary, painful workaround by rebooting in recovery mode and running this command every time:
```
sudo update-initramfs -u -k all
```
Then I can boot again. But I have to do this every time. Why?
### Debug log
Hard to say but here's the output of this command `journalctl | grep crypt`, not sure if you can find anything interesting about it:
```
Apr 21 13:48:28 M1 audit[179547]: AVC apparmor="DENIED" operation="getattr" class="file" info="Failed name lookup - disconnected path" error=-13 profile=
Apr 21 17:01:49 M1 gdm-password]
Apr 21 17:26:59 M1 systemd[1]: Requested transaction contradicts existing jobs: Transaction for plymouth-
Apr 21 17:26:59 M1 systemd[1]: gdm.service: Failed to enqueue OnFailure= job, ignoring: Transaction for plymouth-
Apr 21 17:26:59 M1 systemd[3094]: Stopping GnuPG cryptographic agent and passphrase cache...
Apr 21 17:27:00 M1 systemd[3094]: Stopped GnuPG cryptographic agent and passphrase cache.
Apr 21 17:27:07 M1 systemd[1]: Stopped target Local Encrypted Volumes.
Apr 21 17:27:08 M1 umount.
Apr 21 17:27:08 M1 umount.
Apr 21 17:27:09 M1 systemd[1]: Deactivating swap /dev/disk/
Apr 21 17:27:09 M1 systemd[1]: dev-disk-
Apr 21 17:27:09 M1 systemd[1]: Deactivated swap /dev/disk/
```
Do you have any tips, advice please, how to fix this, how can I reboot my machine without running `update-initramfs` every time? Thanks!
Changed in systemd (Ubuntu): | |
status: | Incomplete → Invalid |
I've initially reported this bug there https:/ /gitlab. com/cryptsetup/ cryptsetup/ -/issues/ 811#note_ 1361818938
But got recommended posting it here instead.
There, Milan Broz added following:
"My guess here is that /etc/crypttab is missing something about cryptswap device, but we cannot do anything with these problems in the upstream cryptsetup project (also, Debian/Ubuntu specific cryptsetup tools are not even maintained upstream."