0

I'm trying to configure automounting encrypted home on login with user password=encryption password.

I'm using archlinux + kde + sddm + crypsetup (dm_crypt). Following archlinux article I did as instructed:

/etc/pam.d/system-login

...

auth       include    system-auth
auth       optional   pam_exec.so expose_authtok /etc/pam_cryptsetup.sh

...

/etc/pam_cryptsetup.sh

#!/bin/sh

CRYPT_USER="andrew"
MAPPER="/dev/mapper/home-"$CRYPT_USER

if [ "$PAM_USER" == "$CRYPT_USER" ] && [ ! -e $MAPPER ]
then
  tr '\0' '\n' | /usr/bin/cryptsetup open /dev/nvme0n1p3 home-andrew
fi

After display manager starts I have black screen with primitive mouse that I can move. I'm having xorg on tty1, if I switch to any other tty I'm offered for plain login (without xorg), but if I do shell is unavailable, hitting keyboard keys prints them on the screen, but shell is not available. In tty1 this black screen is shown for 90 seconds , after it KDE login screen appears (so 90 seconds between sddm starts and before kde login screen appears). If I enter my password, home successfully mounts and by DE gets started.

This 90 seconds timeout is mentioned here, but I can't figure out where should I write this thing.

How do I remove this 90 seconds delay?

dmesg journalctl

May 08 00:49:04 msi systemd[1]: dev-mapper-home\x2dandrew.device: Job dev-mapper-home\x2dandrew.device/start timed out.
May 08 00:49:04 msi systemd[1]: Timed out waiting for device /dev/mapper/home-andrew.
May 08 00:49:04 msi systemd[1]: Dependency failed for File System Check on /dev/mapper/home-andrew.
May 08 00:49:04 msi systemd[1]: Dependency failed for /home/andrew.
May 08 00:49:04 msi systemd[1]: home-andrew.mount: Job home-andrew.mount/start failed with result 'dependency'.
May 08 00:49:04 msi systemd[1]: systemd-fsck@dev-mapper-home\x2dandrew.service: Job systemd-fsck@dev-mapper-home\x2dandrew.service/start failed with result 'dependency'.
May 08 00:49:04 msi systemd[1]: dev-mapper-home\x2dandrew.device: Job dev-mapper-home\x2dandrew.device/start failed with result 'timeout'.
May 08 00:49:04 msi libvirtd[606]: cannot open directory '/home/andrew': No such device
May 08 00:49:04 msi libvirtd[606]: internal error: Failed to autostart storage pool 'andrew': cannot open directory '/home/andrew': No such device
May 08 00:49:04 msi libvirtd[606]: internal error: Failed to initialize a valid firewall backend
May 08 00:49:04 msi systemd[1]: home-andrew.automount: Got automount request for /home/andrew, triggered by 658 (libvirtd)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.