1

I decided to switch to Ubuntu from Fedora. In Fedora I had the /home folder in its own partition and then had that partition encrypted.

Also in the past when formatting Fedora I was able to reuse that partition without formatting. In the Fedora installation process it would offer me to unlock the partition and use it as is.

I was expecting Ubuntu could do the same or similar. I used the 14.04 liveusb and went through the installation. I set my /home mount point to the same partition in the same way as I do in Fedora and did not check format box. After that the installation process started and then went on to fill in my log in details, on that same window there was a checkbox to encrypt the home folder, so I chose that.

Installation went without more trouble and after booting for the first time, the home directory was completely clean. Even more scary, gParted showed the whole partition was empty =/

What happened? Did Ubuntu installation formatted the disk without asking/confirming with me? If so, is there a way to get those files back? Remember, they were inside the Fedora encrypted partition.

Hope anyone can shed some light on what happened and any ideas to recover my files!

Thanks in advance

Below some system info of this new ubuntu installation:


$ df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/sda7             34G  3.0G   29G  10% /
none                 4.0K     0  4.0K   0% /sys/fs/cgroup
udev                 7.8G   12K  7.8G   1% /dev
tmpfs                1.6G  1.2M  1.6G   1% /run
none                 5.0M     0  5.0M   0% /run/lock
none                 7.8G  152K  7.8G   1% /run/shm
none                 100M   32K  100M   1% /run/user
/dev/sda6            477M   52M  396M  12% /boot
/dev/sdb3            615G  128M  584G   1% /home
/dev/sda2             96M   29M   68M  30% /boot/efi
/home/joel/.Private  615G  128M  584G   1% /home/joel

$ sudo fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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
Disk identifier: 0x4a409780

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1   250069679   125034839+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary

0

What you need is this command:

sudo ecryptfs-recover-private

The scenario: boot from your new Ubuntu installation and issue the command above. It will take a while until it will find your encrypted /home folder (assuming that it is accessible and mounted, if not, follow the instructions here.)

  • thanks for your answer. Sadly the tool did not work. What it looks to be happening is that the partition got formatted and the made the new FS encrypted. Does the method you proposed supposed to work on that situation? – keponk Jul 10 '14 at 17:02
  • Unfortunatelly no... And it is a big chance that an overwritten encrypted fs is not recoverable at home. Get over it, you have lost all your data in that partition. :( Sorry... – Frantique Jul 11 '14 at 7:53

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.