Page 1 of 1

Btrfs filesystem partially overwritten by UFS filesystem

Posted: 23 Oct 2017, 09:30
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?

Thanks

--Yarrow

Re: Btrfs filesystem partially overwritten by UFS filesystem

Posted: 24 Oct 2017, 06:45
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.