Btrfs filesystem partially overwritten by UFS filesystem

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read
Posts: 1
Joined: 23 Oct 2017, 08:54

Btrfs filesystem partially overwritten by UFS filesystem

#1 Post by yarrow »

My Linux /home partition got partially overwritten by the installation of another OS which formatted the partition with the UFS filesystem, and wrote several GBs onto it. Only the first GBs of the partition were actually overwritten, I assume, and I am confident that the rest of the data data is still there intact.

Can I use Testdisk to recover the this partition? Or at least its files?
My worry is: the partition is now formatted as UFS, and I am afraid that this fact will this create of problem in recovering the files which were actually saved on a Btrfs filesystem? Is there a way to tell Testdisk to ignore the UFS formatting and interpret the partition as Btrfs instead?



Sponsored links

User avatar
Site Admin
Posts: 5305
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France

Re: Btrfs filesystem partially overwritten by UFS filesystem

#2 Post by cgrenier »

You can try fsck.btrfs on the partition but I don't think it will work.
You can probably recover some data by using PhotoRec on this partition. If most files are missing, enable the expert mode in Options and choose a blocksize of 512 bytes when asked, use the default options otherwise.