Ubuntu 18.04: mount encrypted disk

If you have problems with the key (see dmesg or syslog), e.g.

Could not find key with description: [XXX]
process_request_key_err: No key
Could not find valid key in user session keyring for sig specified in mount option: [XXX]

then, try adding the passphrase manually: Option "1" in menu of /usr/bin/ecryptfs-manager

It helped me.


I encountered the same problem after installing 18.04 when I tried to access my old encrypted data using ecryptfs-recover-private. I was able to solve the issue by doing the following:

Unwrap your old mount passphrase

(You can skip this step if you know this mount passphrase)

You need to find out your mount passphrase so you can add it to the keyring. Assuming your current working directory is your former home partition, you do this by typing

ecryptfs-unwrap-passphrase .ecryptfs/old_user/.ecryptfs/wrapped-passphrase

This asks for your old login passphrase and outputs your old mount passphrase.

Add your mount passphrase to the kernel keyring

This is done by

printf "%s" "mount_passphrase" | ecryptfs-add-passphrase --fnek -

The --fnek option may not be necessary, but it worked for me.

Mount your encrypted data in /tmp

Finally type

sudo ecryptfs-recover-private .ecryptfs/old_user/.Private/

This either asks for your mount passphrase directly or tries to unwrap it with your login passphrase. Although the previous steps appear redundant now, they made this step work, at least for me. Hope you'll have success, as well.