Hard drive recovery, the hard way.

Here’s a surprise. 

I’m a professional System Administrator.  My standard joke here goes, “Because I get paid for it, not because I’m any good at what I do.“ 

I have long and hard declared my own ineptitude along the way.  Yes, I forward spam.  Yes, I have the coding skills of a 1970’s monkey strung out on polyester.  Yes, Virginia, even I can fail to count to three starting from zero. 

But all in all, you take the battle scars and you learn from them.  It’s more than just not repeating the same mistakes all over again, it’s also about being wise enough to foresee mistakes before they happen and avert them. 

If you have to choose patch or no patch, take patch.  Just don’t patch your production server FIRST if you don’t have to.  When you’re buying a new computer, the first question ALWAYS needs to be, “What are you planning to use this for?“  I have four computers I use almost daily, and each is good at something and lousy at another. 

A couple years ago, my external hard drive failed.  It was a 250 GB drive formatted with FAT so I could haul it between all my various systems and plug it in.  I’m proud to say, I lost absolutely NOTHING of consequence because it was only my backup drive.

Well, except for those photos of the kids I only stored on the backup drive because I never bothered burning them to CD when I had the chance.

Number one rule of paranoia, never, EVER consider possibly not having a backup of your important files, and never EVER consider not having a spare backup in case the first one goes bad and never EVER consider not testing your backup once you’ve made it.  That’s one rule.  Did you back up your files lately?  BACK THEM UP!  NOW!  DON’T WAIT!

Well, what keeps me running in the professional class is my ability to recover after spectacularly failing.  Sometimes it’s trial and error.  Sometimes it’s using a great deal of searching the web.  Almost always it’s trying to find someone else’s experience and following their solution.

I first hit the web.  There are hundreds of programs out there for data recovery.  A few dozen that look sorta promising.  Most are costing around $100, give or take.  Not a lot that look appealing.  For me, it’s a real pisser to go through the effort of downloading a trial version which may or may not let me look at my lost files, then go through the effort of paying to hopefully recover the files I may or may not get.  I’m wary of the Symantec’s of the world (where good software goes to die) that have this massive promo department but the software itself just isn’t very good.  Sure, any of these may recover my files, but that’s a lot of time, effort, trust and “if’s” to wind my way through.

On the other hand, I trust anything licenced under the GPL.  Not because I can read the code and figure out what it does, but someone could.  (Not that anyone necessarily does, either, by the way.  Don’t hang yourself with blind trust.  It’s a paranoia thing.)

FAT-32 isn’t an overly complicated file system, and magically losing the whole drive usually means the entire drive wasn’t magically lost.  Think of it like a book with the Table of Contents ripped out.  The data’s still there, you just have to go through it page by page to figure out where stuff is.  It just takes a while to piece it all together and you can re-create the Table of Contents later.

My drive likely had the File Allocation Table (that’s the “FAT” in “FAT”) or the Master Boot Record ripped away.  Sure, I had pictures that I’d rather not lose on there, but it wasn’t life or death if I couldn’t get them back.  Well worthy of taking a shot at it on my own.  Remember - I am a professional.

Well, I managed to dig up TestDisk from CGSecurity and figured I’d give it a shot.  Downloaded it to my good hard drive, scanned the bad hard drive and let it walk me through the recovery process.  For the record, the first pass found nothing, the second “deeper” pass found the backup FAT and restored using it.  Easy!  Fun!  A little bit convoluted if you don’t know what you’re doing.  But it worked fine - I got my photos back.

I didn’t have to pay a dime, but I did.  They suggested 25 Euros, I donated 10 instead.  I doubt I’ll hear harsh words over it, and I’ll donate another 10 the next time I use TestDisk.

I recommend letting a professional try to recover your data rather than doing it yourself if you have the choice.  But sometimes the choice isn’t easy to make.  Take your time reading the options, and feel free to put your trust in the program.  Christophe Grenier is also a professional and I justifiably put my trust in his abilities.  It’s good to have smart friends.  That I’ve never met.

Zarquil Zonar’s guide to what to do when your hard drive fails:

1.  Turn off your computer.  The more you write to the hard drive, the higher the risk that you’ll overwrite a file you need.
2.  Don’t panic.
3.  Remove the failed hard drive and put it into a working computer as a secondary drive.  Beware the gotchas:  Is it an IDE (older) drive or a SATA drive?  If IDE, do you have it as master, slave or cable select?  If you’re not sure, disconnect your DVD/CD drive and plug the hard drive on a cable of it’s own.
4.  Boot from your good drive, be patient.  I have seen a chdisk actually repair a failed drive when the computer booted.  It’s not likely, but it happens.
5.  If your system finds the other drive but does not recognize the formatting, don’t panic.  And don’t format it.
6.  Download TestDisk or your favourite rescue program.  (Ideally, this happened before you put in the other drive.)  One of the reasons I like TestDisk is that you don’t have to install it - just unzip it and run.
7.  Scan the bad drive.  Follow instructions carefully.  Usually the program will guide you with default settings so you only have to hit enter.  But be alert, and pay attention to the warnings.
8.  Don’t panic.  Odds are you either recovered your drive or it’s unrecoverable.

Remember, a good backup regime means never having to recover a failed drive.