Sunday, May 09, 2010

Recovering from Hard disk failures

Recently the hard disk drive in a Dell Inspiron 1420 laptop running Windows XP stopped working. The first sign of trouble was when the OS could not load and kept on prompting for safe mode boot. After a few hours of trying the safe mode option, and a lot of hung screens, the prompt for this option also stopped appearing and instead of seeing the familiar OS screen, the laptop would try to load up 'Media Direct' and hang after a few seconds.

I went on a search engine usage spree to find what tools I could use to get the hard disk drive working.

The first thing I tried, was to remove the hard disk drive from the laptop, house it within an external SATA-to-USB case and plug it in to a Ubuntu machine. This did not work well. The Ubuntu machine failed to mount the partitions. Upon trying to mount the partition which I thought was the C:, the Ubuntu OS failed to do so and recommended that I run "chkdsk /f" from another Windows machine on the hard disk.

Thus I then tried connecting the HDD to a Windows Vista laptop. The Vista OS went into an infinite loop of mounting the partitions and then immediately unmounting them. So this option was closed to me.

I decided to use Knoppix to correct the issue. I downloaded the latest version of Knoppix (v6.2.1), burnt it on a CD, installed the faulty HDD back on the laptop and ran the Knoppix live CD. Knoppix also failed to automatically mount the HDD. Manually attempting to mount the HDD resulted in the same fate as what happened on the Ubuntu OS.

While on my internet search spree, I had come across this great IBM article: "System recovery with Knoppix - What to do when good disks go bad".

I played around with the information that I got from that web page, but did not have much luck.

By this time, I had come across a tool (new to me) called 'TestDisk' which seemed to be promising.

The Knoppix live CD had the tool and so I proceeded to play around with it. After many hours, I came to the conclusion that the NTFS partition table was corrupted and TestDisk would allow me to rectify the problem.

For what it is worth, here is the partition table which TestDisk found after its "deeper search" analysis:

























































Primary Bootable FAT 16 > 32M 0111125463192717Dell Utility
DeletedFAT 32 LBA120141892546367119570Unlabeled
DeletedHPFS-NTFS12281713171343320971520Recovery
DeletedHPFS-NTFS1317134343007420713461985784
PrimaryFAT32 LBA30074239543040142415240832Media Direct

I went ahead with TestDisk and decided to delete one partition on the HDD which did not make much sense to me (the second row in the table above). Upon writing the new partition table structure to the HDD, I found that upon booting, I was able to get to the Microsoft OS prompt again. Windows XP was prompting me again to boot into the safe mode option. I tried that and also tried booting normally but both attempts were in vain.

I removed the HDD, placed it within the external enclosure and connected to the Ubuntu OS.

Voila ! I was able to mount the partition that I thought was the C: and was able to recover all important data from it.

TestDisk did save the day ! +1 for OSS tools !

, ,

No comments: