You are not logged in.

#1 2021-04-02 13:05:54

Cthulu201
Member
Registered: 2014-12-28
Posts: 18

systemd-cryptsetup with external drive

I have an external drive that's LVM on LUKS which is automounted using a key file. After upgrading systemd yesterday it errors:

× systemd-cryptsetup@diskname.service - Cryptography Setup for diskname
     Loaded: loaded (/etc/crypttab; generated)
     Active: failed (Result: exit-code) since Fri 2021-04-02 08:45:12 EDT; 1min 27s ago
       Docs: man:crypttab(5)
             man:systemd-cryptsetup-generator(8)
             man:systemd-cryptsetup@.service(8)
    Process: 647 ExecStart=/usr/lib/systemd/systemd-cryptsetup attach diskname /dev/disk/by-uuid/drive_blkid /home/username/.keydir/diskname.key1 luks (code=exited, status=1/FAILURE)
   Main PID: 647 (code=exited, status=1/FAILURE)
        CPU: 7ms

Apr 02 08:45:12 hostname systemd[1]: Starting Cryptography Setup for diskname...
Apr 02 08:45:12 hostname systemd[1]: systemd-cryptsetup@diskname.service: Main process exited, code=exited, status=1/FAILURE
Apr 02 08:45:12 hostname systemd[1]: systemd-cryptsetup@diskname.service: Failed with result 'exit-code'.
Apr 02 08:45:12 hostname systemd[1]: Failed to start Cryptography Setup for diskname.

After logging in, cryptsetup luksOpen /dev/sda$ mapper_name --key-file works and I can manually mount it. Also, systemd-cryptsetup@diskname.service status is active. I haven't tried downgrading.

Sidenote: after my update yesterday I had an empty /boot and a new /boot.bak dir. Rebooted from USB drive, arch-chroot into /mnt, and fixed. However, mkinitcpio -p linux would error due to a kernel error. Reinstalled linux in arch-chroot and that fixed the boot problem, not the systemd-cryptsetup error that still persists.


“Never Explain Anything” - H.P. Lovecraft

GitHub:Pastebin

Offline

#2 2021-04-03 19:05:49

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

Re: systemd-cryptsetup with external drive

It seems there is currently a bug with systemd-248.1 with automatic decryption.  Downgrading to 247.4-2 fixed the issue until the bug can be resolved.

https://bugs.archlinux.org/task/70272

Offline

Board footer

Powered by FluxBB