Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am experimenting with LUKS+dm_crypt. My setup is something like this: a LVM VG made of multiple Physical Volumes (PV). That VG contains multiple LV (Logical Volumes), most of them encrypted via LUKS+dm_crypt (via cryptsetup).

Editing "/etc/crypttab", the system will requiere a passphrase for each encrypted LV. But since all my encrypted LVs share the same passphrase, I would like to be prompted only ONCE, instead of twelve times (I have 12 encrypted LV).

I have thought about writing a script to include in initrd that ask for the password once, store the result somewhere volatile (ramdisk?), and provide that password for the rest of "/etc/crypttab" entries.

But this seems complex and fragile.

I wonder if there is something I am missing, or some other easier way.

share|improve this question

This might help: Setting up an encrypted Debian system

share|improve this answer

Store the keys on a USB device or SD card. Encrypt this with a key stored on the initrd.

Write the script to wait for the device or card, apply the stored key, and then pull the remainder of the keys from this device.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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