OK if you are reading this you probably can’t boot your encrypted HDD AND encrypted home directory Ubuntu OS install and you didn’t backup the data you wanted off it regularly enough to be happy. So you are currently experiencing a bunch of frustrating dead ends trying to fix it as you search forums and Ubuntu KB for solutions because none of the other people’s experiences\errors exactly match yours. I can’t judge because I found myself in that very same situation last week but was eventually able to get my data. And figured I’d just throw up the steps I documented in case it would help someone else sometime. The below is kinda the quick and dirty brain dump I had after getting the data and reinstalling, so use at your own risk.
I found and had to combine the instructions at the 2 below links.
sudo fdisk -l
# find the biggest partition or the one suiting your missing home drive location. For me it was Disk /dev/mapper/ubuntu–vg-root: 461 GiB xxxxxxxx bytes, xxxxxxxxx sectors
#So first you have to mount the encrypted disk with the full disk encrypted passphrase (not the passphrase for you home folder encryption)
cryptsetup luksOpen /dev/mapper/ubuntu–vg-root /mnt/here
# this is different then the “unlock” phrase used in the first link description, but worked for me.
sudo ecryptfs-recover-private /mnt/here
#gives you successful message and a temp folder location of your data. Example: /tmp/ecryptfs.bAhhoiUzm/
#if you try to get there from the LIVE CD user you get permission denied, do “sudo -i nautilus” and use that GUI filemanager to look at the folder as root.
#. I got a bunch of GTK-CRITICAL errors in the terminal that launches nautlius but it seemed to work anyway
# in your mount you see 2 files “Access your Private Data” and a “Readme” You need to show hidden files so you see the .ecryptfs and .private files. took me too long to realize these seemingly simple steps.
Now goto Link 2. and follow those steps under “Recovering your data manually”
Some tips\thoughts on that experience.
# The auto recovery didn’t work for me, kept saying there was a loop
# In step 8 for “Enable filename encryption: y” choose yes, I honestly don’t remember if I choose this as an option but decrypting it only worked when I chose this.
# I got a warning that “Based on the contents of [/root/.ecryptfs/sig-cache.txt], it looks like you have never mounted with this key before. This could mean that you have typed your passphrase wrong. Would you like to proceed with the mount (yes/no). Choose yes.