Monday, October 17, 2011

Recovering data from a corrupted pen drive

My wife complained that one of her pen drives stop working and the OS doesn't recognize it any more.

When I check the device I realized that it doesn't have a partition table any more. May be the device is failing. So I quickly create an image of the whole device using dd.

sudo dd if=/dev/sdc of=pendrive.img

I tried fsck.vfat on the image without any luck. Then I found this article.

The magical tools are, testdisk, photorec, and foremost. Very importantly it all comes FREE with Linux.

I manage to recover most of her important files with these tools. Many thanks to the creators of these software!