Testdisk & PhotoRec: One of the most powerful data/partition recovery duo you will ever use
October 11, 2009 16
Email article | Print article
I remember long ago, in my Linux phase, I used to mess up my Windows partition about twice a day (don’t ask me how… it just happened). Back then, I discovered Testdisk and used it to recover/boot my Windows partition when I had problems (it was usually very successful). Since then I have moved on from Linux and forgotten all about Testdisk; yet the lingering memory of the program still remained in my memory and whenever I wanted to write about Testdisk, I just couldn’t think of the darn name. Well, recently a couple of people have been recommending I check out PhotoRec, and in the process I rediscovered Testdisk. Turns out Testdisk and PhotoRec are companion programs that are from the same developer, come in the same download, and both are probably the most powerful programs in their specific class.
Testdisk
Testdisk is an open source, command line utility designed to help you either recover deleted partitions, or to boot non-bootable partitions. 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
- Undelete files from FAT, NTFS and ext2 filesystem
- Copy files from deleted FAT, NTFS and ext2/ext3 partitions.
The great thing about Testdisk is it actually works; it finds undeleted partition at a much higher recovery rate than any other partition recovery software I used yet (note, however, you will need to do the “dig deeper” option to find more partitions; the normal scan is not the best). The downside, obviously, to Testdisk is it is a command line utility with no GUI (Graphical User Interface). Well, to say it is command line is a lie; you actually do not have to physically type in any commands to use Testdisk. Rather you just select the options from the menu it gives you…
…and so on, so forth. Testdisk is actually very easy, and well worth the effort put into learning how to use it, so don’t let the lack of a GUI deter you.
Of course partition recovery and boot fixing is something better done outside of Windows rather than inside Windows, so there are ways to run Testdisk from a bootable CD; or you can always download a live CD which comes with Testdisk on it.
PhotoRec
PhotoRec is going to be of more interest to more people than Testdisk. PhotoRec is a software that specializes in data recovery, as opposed to partition recovery of Testdisk. PhotoRec works on hard drives, CDs, external media (memory cards, USB/flash drives, etc.). While PhotoRec also lacks a GUI, just like Testdisk, it is also fairly easy to use if you look past the big, bad, command prompt:
While PhotoRec is not the fastest data recovery program I have used (it is also not that slow; it took just over 12 minutes to recover data from a ~5GB partition), the recovery rate of PhotoRec is the best I have ever seen. It successfully recovered thousands of files for me (yes, it is even more powerful than DiskDigger) – and it recovers many, many different types of files, including by not limited to images, movies, documents, and executables.
One of the big reasons why PhotoRec has such as great recovery rate is it ignores the file system of the partition you are scanning; on the other hand the problem with ignoring the file system is it does not recover file names for you. Another problem with PhotoRec is it is an all or nothing; it does not allow you to pick and chose which files you want to recover – it recovers them all (even malware files so be careful). You can, though, mitigate how many files PhotoRec recovers by designating PhotoRec to only look for files of a specific format:
Since PhotoRec recovers all files instead of allowing you to select only certain ones, PhotoRec is not for every day usage. Rather, it is for “doomsday” when you have a critical technical malfunction, lose everything, and need to recover extremely important data.
Take note Testdisk & PhotoRec come as one download and to run them you need to look in the “win” folder that you unzip the .ZIP you download.
Overall, I highly recommend Testdisk & PhotoRec to anyone that can make use of the services they provide. Both are definitely one of the best you will ever find in their class; and since they are both free, you have nothing to lose and everything to gain by giving them a try [when you need them]. You can download Testdisk & PhotoRec from the following links:
Supported OS:
- DOS/Win9x
- Windows
- Linux
- FreeBSD, NetBSD, OpenBSD
- SunOS
- MacOS
Testdisk & PhotoRec homepage [direct download (for Windows version)]
16 Comments »
Leave A Response »





















Thanks for this awesome and informative article Ashraf! Testdisk will definitely come in handy for me, as I have experienced turning on my pc only to discover the boot sector is corrupted just 4 years ago.
I get an error notice saying it can’t start because cygwin.dll can’t be found. Seems to be in the folder with recphoto.exe, but I still get the error notice. I had tried to download this program from the website previously but had the same problem.
Indeed testdisk is excellent rescuer, I was once has legacy FAT (W95) HDD that near breakdown, I wanted connect as USB and just copy whatever I can, but WinXP says the drive is not initialized, I should have known better, after that initialization, it just appear as bare drive, and the cranking box no long able to boot the drive, the testdisk got it back!
Found these two about a year ago when an external drive partitioned into three drives got corrupted on the first partition. Windows refused to see the external drive. I used PhotoRec to recover images and TestDisk to repair the first partition temporarily. I was able to determine if I had other backups (I did) before taking the faulty drive out of service for good. Highly recommended; terrific review, Ashraf.
Brilliant! Thanks Ashraf! About a year or so ago I crashed my laptop badly (is it ever goodly?) and was unable (through a complete lack of knowledge and a post-crash panic in which I mucked around where I shouldn’t have) to retrieve anything. At the time, I had spent three weeks researching and writing up information for an environmental website that a big org was setting up – and the horror of the extent of the calamity when I lost all that work was beyond belief. I never, ever want to have to go through that again. So this is perfect. On behalf of people like me (who are known to cause inconceivable and previously unheard of damage to comps), I thank you from the bottom of my heart. :)
Everyone:
This is a general notice. Would anyone who knows programming make a GUI for this prog? Yes it’s great, but most people would just shut up and escape when they see command line. Anyways, just a simple two lines of C++ or Pascal could make it scan for the file system and decide on itself.
@Adrian: The folks at DonationCoder are the ones to put this request to. Check ‘em out as they’re an awesome crew.
@Adrian and Clive: Testdisk & PhotoRec are very well known. The reason no one has made a GUI for them yet may be because it is too hard or impossible (for whatever reason).
Excellent write up! Both tools are fantastic, and it is why I put them on Bauer-Puntu Linux 9.10R2!
Can PhotoRec recover files from a computer that has been reformatted?
Used both these this week on two drives – one with a missing partition table (testdisk) and one which had been formatted with a laptop recovery disk (photorec)
Both worked amazingly – better than any commercial offerings.
I have a question for a technical user. I’m not interested in further cluttering my system with programs unless they will help me, so I thought I’d see what you advise. I’m fairly technical myself, but I need another opinion.
Yesterday I accidentally deleted a recording on my digital voice recorder, which is of the Sony ICD-PX series. It’s not currently available to me and I don’t remember the exact model.
I need a way to recover that recording. It is very important to me. I chatted with Sony support and they said I should pay their data recovery team something like $100 plus $20 return shipping to do it for me.
The problem is, the recorder does not show up as a drive in Windows. It’s not made that way. It connects by USB, but only Sony’s software sees it. Recordings are stored as MP3s.
So, can a program like Testdisk or PhotoRec – or any other type – recover files from devices that don’t register themselves as drives? Any recourse for me?
Thanks!
~N
I confirm. These are two outstanding programs. Absolutely saved my 750 GB that had over a 1000 hrs of work on it.
[@Nebulous]
I’m sorry, but I can’t help you with this, but if Sony has in fact made their recorder invisible to your GUI, that is so SELF-SERVING I’d write Sony a letter and tell them I’m through with their products. I’ve owned a lot of Sony products and they do a lot of things to keep squeezing money out of people.