Ubuntu – Re-install and keep home partition with btrfs – lost files

btrfsfilesystempartitioningsystem-installation

So, I was running Arch Linux with separate / and /home. Both were btrfs partitions, but the whole drive was not managed by btrfs.

I decide to install Ubuntu 14.04. I carefully select to format / and do-not-format /home. I set the new (Ubuntu) username to the same as the old (Arch) username.

I expected that I would boot up into my old account. Instead it boots into a fresh account and all of my files are deleted.

However, btrfs now reports 99% space used in /home, even though there are no files. So it looks like the old files are there somewhere, and the filesystem was not formatted.

What exactly has happened here? Is there any way to recover my lost files?

But I still don't really understand what happened here.

Best Answer

your files are still there since you don't format the partition that contains that your home files.

But they don't appear since the partition is not mounted so what you need to do is to mount the old partition.

mkdir /media/old_partition

sudo mount -t btrfs /dev/sdXX /media/old_partition

Replace XX with number of hdd and partition number that contains your /home

Related Question