Sometimes in the world of free software, you have to make the best of what’s available. Sometimes what’s available isn’t all that great. When I suddenly lost some critical data as a result of a corrupted drive, I thought I’d have to shell out some potentially serious cash for a high-quality recovery utility. In my research to find the right program, I came across mention of TestDisk, an amazingly handy free utility which has saved me from the loss of a lot of data (not to mention a rather angry spouse). It’s a command line tool so there’s no fancy GUI, but the menu-driven interface makes the recovery process quite simple, and it can handle FAT, NTFS, ext2-4, and more.
Note: Not all recovery features will be exactly the same across all filesystem and partition types.
While it is a Linux utility, you don’t actually have to have Linux installed to use it. There are several live CDs you can use to run TestDisk, and a full list can be found here.
If you’re not familiar with Linux or live CDs, don’t let that put you off. Many of the systems in the link above are very user-friendly and require no special knowledge. You download the .iso file, which can range from a few MB to a few GB and use your favorite burning software to burn it to CD/DVD. Make sure you select the Burn Image/Burn ISO or similar sounding option, as it will not be bootable if simply dropped onto the CD as an ordinary file. When complete, reboot your PC with the CD in the drive and your live Linux should start up.
If you’re already running Linux, TestDisk is likely available in your distribution’s online repositories. Ubuntu users, for example, can fetch it with
sudo apt-get install testdisk
or use the Ubuntu Software Center.
When you launch TestDisk, you’ll be asked a question about how to handle log files. As this is the first time we’re launching it, we just need to create a new one.
That’s not a bad screenshot, the program really is that odd grey color.
Once the program has detected your drives, you’ll be given the option to select which of them needs the recovery. This list also includes external media such as USB hard drives, so be certain you’re selecting the right device. Additionally, the size value must be accurate if you want a proper recovery. Anything else indicates a problem detecting the drive and will result in a recovery failure.
After that you’ll select the type. Changes are, you want the first option, Intel. Anything else and you’d probably know it.
Now, you choose the action you want to perform. For a normal recovery attempt, just choose Analyse. We’ll cover the other options in a moment.
Hopefully, TestDisk will find your lost partition(s) and give you the option to write the recovered data to disk. If not, you may be in for a deeper scan. This will search your drive cylinder-by-cylinder in an attempt to find the lost data. If you’ve gotta do a deep scan, get yourself come coffee and a magazine. It’ll take a while.
If you had chosen Advanced instead of Analyse in the menu shown above, you’d have some other very handy options at your disposal.
Boot will make an attempt at recovering the boot sector of the selected partition. Image will let you create a image file from the selected partition, and other partition types can have several other options depending on their type.
Most of TestDisk’s other options, such as Geometry and MBR Code, can be potentially hazardous to your system if used improperly. Unless you know precisely what you’re doing, it’s recommended that you avoid these sections.
Since the first time I ever used it, I knew TestDisk would make its way into my top recovery tools, right along with Clonezilla and Super Grub Disk. In my experience, it has actually outperformed a few of the paid recovery tools I’ve used in my years as a PC tech. After all, it’s a nearly-universal, full featured, highly effective data recovery program that can be run from a live CD – for free. What’s not to love?
Our latest tutorials delivered straight to your inbox