Recover files from encrypted Home folder
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Recover files from encrypted Home folder
I want to get some files off of my natively encrypted Home folder but I can no longer get Mint to boot - how can I get the files?
BACKGROUND:
Had dual boot with Windows & Mint and all was well.
One day the HDD would not boot at all.
Tried a few things, and Boot-repair run from a Live USB of Ubuntu was the only one that did anything...
Now the HDD will boot into Windows, but there is no sign of Grub or then Mint at startup any more.
I DO have the passphrase for the encrypted partition.
I'm not actually that bothered about saving the Mint install, but I do want the files out of my Home folder.
Appreciate any tips on how to get my files back - Thanks
BACKGROUND:
Had dual boot with Windows & Mint and all was well.
One day the HDD would not boot at all.
Tried a few things, and Boot-repair run from a Live USB of Ubuntu was the only one that did anything...
Now the HDD will boot into Windows, but there is no sign of Grub or then Mint at startup any more.
I DO have the passphrase for the encrypted partition.
I'm not actually that bothered about saving the Mint install, but I do want the files out of my Home folder.
Appreciate any tips on how to get my files back - Thanks
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Recover files from encrypted Home folder
These are my notes for recovering access to an encrypted home. Boot from the Linux Mint installation DVD / USB to do this.
I've used this once successfully, as have at least two other users here. Is this in a format that is usable for you, or do you need more help?
Code: Select all
# Mount the disk partition containing the Encrypted Home Directory
# !!! replace /dev/sda1 with your partition !!!
sudo mount /dev/sda1 /mnt
# Establish a proper chroot environment
sudo mount -o bind /dev /mnt/dev
sudo mount -o bind /dev/shm /mnt/dev/shm
sudo mount -o bind /proc /mnt/proc
sudo mount -o bind /sys /mnt/sys
sudo chroot /mnt
# Become the user whose data needs recovery and manually add the necessary mount passphrase to the kernel session keyring
# !!! replace username with your username !!!
su - username
ecryptfs-add-passphrase --fnek
# Mount the encrypted directory and then access the data
ecryptfs-mount-private
cd $HOME
Re: Recover files from encrypted Home folder
Thanks for the quick reply Xenopeek.
I'll have a stab with that and see how it goes. Only problem at the minute is that I do not have a Mint Live USB/CD, so have to sort that first...
I'll have a stab with that and see how it goes. Only problem at the minute is that I do not have a Mint Live USB/CD, so have to sort that first...
Re: Recover files from encrypted Home folder
I can mount the Windows partitions (in terminal and Disk Utility), but not the Linux partitons.
In Disk Utility they just do not have an option to mount and when I try it comes back with . I tried things like but still get error messages about wrong filesystem or bad superblock etc...
In Disk Utility they just do not have an option to mount and when I try
Code: Select all
sudo mount /dev/sdb5 /mnt
Code: Select all
mount: you must specify the filesystem type
Code: Select all
mount -t ext4 /dev/sdb5 /mnt
Re: Recover files from encrypted Home folder
Oh boy. Perhaps something more is wrong? What does this command share:
Code: Select all
sudo parted -l
Re: Recover files from encrypted Home folder
OOh, I got one of the linux partitions to mount after 'repairing' the superblock with Testdisk
So now I will try your earlier approach to get at my data....
Code: Select all
sudo fsck.ext4 -v /dev/sdb5
Re: Recover files from encrypted Home folder
Thanks for all your help.
With a bit more work on e2fsck to sort out the superblock I got most of the way through your instructions.
Then I had the opposite of a eureka moment when I realised I had the passphrase for the wrong HDD!!!!!!!
So I'm going to have to hunt down the right passphrase (if I stored it!) or work out how to get in with the system password.
With a bit more work on e2fsck to sort out the superblock I got most of the way through your instructions.
Then I had the opposite of a eureka moment when I realised I had the passphrase for the wrong HDD!!!!!!!
So I'm going to have to hunt down the right passphrase (if I stored it!) or work out how to get in with the system password.
-
- Level 1
- Posts: 34
- Joined: Thu Mar 14, 2013 6:30 pm
Re: Recover files from encrypted Home folder
I know this is an old thread, but I thought I would add a useful tidbit of information for those who may look at it in the future.
For a while now ecryptfs provides a utility "ecryptfs-recover-private" that automates the recovery process without having to go through the palaver of chroot etc.
There's a simple walkthrough here:
https://web.archive.org/web/20161216114 ... /Ecryptfs/
For a while now ecryptfs provides a utility "ecryptfs-recover-private" that automates the recovery process without having to go through the palaver of chroot etc.
There's a simple walkthrough here:
https://web.archive.org/web/20161216114 ... /Ecryptfs/
Re: Recover files from encrypted Home folder
Thanks, still not got my data back so I will have a look at thatcryptotheslow wrote:I know this is an old thread, but I thought I would add a useful tidbit of information for those who may look at it in the future.
For a while now ecryptfs provides a utility "ecryptfs-recover-private" that automates the recovery process without having to go through the palaver of chroot etc.
There's a simple walkthrough here:
https://web.archive.org/web/20161216114 ... /Ecryptfs/