[HOW TO] Recover deleted files and corrupt harddisk in Ubuntu

by freak on December 3, 2009

Few days ago, a friend of mine complained that his Windows declared a drive as damaged and asked to format it each time. He went to market and asked an expert if the files can be recovered. The expert said that he would recover the file but it would cost him NRs. 2000. So, thinking if a market expert can fix the issue than my friends can too he brought the harddisk to me.

The problem wasn’t too serious. The head was still moving and reading data. So, I installed testdisk in my Ubuntu 9.10 ( Karmic Koala ) machine. For installing testdisk, I fired up the terminal and typed in the command:

sudo apt-get install testdisk

After installing testdisk, I started testdisk with super-user privilage in termianl as:

sudo testdisk

I was presented with a lists of harddisks present in the system. I selected my friend’s harddisk. After selecting “Intel” for Windows Partition, I selected “Advanced” option. I selected the partition to recover and choosed “Boot” option. Again I was presented with a list of partition. I selected “List” option there and after few minutes I was presented with a list of files present in the drive. I selected the files to be recovered, pressed “c” on the keyboard and then choose recovery directory and got the files recovered.

That was pretty easy with a GNU/Free tool without waste of any money. I learnt a new lesson and my friend got his files recovered.

Please feel free to ask if you have any problem. I’ll be uploading some images in future.

Regards

fr3ak

{ 1 comment… read it below or add one }

Shannon VanWagner February 5, 2010 at 2:40 pm

Cool post.

Just wanted to add that in addition to the marvelous ‘testdisk’ utility (by Christophe GRENIER cgsecurity(dot)org), there’s also the ‘photorec’ utility that’s installed automatically with the testdisk package in Ubuntu, which can be used to recover deleted files from your drive.

After installing testdisk, as noted in the article, simply run ’sudo photorec’ (no quotes) and follow the onscreen instructions.

Congrats on your GNU/Linux freedom!
Regards,
Shannon VanWagner
humans-enabled.com

Leave a Comment