1

How do we unlock multiple disks with one password prompt at CentOS-7 bootup? In Debian, I can do it using decrypt_keyctl & initramfs in /etc/crypttab (which I see is described here).

Right now, I'm using Nethserver, and crypttab looks like:

luks_root   UUID=<uuid1>   none
luks_swap   UUID=<uuid2>   none

How do I add another disk, which I want to decrypt via a (the same) password?

Perhaps that will also clear up the mystery of how it is that the present bootup happens with only one password prompt and without a keyfile.

1

It turns out the answer is actually Method1 in this answer. It applies to both Ubuntu and CentOS. Quoting:

Systemd ... will unlock all additional LUKS partitions if

  1. all of the partitions you want to unlock use the same password
  2. you enter the password for the root partition correctly the first time. If you get it wrong, you'll need to enter it again for every other LUKS partition
0

Is your crypttab complete? I don't see a configured keyfile...so I don't know how to do this without keyfiles.

The normal way, as far as I know, is to create and attach keyfiles to every luks container and use these to unlock. All the keyfiles should be contained in one luks container. This container, you can unlock via passphrase and then the keyfiles are available for unlocking the other containers.

  • It is, indeed, complete. I understand what you are saying, but I do want to do this with a password, as I do on Debian, rather than a keyfile. – Diagon Aug 12 at 9:59

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.