Ubuntu – Ubuntu 18.04: mount encrypted disk

ecryptfsencryptionmount

I just installed Ubuntu 18.04 on a new disk, and trying from 18.04 to access my old Ubuntu files, on the older disk.

Going into /media/new_user/old_disk/old_user, there is a README file that says: THIS DIRECTORY HAS BEEN UNMOUNTED TO PROTECT YOUR DATA. And then says: From the command line, run: ecryptfs-mount-private.

Trying:

$ sudo ecryptfs-recover-private

does not do much (basically a few files it can't access, and nothing happens). Reading this old post (linking to this blog), I do instead:

cd /media/new_user/old_disk/.ecryptfs/old_user
sudo ecryptfs-recover-private .Private/

Which gives:

INFO: Found [.Private/].
Try to recover this directory? [Y/n]: Y
INFO: Found your wrapped-passphrase
Do you know your LOGIN passphrase? [Y/n] n
INFO: To recover this directory, you MUST have your original MOUNT passphrase.
INFO: When you first setup your encrypted private directory, you were told to record
INFO: your MOUNT passphrase.
INFO: It should be 32 characters long, consisting of [0-9] and [a-f].

Enter your MOUNT passphrase: 
mount: /tmp/ecryptfs.lFwWFlD4: mount(2) system call failed: No such file or directory.

ERROR: Failed to mount private data at [/tmp/ecryptfs.lFwWFlD4].

I am not sure what I am doing wrong at that point?

Thanks!!

EDIT 1:

I believe the issue does not come from wrong passphrase: I think I got the right one indeed, entering an obviously wrung one give another error message, Error: Unwrapping passphrase and inserting into the user session keyring failed [-5].

EDIT 2:

I should mention that both my old home and new home have the same user name… Could that be something that creates the problem? Where should actually ecryptfs-recover-private mount the old disk/system?

Best Answer

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.

Related Question