How do I mount a usb stick (pendrive) in initrd before using encrypted partitions?

Asked by Hadmut Danisch

Hi,

ubuntu supports encrypted partitions, even LVM. When putting the root file system into an encrypted partition, the boot code in initrd shows a dialog asking for a passphrase. Works very well.

However, if the machine is a server required to boot without human interaction, the key cannot be entered over the keyboard. /etc/crypttab allows to give the path of a keyfile instead of the key itself. I therefore want to connect a USB stick containing the key as a file with the server machine.

How do I tell the initrd to mount a particular usb stick/filesystem before decrypting the partition needed for mounting the root file system?

regards

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Sam_ (and-sam) said :
#1

man crypttab says:
CRYPTDISKS_MOUNT
           Specifies the mountpoints that are mounted before cryptdisks is
           invoked. Takes mountpoints configured in /etc/fstab as arguments ...
... This is useful for keys on removable
           devices, such as cdrom, usbstick, flashcard, etc. Default is unset.
http://manpages.ubuntu.com/manpages/oneiric/man5/crypttab.5.html

Maybe also useful.
http://wiki.cizmar.org/doku.php?id=linux:ubuntu_encrypted_root

Can you help with this problem?

Provide an answer of your own, or ask Hadmut Danisch for more information if necessary.

To post a message you must log in.