Recovery Guides & Troubleshooting

Step-by-step guidance for using TestDisk: from starting the program to analyzing disks, recovering partitions, and copying files safely.

TestDisk is command-line based. You navigate with the keyboard (arrow keys, Enter, sometimes letter keys). There is no mouse-driven GUI. The menus are text-based; once you learn the flow, the process is consistent across runs.

How to Start TestDisk

After extracting the downloaded archive (do not install or run from the drive you are recovering), launch the TestDisk executable. On Windows, double-click testdisk_win.exe (or the appropriate executable for your architecture). On Linux or macOS, run testdisk from a terminal. TestDisk opens in the default terminal/console. You may need to run it with elevated or administrator rights when working with system disks.

How to Create or Use a Log

At startup, TestDisk asks whether to create a new log file. Choose Create to record the session. The log helps with troubleshooting and gives a record of what was detected and what actions were taken. Logs are written to the current working directory (or the folder containing the executable, depending on how you launched TestDisk). Keep logs for important recovery sessions.

How to Select the Correct Disk

TestDisk lists all disks it can see (by model, size, and sometimes device name). Use the arrow keys to highlight the disk you want to work on, then press Enter. Verify disk selection carefully: working on the wrong disk can lead to data loss or overwriting. If you are unsure which disk is which, note the size and model from your OS (e.g. Disk Management on Windows, lsblk on Linux) and match them to the list. Do not select the disk where you will save recovered files if that is different from the problem disk.

screenshot (4).avif
TestDisk disk selection
Selecting the disk in TestDisk

How to Choose the Partition Table Type

TestDisk asks for the partition table type (e.g. Intel for most PC MBR disks, EFI GPT for GPT, Mac for Apple partition map). It often suggests one automatically. If the suggestion matches your system (Windows/Linux/Mac), press Enter to accept. Otherwise, select the correct type from the list. Wrong type can cause incorrect analysis.

How to Analyze for Lost Partitions

From the main analysis menu, choose Analyze. TestDisk shows the current partition structure. Then:

  • Quick Search scans for partition boundaries using common layouts. It is fast and finds many lost partitions.
  • Deeper Search goes further: it looks for FAT32 backup boot sectors, NTFS backup boot superblocks, and ext2/ext3 backup superblocks, so it can detect more partitions or confirm findings. It takes longer.

After the search, TestDisk lists found partitions. You can inspect each one (e.g. view files) before deciding to write a new partition table. Only write when you are confident the listed partitions are correct.

How to Inspect Found Partitions

When a partition is highlighted, you can open it to browse directories and files (where the file system is readable). This helps confirm that the partition is the right one and that data is accessible before you commit changes. Use the Advanced menu for the selected partition to list and copy files.

Advanced / Undelete Workflow

To undelete files or copy files from a deleted or damaged partition: go to the main menu, choose Advanced, select the partition (or the disk and then the partition), then use Undelete or the option to list/copy files. Choose a recovery destination on a different drive—never save recovered files back onto the same drive you are recovering from.

How to Copy Recovered Files Safely

When TestDisk prompts for a destination, select a folder on another physical drive or external storage. Do not install or save recovered files to the same affected drive. After copying, verify important files (open a few, check sizes) and back up the recovered data as soon as possible.

Troubleshooting: Common Situations

[Boot]

Drive is not booting

TestDisk can fix partition tables and boot sectors that prevent the OS from booting. Run TestDisk from a live environment or another OS (e.g. boot from USB), select the non-booting disk, analyze and search for partitions, then repair the partition table or boot sector as needed. Writing the corrected structure may restore bootability. Ensure you have selected the correct disk and partition before writing.

[Partition]

Partition disappeared

Use Analyze → Quick Search, then Deeper Search if necessary. TestDisk will list found partitions. Inspect them to confirm they are yours, then choose to write the partition table so the partition becomes visible again in the OS. Do not write to the disk from the OS until recovery is done.

[FS]

File system appears corrupted

If the partition is visible but the file system is damaged (e.g. RAW, or “needs to be formatted”), use TestDisk’s boot sector and MFT repair options where applicable (NTFS), or FAT repair, or ext backup superblock. Advanced → Boot or similar menu options may offer “Rebuild BS” or “Recover BS from backup.” Try recovery options before formatting.

[Inaccessible]

Recovered partition still looks inaccessible

After writing the partition table, the OS may need a reboot or a rescan of disks. If the partition still does not mount, the file system on that partition may be damaged; use Advanced menu to try boot sector/MFT or FAT repair, or copy files out via TestDisk to another drive.

[Disk]

Unsure which disk to choose

Match disk size and model to what you see in your OS (e.g. Disk Management, lsblk, System Information). Disconnect other drives if necessary to reduce confusion. Never guess: selecting the wrong disk and writing can destroy data.

Best Practices

  • Do not install or save recovered files to the same affected drive.
  • Verify disk selection carefully before analyzing or writing.
  • Back up recovered data immediately to another device.
  • Use a read-careful workflow: inspect partitions and only write when you are sure. Create a log for the session.

Technical reference: commands & usage

TestDisk does not modify the Windows Registry; it works at the disk and partition level (partition tables, boot sectors). Below are typical commands for running TestDisk and for verifying download integrity.

Run TestDisk from command line
# Linux / macOS (may require sudo for system disks)
testdisk

# Windows: run from the folder where you extracted TestDisk (e.g. testdisk-7.2.win)
testdisk_win.exe
Verify download checksum (SHA-256)
# Windows (PowerShell or Command Prompt)
certutil -hashfile testdisk-7.2.win.zip SHA256

# Linux / macOS
sha256sum testdisk-7.2.linux.tar.bz2
# or
shasum -a 256 testdisk-7.2.mac.zip
List disks (Linux) before running TestDisk
# Match disk size and model to TestDisk's list
lsblk -o NAME,SIZE,MODEL
# or
fdisk -l

For Less Experienced Users

TestDisk’s workflow can be followed step by step. Read each menu before pressing a key. Create a log, select the correct disk, accept or choose the partition table type, then run Analyze and search. Do not write the partition table until you have confirmed the found partitions. If you are unsure, seek help from the official documentation or the CGSecurity forum. The tool is manageable for beginners who follow instructions carefully.

Companion Tool: PhotoRec

When you need signature-based file recovery—for example, recovering photos or documents after a format or when the file system is gone—TestDisk does not include a signature scanner. The following tool from the same ecosystem is the right choice for file-by-file recovery.

Companion Recovery Tool

PhotoRec

PhotoRec recovers lost, deleted, or formatted files—photos, videos, documents, and archives—by scanning raw disk data block-by-block for known file signatures. It can often recover files even when the file system is badly damaged or the drive has been reformatted. A command-line version is available; QPhotoRec offers a beginner-friendly GUI.

Use TestDisk for partition and file-system repair; use PhotoRec when you need to recover individual files by type from damaged or formatted media.

Download PhotoRec / QPhotoRec