1

Topic: Data Recovery Advice

The original partition was over a while 300gb drive, I wanted to have a separate 7GB or so partition , in front of it.

The whole system locked up while in the process of resizing and moving a partition.

After rebooting, the partition list now have the primary partition at the start of the drive and 7gb of extra empty space at the end.

The first thing I did was a fsck (which was probably a bad idea). It complained about a broken superblock and tried to recover it. (Had I not done this and lost the original journal I might have been able to recover more manually in further steps).

At this point I managed to get a drive large enough to backup an image of the corrupt partition so I wouldn't screw it up further.

When running fsck on the recovered superblock, it dumps a huge number of files in lost+found, most of this is complete garbage, I wrote a simple python script to sort lost+found for insane files (for instance most of the files have UUIDs larger than 2000 which is higher than the range my system has).

The script also sorts out directories which are useful since they contain complete filenames, this allowed me to get about 85GB or the databack. (mostly videos).

I have then gone through the individual files that do have my UUID but no filenames

Yes I understand I should have backed up and such but I lacked 300gb of spare space, the data on the drive isn't too important but it would be nice to get it back if possible (but not important enough to say pay for a professional data recovery service). Mostly at this point I'm doing it more for a learning experience.

Mostly the drive videos (downloaded) but the most exploded parts of it are my home file which has git repos of personal programs and old finished uniwork which would be handy to have back

Does fsck backup the superblock or such itself at all?

2

Re: Data Recovery Advice

A useful application for recovering partition tables is testdisk which is included on the GParted Live CD and also the System Rescue CD.

For recovering photos and many other types of files other than photos, photorec can be quite handy.

If you are using an ext3 filesystem (you mentioned journaling), the following article on Advanced Find EXT2 EXT3 Backup SuperBlock may be of interest to you.