You are not logged in.

#1 2021-04-02 20:35:41

smnpl
Member
From: Germany
Registered: 2015-01-07
Posts: 54

[SOLVED] Encrypted drives fail to decrypt on boot

Hi,

today suddenly after a reboot I do have issues which I am not able to resolve after trying for a while.
Somehow my encrypted drives cannot be decrypted on boot via crypttab and fstab. The also encrypted root partition gets decrypted and booted fine by systemdboot.
Not sure if I made an pacman update since the last reboot but that would be the only thing that changed in the system.

In /etc/crypttab I have this (among others)
cryptoData     UUID=9b397f3a-39e5-4024-86f8-10496b9dac    /path/to/keyfile   luks,timeout=30

and /etc/fstab
/dev/mapper/cryptoData   /media/backupData   ext4    defaults    0   2

Now when booting I'm getting stuck when trying to decrypt the disk with these messages and landing in emergency mode:
[FAILED] Failed to start Cryptography Setup for cryptoData.
[DEPEND] Dependency failed for /dev/mapper/cryptoData.
....


Journalctl shows this:
systemd-cryptsetup[814]: Failed to activate with key file '/path/to/keyfile': Invalid argument
systemd[1]: Failed to start Cryptography Setup for cryptoBackup.

The encrypted root partition with key file on USB still works fine as said and when I comment out the crypttab and fstab entries I can boot without problems and manually decrypt and mount the drive without any issue as well... Any idea what is going on there?

Best regards
Simon

Last edited by smnpl (2021-04-03 21:13:33)


The road to wisdom? - Well, it's plain and simple to express: Err and err and err again but less and less and less. - Piet Hein -

Offline

#2 2021-04-03 04:58:56

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED] Encrypted drives fail to decrypt on boot

Does “/path/to/keyfile” actually exist?
I don’t believe this worked before if it was always like that.

iirc it must be none so you can input the password.

Last edited by GaKu999 (2021-04-03 04:59:17)


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2021-04-03 06:00:24

smnpl
Member
From: Germany
Registered: 2015-01-07
Posts: 54

Re: [SOLVED] Encrypted drives fail to decrypt on boot

Yeah it exists. Of course not in that location, I just abbreviated it for the post here.


The road to wisdom? - Well, it's plain and simple to express: Err and err and err again but less and less and less. - Piet Hein -

Offline

#4 2021-04-03 19:10:51

xgjmibzr
Member
Registered: 2021-04-03
Posts: 2

Re: [SOLVED] Encrypted drives fail to decrypt on boot

Bug in systemd-248.1  https://bugs.archlinux.org/task/70272

Downgrade to systemd-247.4-2

Offline

#5 2021-04-03 21:13:02

smnpl
Member
From: Germany
Registered: 2015-01-07
Posts: 54

Re: [SOLVED] Encrypted drives fail to decrypt on boot

Brilliant, thanks!


The road to wisdom? - Well, it's plain and simple to express: Err and err and err again but less and less and less. - Piet Hein -

Offline

Board footer

Powered by FluxBB