Hard Drive Crapped Out − 1 March, 2007
So life (or rather, my computer) handed me quite a turd recently. The hard drive crashed. If I were the only one involved, I’d replace the drive, install Linux, and that would be the end of the story. The problem is, this wasn’t really MY computer; it was my wife’s. And she had well over 30GB of photos and music on the drive.
Not to worry, though, I religiously backed up important data to an external hard drive. I’m covered, right? Not exactly. The problem was that the crappy data sync software got hung up on a bad sector on the internal hard drive when performing the backup and ended up deleting most of the backed up files – just before the whole damn thing crapped out on me. Grrrrrrr…
What to do, what to do… My wife is an avid photographer and scrapbooker, so NOT getting these files back was simply not an option. My ass was on the line. Follow along on my journey to self-preservation:
The situation:
--Dell Dimension 8250 (about 5 years old) running Windows XP Pro (latest patches)
--Seagate Barracuda 160GB (7200) hard drive (less than a year old, replaced a bad OEM drive)
--Drive crashed due to sudden proliferation of bad sectors
--System (hard drive) completely unbootable and inaccessible
First, I tried booting from the Windows XP installation disk and running chkdsk, and fix installation, and numerous other tricks and voodoo magic to get the Windows installation to work again. No dice; my luck just isn’t that good.
Second, I tried several disk scanning and repair utilities (both freeware and commercial). Some reported that the disk was fine. Most said it had unrecoverable errors. None did anything to fix the problem.
Third, I cowered in a dark corner of the basement and cried.
Fourth, I turned to Linux to save my ass. Here’s how:
Items needed for ass-saving:
--SystemRescue CD on a CD (or any Linux distro with networking, NFS, and TestDisk/PhotoRec)
--Ultimate Boot CD on a CD
--Another computer (I used my laptop) with a lot free space on the hard drive (free space equal to the total size of damaged hard drive is ideal)
---My laptop runs Ubuntu Linux. Any Linux distro would work, just need networking, NFS, and fslint.
---I suppose it’s also possible to just use another external hard drive rather than another computer.
Steps to achieve ass-saving:
1. My laptop, fortunately, has a second hard drive that I was not using. I formatted the drive (ReiserFS) and mounted it.
2. Ensured I had NFS installed on the laptop.
3. Ensured the bad computer and the laptop were networked together (D-Link router).
4. Booted the bad computer with the SystemRescue CD.
5. On the bad computer, created a directory to mount the remote laptop hard drive. (eg: mkdir /mnt/recovery) This is where the files recovered from the bad hard drive were written to.
6. On the bad computer, mounted the (remote) laptop hard drive to the new directory (eg: mount laptop@/mnt/recovery /mnt/recovery)
7. On the bad computer, cd to the new directory and ran PhotoRec on the damaged hard drive (eg: photorec /dev/hda) PhotoRec automatically saves recovered files in the directory it is run from, hence steps 5 - 7.
8. In the PhotoRec application, select the options, such as what type of files to recover. I selected all the image, movie, and audio file types.
9. When all options were set to my liking, I started it running.
10. My damaged drive was large (160GB) and had a
11. Once PhotoRec finished, I exited the program and shutdown the bad computer.
12. On the laptop, I then installed fslint so I would have access to the findup program. This program finds duplicate images and can delete all but one copy. (eg: findup –d /mnt/recovery)
13. After that, I used gthumb on the laptop to check all the recovered photos.
14. Once I was happy with the recovered photos, I decided to wipe the damaged hard drive before sending it in to be replaced (still under warranty).
15. Booted the bad computer with the Ultimate Boot CD.
16. Went to the last page of Disk/Drive options to select a drive wiping application.
17. I opted for a DoD wipe on the damaged hard drive. This ensures (to a reasonable degree) that some bored tech with a penchant for voyeurism can’t extract my data from the drive.
18. Removed the drive and sent it in for replacement.
19. Finally, we got a new computer (running
20. On the laptop, installed gproftpd (gui-based FTP server).
21. Ran gproftpd on the laptop (after configuring it to be accessible from the new computer).
22. On the new computer, typed in the FTP address of the laptop into Windows Explorer (not Internet Explorer) and proceeded to copy all the recovered files to the new computer.
So, was my ass saved? Nope. I still got a good reaming since all the recovered files were jumbled into a single directory, whereas before my wife had them all ordered and sorted into many MANY directories. Damn it to hell. From here on out, everything gets backed up in triplicate. Stay tuned for a future tale of how this doesn’t save my ass, either…
Additional notes on ass-saving:
1. PhotoRec can be stopped during its processing. When it is restarted, it will continue from where it left off.
2. PhotoRec can be limited to specific sectors to scan by editing the photorec.ses file (located in the directory it is called from).












Comments:
pixelbeat (April 30, 2007. 10:20pm)
This is a very nice description. I wasn't aware of the photorec and testdisk tools.
I'm glad fslint was of assistance.
Pádraig.
intrepideddie (May 1, 2007. 05:20am)
Yeah, the findup feature of fslint really saved me a lot of time. PhotoRec does a great job recovering files, but there are a lot of duplicates, and it was taking me FOREVER to sort through and find them manually. Probably had about 20GB of duplicate files it found and deleted in a flash -- would have taken me ages (and my wife would have left me by the time I finished). Excellent, excellent work. Thanks for the great app!
CrystallineTulip (June 4, 2007. 07:50am)
Sweet! I've been thinking of switching to Linux myself after basically doing what you've described here something like five times now. Windows sucks and that's all I can safely say about that. I've lost more photos than I can count, so I'm with your wife on this one - I also scrapbook. =oD Good job on the recovery.
fendi164 (February 22, 2008. 03:22am)
Thanks for the note. Think i'll build myself one of those linux boxes with raid-ed terabyte capacity and install linuxMCE to complete it into a Media center. Then hopefully the harddisk crapping out will not matter anymore. I'm sure it will but at least the data will be intact..(hopefully)