Sunday, 12 January 2014

Data Recovery

Recently I had the unfortunate incident of not only one hard drive failure, but two! And what a colossal fuck up it was too. I'll give you a bit of background on the set-up, I run my primary operating system from a 40 GB solid state drive SATA (I could have gotten a bigger one but I like to keep operating drives minimal) with my media, project archives and backups on separate disk drives. Since most of my really important data is backed up on my Google Drive I measure a certain level of redundancy with my system.

The problem being is that since I frequently swap my primary operating system between different versions of linux, some occasionally have an encrypted boot loader, which I accidentally (and somewhat foolishly) installed to boot from the wrong drive and once the encryption key had been lost, it left the boot sector of my media disk unreadable.

I was able to recover most of the files on my projects disk to a newly purchased capacity disk, however losing all file structure leaving me with around 200,000 files to organise, which might I add is difficult enough to merely list the file contents, let alone organise. I'm still currently in the process of using regular expressions to filter the contents into folders.

The second part of this equation is my media drive, a drive which has already failed its SMART during boot up but had left me with a bit of a catch 22 situation. The drive formatting had become corrupted, but was still NTFS, attempting to mount fails, attempting an fdisk fails, NTFSfix fails, forcing a read only mount fails, I'm out of tricks right? The only clue left for resolve left here is the error message returned from mounting advising me to open Windows and perform a chkdsk, the only problem with this is that Windows won't even boot with this disk let alone even attempt to fix it.

What's left?
Enter testdisk.

I'd manage to find this wonderful little application named testdisk which I had managed to list the file contents of the corrupt disk and extract them successfully. Problem solved! Now just to sort through the remaining hundred thousand files...

You can find and download testdisk here.