How to unlock all LUKS volumes with single password?

I finally did something that worked. After hours of searching for solutions (I tried a bunch of different things, but non worked), I eventually stumbled upon arch linux’ entry on systemd-cryptsetup-generator which mentions that a password is cached and tried against subsequent encrypted disks. It saddens me because this was also mentioned in systemd-cryptsetup@.service man page referring to the kernel keyring, but I was quick to neglect it as I never saw this to work (I have the same password set for both partitions).

After seeing the arch wiki mention it though, I gave it another try. Perhaps the kernel keyring was never activated because entries in /etc/crypttab specifically points to a keyfile. So I changed my crypttab to (change is none in the third column):

# <name>               <device>                         <password> <options>
luks-81733cbe-81f5-4506-8369-1c9b62e7d6be UUID=81733cbe-81f5-4506-8369-1c9b62e7d6be     none luks
luks-9715a3f9-f701-47b8-9b55-5143ca88dcd8 UUID=9715a3f9-f701-47b8-9b55-5143ca88dcd8     none luks

and suddenly I need only enter my password once for any of the partitions for which it queries me for a password. Very strange behavriour…


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.