Awesome Utility: TestDisk

March 16, 2008


So, a family member brought me a laptop from a small business owner who he helps with computer issues. Well, the laptop is broke. It looks like it'll boot into Windows (XP Home) and then blue screens. Safe mode does the same thing. Although the BIOS will see the disk, the Windows install media doesn't. And of course the laptop's owner really needs the company data off of it, can't afford data recovery, and, of course, has no backups.

We pulled the drive out of the laptop and used a IDE to USB converter to hook it up to my laptop. Windows recognizes the disk and assigns it a drive letter, but took forever (like 10 minutes) before it showed up in My Computer. Attempting to access the drive via My Computer, command prompt, or even by Run (e:\) would error out. So I figured the disk is in some way corrupt and a third party recovery software was needed.

I tried several recovery softwares, but the one that eventually worked was TestDisk. TestDisk is OpenSource freeware designed specifically for drives with lost partitions or recovering data from non-bootable drives.

From thier website, TestDisk can:

* Fix partition table, recover deleted partition
* Recover FAT32 boot sector from its backup
* Rebuild FAT12/FAT16/FAT32 boot sector
* Fix FAT tables
* Rebuild NTFS boot sector
* Recover NTFS boot sector from its backup
* Fix MFT using MFT mirror
* Locate ext2/ext3 Backup SuperBlock

It can also run under DOS, Windows, Linux, BSD, MacOS, and SunOS and can handle MANY different file systems.

For my issue in particular, I did the following:

1. Hook the drive up your computer. I used an IDE to USB adapter, but I'm sure setting the drive into slave mode and installing it into a PC will work as well.
2. Allow Windows to find the drive (I'm not sure if this is necessary since Windows XP found the drive for me. It may work without Windows recognition).
3. Open TestDisk (did I mention that no install is required?).
4. It asks to create a log file, I chose Create.
5. Select the drive and choose Proceed.
6. Choose the partition table type. Since this drive was running Windows, I chose Intel.
7. Here's the meat of the software. I chose Advanced.
8. Choose your partition you want to analyze. Some drives have more than one partition; even if there's only one presented to Windows, some manufacturers have a Diagnostic or Restore partition.
9. The next option I chose is List.
10. This should list the files on the drive. Select the drive by using the Up or Down arrows. Enter will bring you into a folder. The Left arrow will bring you up a level in the folder tree.
11. Select the file or folder you want to recover and hit the C key to copy. It will present you with an option to choose the directory on the local machine (the machine you're running TestDisk from) where you want to copy the file to. Hit Enter with your choice.
12. After the copy is complete, the text "Copy done!" will appear in green text. You can now choose another file or directory to copy or hit the Q key to quit.

Also be aware that if you copy a large amount of data it will be fairly SLOW. Or at least slower than most people's standards. But you will have your data, so a little time should be no big deal.

Seriously, add TestDisk to your Admin toolbox immediately.


Tom said...

Hi there... just wondering if its possible to delete a file shown when you hit the 'P' key. I have a ext drive that can only be seen by testdisk and has a virus inside that i can see with testdisk but not any other programme i have tried. Thing is i dont know how to get rid of it with test disk, lol. TIA :)

Alexandre said...

I am using TestDisk right now to recover data from a notebook HDD with similar symptoms as you described.

It seems to be working very well. Amazing how this little angel of an application can be free and open source.

Anonymous said...

Thanks for this little tutorial. Found this on Google and it was just what I needed to figure out how to use testdisk. I was able to rescue all data on my corrupted external HD and there were thousands of hours of hard work saved on that thing! Thank goodness for Testdisk... I think I might make a donation because I really appreciate what it did for me for FREE! hehe

Anonymous said...

Something else pretty awesome about this tool is that if you don't see the partition you thought was there you can actually still recover it. While the Quick Search brings up the known partitions, you can do a deeper search to locate partitions that were not appearing.

This is a great tool, I used it myself fairly recently when my external media drive with a gazillion dollars worth of iTunes movies just went boom for no reason - I couldn't get that drive to read no matter what I tried. I came across testdisk and was able to copy my files to a new drive.

The nice thing was hooking up the new drive and putting testdisk there and running it from that drive and being able to recover files from the non-working drive. It saved me a lot of money and time.

Anonymous said...

Hi, I am new here and need help on the Advanced menu. I can see files and directory from the list option. However, the "c" for copying does not work correctly. I can highlight the file listed, select destination, then hit "c". There will be a GREEN "Copy done!" on the top left corner. When I check the destination, the file is not there. What could be the reason ? Thanks