PhotoRec vs TestDisk: Which Free Tool to Reach for First When a Drive Won’t Mount

There’s a laptop on my bench right now with a 1TB Seagate inside that won’t show up in File Explorer. It spins up, clicks twice, then sits there. The owner wants their photos back. I’ve got two free tools that could theoretically help, and picking wrong wastes time I don’t have on a drive that might not survive another hour of poking.
The quick answer: if the drive is physically dying, neither tool is your first move. Image it first. But if the drive is healthy and just refuses to mount (corrupted partition table, deleted partition, wrong filesystem type), TestDisk rebuilds the mountability, and PhotoRec pulls files off raw sectors. TestDisk fixes the drive. PhotoRec rescues files. They solve different problems, and the one you reach for depends on what “won’t mount” actually means in your case.
Let me break down when each earns its keep, where they fail, and how I decide.
The real difference between the two
Both live in the same package (CGSecurity’s TestDisk utility bundles PhotoRec alongside it). They share a download, they share a command-line interface on Windows if you avoid the bundled GUI launcher, and they’re both free and open source. That’s about where the similarity ends.
TestDisk works at the partition level. It reads and repairs the partition table, the boot sector, and the filesystem metadata. If your drive has lost its partition entry (say, a repartitioning gone wrong or a corrupted MBR), TestDisk can scan the raw disk, reconstruct the partition layout, and write a new partition table so Windows or Linux can mount the volume again. The files stay where they were. Nothing gets copied. The drive just becomes reachable.
PhotoRec doesn’t care about partitions or filesystems at all. It reads raw sectors sequentially and looks for file signatures (headers and footers) that indicate a JPEG, a PDF, a DOCX, a video container, and so on. When it finds a match, it carves the file out and writes it to a separate destination. Filenames and folder structure are gone in most cases. You get recovered files with generic names, and you’ll spend the next hour sorting through the pile.
When TestDisk is the right first call
Reach for TestDisk when the hardware itself seems fine but the operating system can’t see the volume. Signs that point your way:
- The disk appears in Windows Disk Management as “unallocated” or “raw”, but it shows up in the BIOS.
- A partition you’re sure existed has vanished after a failed Linux install or a botched cloning operation.
- The drive mounts but reports the wrong size, or a boot sector error appears.
- The drive works on one machine but won’t mount on another due to a partition table mismatch (MBR vs GPT, typical after moving a drive between systems).
For those, TestDisk’s partition-rebuild and boot-sector-repair features make sense because your data is probably still intact. The map just needs fixing. Run the analyze pass, let TestDisk list what it finds, and write the partition table only after you’ve confirmed the layout looks right. If it gets this wrong you can make things worse, so back up the current partition table first (TestDisk offers that option before writing changes).
What TestDisk won’t help with: a drive that fails to spin up, a clicking head, or a controller that drops off the bus every few minutes. Those are hardware failures. Repairing the partition table on a dying disk just accelerates the dying part.
When PhotoRec is the right first call
PhotoRec is the tool to reach for when the filesystem is beyond saving but the media is healthy. Cases where I’d go straight to PhotoRec:
- The drive was reformatted (a quick format wiped the filesystem metadata but left the data on disk).
- A partition was deleted and recreated, and TestDisk’s rebuild can’t find the old layout.
- You need files off a memory card, USB stick, or SD card that Windows wants to format.
- The drive is readable at the sector level but no filesystem tool will touch it.
PhotoRec reads the raw device. On a hard drive or SSD, that works fine as long as the sectors are readable. On flash media it’s particularly useful because SD-card controllers sometimes report garbage that no filesystem driver will accept.
The downside is real: fragments. PhotoRec carves fragments, so a large video file with fragmented sectors may come back truncated. Small files (JPEGs, text, small PDFs) tend to recover whole. Videos and large archives are hit or miss. It also doesn’t preserve folder structure, so recovered files land in numbered folders and you have to hunt. And it takes time: a full 1TB scan through a USB 3.0 interface can take hours. I’ve found that PhotoRec on a 5,000-photo SD card finishes in about fifteen minutes, but a 512GB drive with mixed content can run a couple of hours.
The order of operations I actually use
- Confirm the drive is healthy enough. Listen for clicking, check S.M.A.R.T. status, and check whether the drive shows up in the BIOS. If it’s failing, image it before any recovery tool touches it. A full drive image preserves what’s readable before more sectors drop off.
- Try to mount it first. On Windows, plug it into a machine with a known-good USB controller, not a dodgy dock. I’ve seen “won’t mount” resolve after swapping the enclosure. Check Disk Management and Device Manager before assuming filesystem damage.
- If it’s a partition/table problem, run TestDisk’s analyze pass. Review the detected layout carefully. Repair the partition table only if it looks right. Reboot and see if the volume mounts.
- If it still won’t mount or the filesystem is dead, run PhotoRec. Point it at the raw device, not the mount point, and write recovered files to a separate drive, never the same one.
Both tools run on Windows, macOS, and Linux. On Windows the standard download is a console-based app; CGSecurity’s instructions walk you through the CLI prompts. If you’re comfortable with a terminal that’s fine; if not, the bundled qphotorec GUI makes PhotoRec a bit less intimidating, though the TestDisk side is CLI-only. Neither tool is pretty. Neither tool will guide you by the hand. But both are free, and both have recovered data for me (and for plenty of other people) when commercial recovery software wanted a subscription fee to even scan.
What neither tool can do
Both fail on encryption. If the drive was BitLocker-encrypted or encrypted with FileVault, the recovered data isn’t recoverable without the key. PhotoRec will happily carve out file signatures from an encrypted volume, but those “files” are garbage. TestDisk won’t mount an encrypted partition because it has no way to decrypt it.
Both also run into trouble on modern SSDs with TRIM. If the operating system has had time to send TRIM commands after a delete, the data is gone at the controller level. No carving tool recovers it. This is why the recovery clock matters: the sooner you stop using the drive after a deletion, the better your odds. On a mounted, TRIM-enabled SSD, that window may be measured in minutes.
Finally, neither tool recovers files from a failed drive that’s physically dead. That’s the department of professional recovery services, and they cost real money. If your data is worth that, don’t run free tools on a drive that isn’t healthy enough to image first.
My verdict, briefly
Start with TestDisk if the drive itself is alive and the volume simply won’t mount. That’s the more common scenario, and fixing the partition table is faster and cleaner than carving a terabyte of files out of raw sectors. Keep PhotoRec in reserve for when the filesystem is beyond repair but the media is healthy, or when you need specific files off a card that Windows refuses to read. Both are worth having in the toolbox; the question is only which one matches your failure.
And before any of this, if the drive is making noises it shouldn’t, stop poking at it. The phone number of a data recovery lab costs less than the peace of mind you lose when a clicking drive finally gives up mid-scan.