You are not logged in.
Hi, I just setup a new laptop with archinstall and used the encrypt option there, which resulted in a LUKS setup without LVM for two disks: / and /home. Now, everything is working fine, mostly: on boot (via systemd-boot) cryptsetup asks the password and decrypts `/` afterwards. /etc/crypttab contains the entry with the key for /home and mounts automatically. So everything is fine until systemd-cryptsetup wants the password again and then obviously fails because the disk is already decrypted.
So, TLDR: I got asked for the same password twice with different prompts (cryptsetup / systemd-cryptsetup), and I have no idea why. Why is systemd-cryptsetup even involved with this? Is it possible to disable it?
Some boot logs:
Apr 01 08:57:26 box systemd-cryptsetup[1109]: Cannot use device /dev/disk/by-diskseq/1-part3 which is in use (already mapped or mounted).
Apr 01 08:57:26 box systemd-cryptsetup[1109]: Failed to activate with specified passphrase: Device or resource busy
Apr 01 08:57:26 box systemd[1]: systemd-cryptsetup@home.service: Main process exited, code=exited, status=1/FAILURE
Apr 01 08:57:26 box systemd[1]: systemd-cryptsetup@home.service: Failed with result 'exit-code'.
Apr 01 08:57:26 box systemd[1]: Failed to start Cryptography Setup for home.
Apr 01 08:57:26 box systemd[1]: Dependency failed for Local Encrypted Volumes.mkinitcpio.conf:
HOOKS=(base udev autodetect microcode modconf kms keyboard keymap consolefont block encrypt filesystems fsck)thanks for your insights!
Last edited by johnnytheboy (2025-04-01 11:12:43)
Offline
OK, just figured that out by myself: for everyone looking up this topic in the future, the solution to stop systemd-encrypt asking an extra password is to remove the "linux-home" flag from your home partition.
Offline
coould you explain this in more detail? there's no such flag but rather the gpt partition type uuid
Offline
Nothing to explain really ... just open Gparted and check for this flag, if it's there, remove it. Sorry I cannot tell you anything else ![]()
Offline
according to wikipedia GPT defines a field for flags like HIDDEN, READ_ONLY, NO_AUTOMOUNT but there's no LINUX_HOME flag
I'm not sure but I guess if anything gParted likely changes the partition type from Linux to Linux Home - which makes calling that a flag misleading at best - as a flag implies it can be set independent of other settings
anyway - using specific got part types is what systemd uses for auto mounting - see https://wiki.archlinux.org/title/Partitioning#/home
in fact using systemd-boot works without an fstab at all as long as the partitions have tge correct gpt part types
so relying on the specific gpt part types is an intended feature - and the bug is likely caused by an existing fstab which conflicts with the systemd-boot automount
instead of changing the gpt part type the automoubt should be disabled: https://wiki.archlinux.org/title/System … tomounting
there's also a kernel option to skip it but I'm not ablr to find it
so tldr: the cause of your issue is tgat both systemd-boot auto mount based on gpt part type + existing fstab - solution: either disable automount or remove fstab - but changing the part type is more like a dirty hack than proper configuration
Offline
Thanks for the info. Here is a list with available flags in parted: https://www.gnu.org/software/parted/man … e/set.html - the one I mean is called "linux-home", not linux_home, my bad.
Anyway, you are probably right with "disable automount", however the wiki also states:
When using mkinitcpio, the systemd hook is required.
- which is not the case. Hence my question "why is systemd even involved with that". But all of this does not matter much, as long as disabling automount is also working when removing this flag, it's all fine with me.
Thanks!
Edit: Oh, I just found tihs in the wiki: https://wiki.archlinux.org/title/GPT_fd … tomounting - which is nearly exactly the same solution, just another flag.
Last edited by johnnytheboy (2025-04-02 04:59:34)
Offline
can't help you on that front as I use neither systemd-boot nor lvm nor encryption
I use grub to boot from a standard ext4 root without additional xbootldr
some time ago I played around with the different boot options but ended up sticking to grub just for its convenience
also I'm not even sure if my idea about the automount is correct - but it was the only thing matching your solution of changing the parttype
Offline