Automount second encrypted drive without password

ru flag

I'm attempt to mount a second encrypted drive at boot by getting the password from a TPM device. I'm on Ubuntu 20.04.

The second drive as well as the first are in LVM as physical volumes. Both volumes are in the same volume group.

I followed the instructions here.

There is an entry in /etc/crypttab for the second drive:

nvme1n1_crypt UUID=64bcbd3e-a6e8-43e6-884c-dbf6189a8ecc none luks,discard,keyscript=/usr/local/sbin/tpm2-getkey

The first drive mounts fine, but I'm getting errors on the console that the volume group is missing the unencrypted device. After awhile, I get a prompt to give the key.

Looking for a way to avoid inputting the password for the second drive.


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.