ecryptfs install does not initialize cryptswap partition
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| cryptsetup (Ubuntu) |
Undecided
|
Unassigned | |||
Bug Description
My system boots almost instantly with upstart. Today i tried booting with systemd via the additional grub option.
However, with systemd it takes really long to boot but – so long that i forced a reboot once because i thought i got stuck.
Looking in to boot journal, i found the following error concerning the swap:
Mär 07 09:28:00 darw1n systemd[1]: dev-sda3.swap swap process exited, code=exited status=255
Mär 07 09:28:00 darw1n systemd[1]: Failed to activate swap Swap Partition.
Mär 07 09:28:00 darw1n systemd[1]: Unit dev-sda3.swap entered failed state.
And this concerning nvidia-persistenced
Mär 07 09:28:00 darw1n nvidia-
Mär 07 09:28:00 darw1n nvidia-
Mär 07 09:28:00 darw1n nvidia-
I checked that /dev/sda3 exists and is a swap partition and i check for the /dev/nvidia files:
$ ls -Alst /dev/nvidia0
0 crw-rw-rw- 1 root root 195, 0 Mär 7 09:29 /dev/nvidia0
However, the interesting part is here, where nothing seems to happen for a minute: (see the timestamps):
Mär 07 09:28:01 darw1n systemd[1]: Started LSB: AppArmor initialization.
Mär 07 09:28:31 darw1n systemd-
Mär 07 09:29:29 darw1n systemd[1]: Job dev-disk-
Mär 07 09:29:29 darw1n systemd-
Mär 07 09:29:29 darw1n systemd[1]: Timed out waiting for device dev-disk-
Mär 07 09:29:29 darw1n systemd[1]: Dependency failed for Cryptography Setup for cryptswap1.
Mär 07 09:29:29 darw1n systemd[1]: Dependency failed for dev-mapper-
Mär 07 09:29:29 darw1n systemd[1]: Dependency failed for /dev/mapper/
Mär 07 09:29:29 darw1n systemd[1]: Dependency failed for Swap.
Mär 07 09:29:29 darw1n systemd[1]: Job swap.target/start failed with result 'dependency'.
Mär 07 09:29:29 darw1n systemd[1]: Job dev-mapper-
Mär 07 09:29:29 darw1n systemd[1]: Job dev-mapper-
Mär 07 09:29:29 darw1n systemd[1]: Dependency failed for Encrypted Volumes.
Mär 07 09:29:29 darw1n systemd[1]: Job cryptsetup.
Mär 07 09:29:29 darw1n systemd[1]: Job <email address hidden>/start failed with result 'dependency'.
Mär 07 09:29:29 darw1n systemd[1]: Job dev-disk-
Mär 07 09:29:29 darw1n systemd[1]: Reached target System Initializatio
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 219-4ubuntu3
ProcVersionSign
Uname: Linux 3.16.0-30-generic x86_64
NonfreeKernelMo
ApportVersion: 2.16.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Sat Mar 7 09:31:09 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-02-05 (29 days ago)
InstallationMedia: Ubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140722.2)
MachineType: To Be Filled By O.E.M. To Be Filled By O.E.M.
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: systemd
UpgradeStatus: Upgraded to vivid on 2015-02-23 (11 days ago)
dmi.bios.date: 12/17/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: P1.60
dmi.board.name: H97 Performance
dmi.board.vendor: ASRock
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: To Be Filled By O.E.M.
dmi.product.
dmi.sys.vendor: To Be Filled By O.E.M.
| Benjamin Geese (ben-8409) wrote : | #1 |
| Martin Pitt (pitti) wrote : | #3 |
Can you please file a bug against nvidia-
| summary: |
- Systemd takes very long to boot with error in swap mounting and nvidia - persistenced + Systemd takes very long to boot with error in swap mounting |
| tags: | added: systemd-boot |
I have the same issue. Attaching my fstab and crypttab.
| Lars Karlitski (larsu) wrote : | #5 |
| Lars Karlitski (larsu) wrote : | #6 |
| Martin Pitt (pitti) wrote : | #7 |
How did you install this system? I selected the default "encrypted on LVM" option in ubiquity, but this creates a single encrypted PV with a single VG "ubuntu" that has two LVs, one for root and one for swap:
fstab:
/dev/mapper/
crypttab:
vda5_crypt UUID=66e69938-
That has been Ubuntu's standard LVM+cryptsetup layout forever, so apparently you did something else to get the randomized cryptswap partitions?
| summary: |
- Systemd takes very long to boot with error in swap mounting + cryptswap (with ecryptfs) configures invalid crypttag |
| summary: |
- cryptswap (with ecryptfs) configures invalid crypttag + cryptswap (with ecryptfs) configures invalid crypttab |
| Martin Pitt (pitti) wrote : | #8 |
This is reproducible with a default "use full disk" and "encrypt my home dir" installation. This produces that kind of crypttab which apparently never initializes the cryptswap partition. blkid -p on that partition is empty, there is no LUKS file system on it. I'm not sure about the role of UUID for a cryptswap device that gets initialized from /dev/urandom, but I figure there's supposed to be an outer LUKS wrapper around the "inner" swap partition?
This is broken under upstart as well, it's just that booting silently ignores the missing cryptswap partition and you have a system without any swap.
| summary: |
- cryptswap (with ecryptfs) configures invalid crypttab + ecryptfs install does not initialize cryptswap partition |
| Changed in systemd (Ubuntu): | |
| status: | Incomplete → Triaged |
| affects: | systemd (Ubuntu) → ubiquity (Ubuntu) |
| Changed in ubiquity (Ubuntu): | |
| importance: | Undecided → High |
| Changed in systemd (Ubuntu): | |
| status: | New → Triaged |
| Martin Pitt (pitti) wrote : | #9 |
Leaving a cryptsetup task, as somehow we need to clean up after that for existing installations. (This might end up in a different package too)
| affects: | systemd (Ubuntu) → cryptsetup (Ubuntu) |
| Benedikt (benedikt-klotz) wrote : | #10 |
hmm ... -> https:/
| no longer affects: | ubiquity (Ubuntu) |


You'll get the 90 second timeout with waiting for dev-disk- by\x2duuid- 0b93a0a2\ x2d115c\ x2d4a45\ x2d9075\ x2d5f31454c5a41 .device (which presumably is the one containing swap), then your system should boot without swap.
> Mär 07 09:28:00 darw1n swapon[418]: swapon: /dev/sda3: Swap-Header konnte nicht gelesen werden
This indicates that your /etc/fstab contains an invalid "swap" partition entry, as you now use an encrypted swap. Your udev database has no device with the above UUID, and /dev/sda3 has no file system on it at all, so it'll indeed wait for that in vain. It might be the UUID of the /dev/mapper/ cryptswap1 device.
Can you please attach your /etc/fstab and /etc/crypttab files? (They shouldn't contain keys, just the names of the key files; but please do have a look at them, and feel free to obfuscate anything which looks like a password/key with XXXXX or so).
Thanks!