CIDSPHERE.COM

A blog about technology, photography and some other things you don’t care

The poor man way of restoring files from damaged hard drive

July 26th, 2009. Published under Technology. No Comments.

Crashed hard driveRecently, the laptop of my boss started to do weird stuff like freezing in Windows Vista at random places. At the beginning, it didn’t happen frequently but at the end it happened nearly at every boot and teh laptop it was unusable. That’s where my technician skills enter in the game !

We had really good reasons to think that the cause of this pain was a virus. I tried to scan the computer with Windows Live One Care and, sadly, I had no time to complete the scan before another crash. I tried to reboot in safe mode with no luck.

That was the moment I suspected a hardware defectuosity. So I used tools from Dell to check the laptop hardware and it reported a hard drive error. Many files weren’t backed up and my boss really wanted them back to finish some important stuff. The best way I found to recover all files, even ones that was corrupted, was to make an image of the partition with dd and then mount the image.

# dd if=/dev/sdb3 of=/home/user/crashed-partition.img conv=noerror iflag=nonblock
# mkdir /media/crashed-part
# mount /home/user/crashed-partition.img /media/crashed-part
# ls /media/crashed-part

I could just mount the partition directly but copying files from the bad hard drive skips files affected by bad sectors. These files could be used even if they are damaged so there is no reason to skip them.

That wasn’t the first time I did that. In 2004, I had a similar problem with an Outlook PST file damaged in the middle. A 1GB file with plenty of emails that I didn’t want to lose. I did the same procedure and repaired the file with a Microsoft tool… TADAM!

That’s the best way I found to do that… I’m sure there is better way so feel free to comment other options.

Leave a Comment