0

I need help to recover my files from "Home" in an encrypted partition with Ubunu 14.02 (I went with the encryption option from the installation). I couldn't boot normally on that system (normally after grub, I got to the encryption password login, then the actual Ubuntu login; but now I cant type the password and got this odd encryption login then I get to a black screen with blinking cursor). I think I'll post a question about that alone.

Here, I'm stuck with the USB live Ubuntu (16.04 LTS), I booted successfully to the Try version. I must say that I connected another hard drive (with 2 partitions, no OS, and just to copy my files to back them up if this works).

I have followed some guides, but I'm lost.

I launched terminal for this:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000efb3e

Device     Boot  Start       End   Sectors   Size Id Type
/dev/sda1  *      2048    499711    497664   243M 83 Linux
/dev/sda2       501758 488396799 487895042 232.7G  5 Extended
/dev/sda5       501760 488396799 487895040 232.7G 83 Linux


Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xf362f362

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1           16065 137901959 137885895 65.8G  f W95 Ext'd (LBA)
/dev/sdb2  *    137901960 976768064 838866105  400G  7 HPFS/NTFS/exFAT
/dev/sdb5           16128 137901959 137885832 65.8G  7 HPFS/NTFS/exFAT

Partition table entries are not in disk order.

Disk /dev/sdc: 14.4 GiB, 15479597056 bytes, 30233588 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3a133a12

Device     Boot Start      End  Sectors  Size Id Type
/dev/sdc1  *       63 30202199 30202137 14.4G  c W95 FAT32 (LBA)

The sda is the failing partition with ubuntu, sdb is the "empty" one to backup the files and sdc is the USB.

Then I went with the blkid command:

ubuntu@ubuntu:~$ sudo blkid
/dev/sda1: UUID="513ffff2-7be9-4ca7-8ccb-740fa815e0bc" TYPE="ext2" PARTUUID="000efb3e-01"
/dev/sdb2: UUID="56C43D73C43D5689" TYPE="ntfs" PARTUUID="f362f362-02"
/dev/sdb5: UUID="BEF086FEF086BBE1" TYPE="ntfs" PARTUUID="f362f362-05"
/dev/sdc1: LABEL="UUI" UUID="48BD-CCEF" TYPE="vfat" PARTUUID="3a133a12-01"
/dev/loop0: TYPE="squashfs"
/dev/sda5: UUID="732492df-7da7-4b39-a2df-dc7ecbe57134" TYPE="crypto_LUKS" PARTUUID="000efb3e-05"

Afterwards I updated:

ubuntu@ubuntu:~$ sudo apt-get update

And installed cryptsetup:

ubuntu@ubuntu:~$ sudo apt-get install lvm2 cryptsetup
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cryptsetup is already the newest version (2:1.6.6-5ubuntu2).
lvm2 is already the newest version (2.02.133-1ubuntu10).
0 upgraded, 0 newly installed, 0 to remove and 158 not upgraded.
ubuntu@ubuntu:~$ sudo modprobe dm-crypt

And entered corectly my password:

ubuntu@ubuntu:~$ sudo cryptsetup luksOpen /dev/sda5 myvolume
Enter passphrase for /dev/sda5: 

Afterwards:

ubuntu@ubuntu:~$ sudo vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "ubuntu-vg" using metadata type lvm2
ubuntu@ubuntu:~$ sudo ls
Desktop  Documents  Downloads  Music  Pictures  Public  Templates  Videos

Then I could open the partition on Nautilus, like a normal folders on the partition that I'm interested in... but when I got to Home, I CAN SEE THEM! but everything is locked, and I cant copy anything cause of permissions. What should I do next or what I missing?

1 Answer 1

1

If you can see the files, you can change the last step.

Press Alt-F2 and type gksu nautilus + Enter. This will launch Nautilus with root rights and you should be able to do whatever you want with the files.

I am not 100% sure gksu exists on the Live CD but if it doesn't, go ahead and install it: sudo apt-get install gksu. It will disappear after the next reboot but it will install normally for you to do your job.

12
  • I pressed ALT+F2 and typed gksu nautilus and pressed enter. A nautilus window launched... but I'm not sure what should do there? Where I can change the permissions to access my files, cause in that nautilus window, I went to that partition Home folder and saw that my files are still locked.
    – V. C.
    May 30, 2016 at 2:29
  • Thanks @Stormlord, I wasn't aware of that. I copied and pasted that command in terminal: [ubuntu@ubuntu:~$ sudo apt-get install gksu Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package gksu]
    – V. C.
    May 30, 2016 at 2:42
  • You don't need to change the permissions if you use the root account. It's strange that you couldn't install gksu. Does the computer have internet access? I will download it first.
    – Stormlord
    May 30, 2016 at 2:45
  • Yes, Im connected to the Internet. I'm using the same pc to write this, and Im actually going to see GoT with it. So Im unsure what is the issue. How can I access that root account. All I see messages that say that I dont have permissions.
    – V. C.
    May 30, 2016 at 2:58
  • Try vgchange -ay before starting nautilus just to make sure the volume group is active.
    – Stormlord
    May 30, 2016 at 3:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .