When I was installing Mint Debian edition unlike the classic edition, the installation automatically formated my home partition when I did not specify to format.
So the formatting previously was ext4 as is now. I believe the data is still there as it was a quick format.
I have now booted the computer up on a live USB to prevent writing on it.
Ran testDisk.
Is there anyway to recover to a previous superblock so i can recover my data?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Take a look at the e2fsprogs package. It seems that you can get all your backup superblocks from dumpe2fs /dev/sd<partition-id> | grep -i superblock and then have e2fsck check the FS for you, or just try to do mount -o sb=<output-of-dumpe2fs> /dev/sd<partition-id> /your/mountpoint with a backup superblock. See this for reference: http://www.cyberciti.biz/faq/linux-find-alternative-superblocks/.
testdisk works well to recover partition tables, not clobbered file systems. Photorec is a last resort when you have really messed things up and can’t get any of the filesystem structure recovered.
Method 2
You will need to use TestDisk’s sister program PhotoRec to recover your files. It’s been a couple of years since I last used these programs, but IIRC you won’t be able to recover them in-place, so I hope you have enough spare HD space to recover your files to.
It’s a good idea to read through the relevant TestDisk & PhotoRec docs before you attempt to actually do the recovery work – using these programs when you don’t know what you’re doing can be a nerve-wracking experience…
If you have lots of spare storage, I suggest cloning the nuked partitions to image files, eg using dd. Both TestDisk & PhotoRec happily operate on such image files. That way, if you do make a mistake you’ll only mess up your image files.
Method 3
I accidentally formatted an ext4 partition to NTFS in my Ubuntu 16.04 recently and was able to recover the full partition successfully by running a file system check.
sudo fsck.ext4 -v /dev/sda10
I recorded the steps in this blog post.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0