My ubuntu pc collapsed and i turned my internal hard drive to an external usb hard drive. After a lot of trying i ended up with a live usb on my laptop and after i enabled universe repositories and installed synaptics and gksu nautilus i finally managed to get into my encrypted hard disk drive and inside my home folder there are two icons. One text saying README and a weird purple thingy saying ACCEESS-YOUR-PRIVATE-DATA-DESKTOP. I open the readme text and it is says that i need to open the access-your-private-data-desktop. When i do that something like a terminal opens for a nanosecond and then suddenly disappears! So i try the second method that the README text says, which is running the ecryptfs-mount-private on terminal. After i do that i get a message saying ERROR: Encrypted private directory is not setup properly. Any ideas? ( i have already tried lots of things and i feel that i am so close on getting my files from the disk drive... Please! I need the files so bad. I also tried this sudo ecryptfs-recover-private INFO: Searching for encrypted private directories (this might take a while)... find: File system loop detected; /sys/kernel/debug/pinctrl' is part of the same file system loop as/sys/kernel/debug'.

  • Whats the output of cryptsetup luksOpen /dev/sdc test? Have you tried manually mounting /dev/mapper/luks-98199aea-ee9a-4909-a2a1-1ede01fb9f91? For example: sudo mkdir /media/my_device && sudo mount /dev/mapper/luks-98199aea-ee9a-4909-a2a1-1ede01fb9f91 /media/my_device – AJefferiss Nov 17 '15 at 9:52
  • When i try manually mounting it says mount: unknown filesystem type 'LVM2_member' As for the cryptsetup luksopen it says Device /dev/sdc doesn't exist or access denied. – George Jesus Dimitropoulos Nov 17 '15 at 9:57
  • Because it's a LVM volume you need to mount it slightly differently, see my updated answer. – AJefferiss Nov 17 '15 at 10:15
  • When i right-click and choose properties it says that all the files take up 4.8 GB of the hard drive, but on the chart it says 216 GB used! How is that possible. Where are my files? – George Jesus Dimitropoulos Nov 17 '15 at 13:57

You don't have cryptsetup installed on your second computer, install it via: sudo apt-get install cryptsetup

Once you've installed it, double click on the encrypted volume again and it should mount for you.

The error from your mount command mount: unknown filesystem type 'LVM2_member' tells us that it's an LVM group, and needs to be mounted slightly differently.

Hopefully the following will provide the information you need to get it mounted, based upon my system.

$ sudo pvs
PV         VG     Fmt  Attr PSize  PFree
/dev/sda2  ubuntu lvm2 a--  99.51g    0 

This tells us that the volume, ubuntu is on the physical volume /dev/sda2. We then need to use the lvdisplay command to list the logical volumes in the group.

$ sudo lvdisplay /dev/ubuntu
--- Logical volume ---
  LV Path                /dev/ubuntu/swap
  LV Name                swap
  VG Name                ubuntu


  --- Logical volume ---
  LV Path                /dev/ubuntu/home
  LV Name                home
  VG Name                ubuntu


  --- Logical volume ---
  LV Path                /dev/ubuntu/root
  LV Name                root
  VG Name                ubuntu


From the above we can see that I've got a home, root and swap. To mount the home partition from this group I would run the following command:

$ mount /dev/ubuntu/home /mnt/disk

If you're unsure how to modify this to suit your needs, edit your question again with the output of the pvs and lvdisplay commands. You might want to take a look at Formatting Help as well.

| improve this answer | |
  • I did what you suggested and after i submitted my passphrase this message appeared "The unlocked device does not have a recognizable file system on it" – George Jesus Dimitropoulos Nov 17 '15 at 8:53
  • What file system did it have on it before your PC had issues? Can you edit your question with some more information about the filesystem, and log output – AJefferiss Nov 17 '15 at 8:58
  • There is a partition. The 255MB part opened, but only has a folder grub and some texts like abi-3.19.0-31-generic and a memtest86+.elf. The other part is 640MB and has all my files and folders inside (docs, pics, music, videos, etc.) The second part is the one that gave me this message. – George Jesus Dimitropoulos Nov 17 '15 at 9:04
  • I tried the first one, but there is no .private and the second one says that the disk drive is already unlocked. That is not my problem. The problem is that after i unlock it it disappears and i can't access my files. I had ubuntu 15.10 on my pc and the laptop has 14.04 LTS. Does it matter? – George Jesus Dimitropoulos Nov 17 '15 at 9:26
  • I can now access it. I can see all the folders (bin, usr, dev, root, etc.) but i can't find my files. The only folder that i didn't search was root, because i can't enter it. It says You do not have the permissions necessary to view the contents of “root”. Maybe my files are in there? How can i access it? – George Jesus Dimitropoulos Nov 17 '15 at 10:53

If you've gotten this far

i finally managed to get into my encrypted hard disk drive and inside my home folder there are two icons. One text saying README and a weird purple thingy saying ACCEESS-YOUR-PRIVATE-DATA-DESKTOP.

It means you still have your home folder encrypted, with eCryptFS. Now you need to run the ecryptfs-recover-private script and it should search for any encrypted homes (or you can point it at your encrypted home files) and ask you for your old user passphrase, or the backup copy of the master passphrase you should have made when you set up your home encryption, and then it should mount your encrypted home (probably in /tmp/ecryptfs.XXXXXXXX) so you can read / back them up. May be mounted as another user, so probably will need to read as root.

If it errors out while searching, that's ok since you are already looking at your "dummy" home files "README" & "ACCEESS-YOUR-PRIVATE-DATA.desktop", which are usually in /[mountpoint]/home/[username] so just look in the /[mountpoint]/home/ folder for your encrypted files, which should be in /[mountpoint]/home/.ecryptfs/[username]/.Private and pass that to the ecryptfs-recover-private script.

See man ecryptfs-recover-private for more info.

ProTip: ALWAYS make BACKUPS of important data, and encryption keys/headers, so you'll never have this problem again

| improve this answer | |
  • Everything goes well, but after I put my password it says MOUNT passphrase of 32 characters long! What is that? – George Jesus Dimitropoulos Dec 17 '15 at 8:21
  • The Mount passphrase is the "real" key that encrypts the data. It's usually "wrapped" (encrypted) with your login passphrase and stored in the wrapped-passphrase file, so if you've got that file you just need your old login passphrase. Maybe it couldn't find the wrapped-passphrase file... are there any files in /[mountpoint]/home/.ecryptfs ? – Xen2050 Dec 17 '15 at 11:00
  • This directory does not exist. Inside /home there is only a folder with my username on it. – George Jesus Dimitropoulos Dec 24 '15 at 11:02
  • But you've got the eCryptfs readme & shortcut in your home folder right? Were you using eCryptfs? Are you seeing all files, normally dot-files are hidden - if your file manager is hiding them, you won't see them. In a terminal running ls -la in the folder should show all files; or if it's a permissions problem try sudo ls -la – Xen2050 Dec 25 '15 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.