TestDisk recovers lost partitions and repairs damaged boot records.

Home TestDisk recovers lost partitions and repairs damaged boot records.

Installation and requirements

TestDisk is an open-source partition recovery tool by Christophe Grenier (CGSecurity), licensed under the GNU GPL v2+. It runs on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD and DOS. On Windows, the program comes as a ZIP archive rather than an installer, so extract it to a folder on a different drive from the one you intend to recover.

After extraction, run testdisk_win.exe as administrator. The program works in a keyboard-driven text console, not a point-and-click wizard. Its menus require careful reading, particularly before choosing an operation that writes changes to a disk. For recovery work, avoid writing anything to the damaged drive until the process is finished.

Starting a recovery session

When TestDisk opens, choose Create to record a session log, then follow the on-screen menus. The log can help keep track of actions during a recovery, while the keyboard-based workflow makes it important to verify selections before applying them. For a general overview of where to read about TestDisk, the program’s name is used in the reference sentence.

Recovering partitions and boot records

TestDisk is designed to find lost partitions and, when appropriate, write them back into the partition table. This can address software-related problems such as an accidentally deleted partition table, a virus, or a user mistake. It can also help make a non-booting disk bootable again when the cause is software rather than physical damage.

For boot-sector problems, the utility can rebuild FAT and NTFS boot sectors or restore them from backup copies. It can repair FAT tables and fix the NTFS Master File Table (MFT) using its mirror. These repair functions make the program relevant when a partition remains on the drive but its boot information or file-system structures are damaged.

Undeleting files and file-system support

TestDisk can undelete files on FAT, exFAT, NTFS and ext2 file systems. It can also copy files from deleted FAT, exFAT, NTFS and ext2/3/4 partitions. This provides a way to retrieve individual files when the partition itself has been removed or is otherwise unavailable, although the text interface calls for care throughout the selection process.

The program recognizes dozens of file systems, including NTFS, exFAT, ext4, APFS, HFS+, btrfs, XFS, ZFS, LUKS and Linux RAID. That broad recognition is useful when working with disks created on different operating systems or using less common formats; it does not, however, remedy a drive that is physically failing.

Choosing the right recovery task

TestDisk focuses on partition recovery, boot-sector repair and file-system-level undelete operations. For recovering individual files through a separate utility included in the same folder, run photorec_win.exe or the graphical qphotorec_win.exe. Keeping the recovery tools on a different drive from the one being repaired helps avoid writing new data to the affected disk during setup.

The console workflow suits technicians and careful users who can review each menu choice and understand the effect of writing changes. It is less suitable for someone expecting a guided visual wizard, and incorrect choices may worsen the damage. TestDisk is free and open source under the GNU GPL v2 or later, with no paid edition.

Write your comment