← Back to CGSecurity

TestDisk

Maker: CGSecurity (Christophe Grenier) Runs on: Windows, macOS, Linux, BSD, Solaris, DOS

TestDisk isn't a general competitor to R-Studio, UFS Explorer or Disk Drill. Its real strength is narrower and more specific — partition discovery, selected filesystem and boot-sector repair, and undelete on the file systems where enough metadata survives — all in one free, text-mode tool with no tiers and no separate "Pro" edition. PhotoRec, distributed in the same download, is a separate utility.

Recovery scenarios

TestDisk is built for lost or deleted partitions, partition tables and boot sectors that no longer describe the disk correctly, drives that ask to be initialized or show as RAW, and deleted files on the filesystems where its undelete works. See Partition Loss, Drive Asks to Be Initialized, RAW Drive and Computer Won't Boot for the specific cases it targets.

Scan and recovery methods

Per CGSecurity's own documentation, TestDisk analyzes a disk's partition structure and searches for partitions that have gone missing, with a Quick Search for the ordinary case and a Deeper Search as the low-level fallback. On a found partition it can list and copy files from supported file systems, and on a narrower set it can undelete files whose directory records still describe them. It also runs scripted, non-interactive operations for repeatable batch use. TestDisk is not a carving engine: when filesystem metadata is gone or too damaged to trust, CGSecurity directs users to PhotoRec, the separate signature-based utility.

File system support

Three TestDisk capabilities need to be kept apart:

  • Detection: partition and filesystem detection covers a very broad list, including FAT/exFAT, NTFS, HFS/HFS+, Ext2/3/4 and several Linux/Unix and older systems.
  • Reading and copying files: TestDisk can list and copy files from supported filesystems on a found partition.
  • Undelete: TestDisk can undelete files on FAT12, FAT16, FAT32, exFAT, NTFS and ext2, and it can search ext2/ext3 superblocks directly when the primary one is damaged. On ext3 and ext4 it cannot reconstruct deleted file data the way it does on ext2, because those file systems don't retain the block-location information its undelete method relies on; PhotoRec is the fallback there.

Disk imaging and virtual disks

  • Create an image: the Advanced menu includes Image Creation, which writes an image of a single partition to image.dd — a straight copy, not a multipass imager for a failing drive.
  • Open an existing image: an image file, including one made with ddrescue, can be given to TestDisk as its source instead of a device.

An unstable drive needs a dedicated imaging tool that skips and retries unreadable areas before TestDisk works on the copy.

Source handling and write operations

Some of TestDisk's most useful functions — rewriting a partition table or MBR, rebuilding FAT or NTFS boot sectors, repairing the NTFS MFT from its mirror, restoring the HFS+ volume header from backup — intentionally write to the source. Finding the correct partition geometry and writing it back are two different decisions: if the data on the drive matters, recover or copy it first, or work from a disk image, before using the repair functions on the original. Listing and copying files does not write to the source; TestDisk's undelete copies files to another destination rather than un-erasing them in place. See Recovery Copies and Partition Table & Filesystem Discovery.

License

TestDisk

Free

Analyzes partition structures, can locate lost partitions, copy files from some supported file systems, create a partition image, and offers partition-table or boot-sector repair functions. Those write-capable repair functions should be treated separately from data recovery on a source that matters.

  • LicenseGNU GPL v2+ — free, open-source
  • InterfaceText-mode / terminal interface, no GUI
  • Current version7.2 (February 2024)
$0Free and open-source, always
View on cgsecurity.org →

TestDisk is free and open source under the GNU GPL v2+; every build has the same feature set, with no paid tier.

The real cost isn't money

TestDisk being free doesn't mean it's the easiest option — the text-mode interface has a real learning curve compared to the wizard-driven consumer tools elsewhere in this directory. It rewards reading the documentation before running it on a drive that matters.

Limitations

  • Not a full NTFS, ext4 or APFS reconstruction engine; detecting a filesystem is not the same as undeleting from it.
  • No undelete on ext3/ext4; no built-in carving — PhotoRec is the separate tool for that.
  • Writing a found partition back is not automatically the right next step; repair functions write to the source.
  • Partition images only; no multipass acquisition for failing drives.
  • For plain accidental deletion on a healthy drive, or cases needing RAID support or a guided interface, the consumer and technician tools elsewhere in this directory are a better starting point.

Sources

Features verified: November 2026.