I'm using Ubuntu 16.04 LTS Server in a VM with one unencrypted hard disk for
/ and an additional LUKS-encrypted one for some arbitrary data. The encrypted disk is opened and mounted with a password manually at the shell after the system has bootet properly and I logged in. This works as expected.
The problem is that systemd is trying to do something with this encrypted drive during boot already, fails, runs into timeouts and moves forward afterwards, which costs more than a minute of boot time.
In former versions of Ubuntu it automatically asked for a key to unlock the drive, but this didn't work properly anymore for UB 14.04 already and doesn't now as well. systemd is not printing any text that I should input a password, there's no prompt or else. It just recognizes errors in something it wants to do and continues after some time.
What I don't understand is what the problem actually is and why systemd wants to do anything at all, even if it doesn't prompt for a password or such. It would be great if someone could put me in the right direction on either how I can get systemd to properly prompt for a password or get it to not do what it does with my device at all. Not sure what I prefer currently. ;-)
The error systemd prints:
May 1 01:28:23 example.org systemd: dev-disk-by\x2duuid-7d39d2ed\x2df91f\x2d456e\x2daa31\x2d851cfe48de1b.device: Job dev-disk-by\x2duuid-7d39d2ed\x2df91f\x2d456e\x2daa31\x2d851cfe48de1b.device/start timed out. May 1 01:28:23 example.org systemd: Timed out waiting for device dev-disk-by\x2duuid-7d39d2ed\x2df91f\x2d456e\x2daa31\x2d851cfe48de1b.device. May 1 01:28:23 example.org systemd: Dependency failed for Cryptography Setup for mnt_luks_crypt. May 1 01:28:23 example.org systemd: Dependency failed for dev-mapper-mnt_luks_crypt.device. May 1 01:28:23 example.org systemd: dev-mapper-mnt_luks_crypt.device: Job dev-mapper-mnt_luks_crypt.device/start failed with result 'dependency'. May 1 01:28:23 example.org systemd: systemd-cryptsetup@mnt_luks_crypt.service: Job systemd-cryptsetup@mnt_luks_crypt.service/start failed with result 'dependency'. May 1 01:28:23 example.org systemd: dev-disk-by\x2duuid-7d39d2ed\x2df91f\x2d456e\x2daa31\x2d851cfe48de1b.device: Job dev-disk-by\x2duuid-7d39d2ed\x2df91f\x2d456e\x2daa31\x2d851cfe48de1b.device/start failed with result 'timeout'.
It tells something about failed dependencies, but I don't see anywhere what those are. Of course I didn't configure systemd itself to do anything with this device. The only thing I did was adding an entry in
/etc/fstab like the following:
/dev/mapper/mnt_luks_crypt /mnt/luks ext4 errors=remount-ro,noauto 0 2
I know that systemd processes those, but from what I've read in the docs it should honor
noauto as well. So is there simply something wrong with my options?
Didn't try yet, but I guess I could workaround the long waiting time using the following two options:
Or is there some way to disable
automount for that line altogether?
x-systemd.automount seems to be a flag only, nothing regarding