ThisCalculator

Everyday

Free Recover Deleted or Lost Partitions with TestDisk?

Updated · Standard formula, shown below

Average pace 5.00 min/km
Average speed
12.00 km/h
Result
Finish time
50 min
You entered
Distance
10 km
You entered

Free Recover Deleted or Lost Partitions with TestDisk?

Yes, TestDisk is a free, open-source utility that can recover deleted or lost partitions, and it is one of the most powerful tools available for this task. You run it from a command-line interface, select the disk, scan for lost structures, and then write a recovered partition table back to the drive. It works on Windows, macOS, Linux, and BSD, and it can often restore access to data that would otherwise require expensive commercial software.

Formula

The calculator above is a pace and speed converter, not related to TestDisk. It computes:

Pace = finish time (minutes) ÷ distance (km), giving min/km.

Speed = distance (km) ÷ (finish time (minutes) ÷ 60), giving km/h.

Variables: t = total minutes, d = distance in kilometers. If you enter a time like 50 minutes and a distance of 10 km, the pace is 5.00 min/km and the speed is 12.00 km/h.

Worked Example

Using the defaults: t = 50 min, d = 10 km.

  • Pace = 50 ÷ 10 = 5.00 min/km
  • Speed = 10 ÷ (50 ÷ 60) = 10 ÷ 0.8333 = 12.00 km/h

So the calculator returns a pace of 5:00 per kilometer and a speed of 12 km/h.

Background: What TestDisk Does

TestDisk is part of the PhotoRec family of tools, both developed by Christophe Grenier and distributed under the GNU General Public License. It has been around since the late 1990s and is widely regarded as a standard free recovery tool. Unlike file-recovery programs that scan for individual files, TestDisk works at a lower level: it examines the partition table, boot sectors, and filesystem metadata to rebuild the structure that the operating system needs to access the data.

It supports many filesystems, including NTFS, FAT, exFAT, ext2/3/4, HFS+, APFS (limited), and others. It can also fix a damaged boot sector or rebuild the Master Boot Record (MBR) and GUID Partition Table (GPT).

How TestDisk Recovers Partitions

The recovery process follows a clear sequence of steps:

  1. Run TestDisk as administrator/root – it needs full disk access.
  2. Select the disk – choose the physical disk (not a partition) that contains the lost partition.
  3. Choose the partition table type – usually Intel (MBR) or EFI GPT, but TestDisk can auto-detect.
  4. Analyze – TestDisk scans the disk for existing and missing partitions.
  5. Quick search – it looks for partitions in the current partition table and any that are still visible.
  6. Deeper search – if the quick search fails, a deeper scan examines every sector for filesystem signatures.
  7. Select and write – when the lost partition appears in the list, you press Enter to mark it, then choose “Write� to save the corrected partition table.

After writing, you exit TestDisk and reboot. The partition should appear in the operating system with its drive letter or mount point, and the files should be accessible again.

When to Use TestDisk vs. File Recovery Tools

TestDisk is the right choice when the partition itself is missing, deleted, or corrupted, and you want to restore access to the whole drive. It is not designed to recover individual files that were accidentally deleted from an existing partition – for that you would use a file recovery tool like PhotoRec (which comes bundled with TestDisk) or commercial software.

Common scenarios where TestDisk works well:

  • A partition was accidentally deleted while creating a new one.
  • A disk shows as “unallocatedâ€� or “uninitializedâ€� in Disk Management.
  • An external drive or USB stick lost its partition due to a power failure or unsafe removal.
  • A boot sector is damaged, preventing Windows from starting.

Common Problems and Limitations

TestDisk is powerful but not magic. It cannot recover data from a disk that has been overwritten – if you have already created new partitions or written files to the same area, the old partition structure may be gone forever. It also fails if the disk has physical damage; in that case, you should use a tool like ddrescue to clone the drive first.

Another common issue is user error: selecting the wrong disk or writing the wrong partition table can make things worse. Always double-check the disk identifier (e.g., /dev/sdb, Disk 1) and back up any critical data if the disk is still partially accessible.

TestDisk is a command-line tool, which can be intimidating. There is no graphical undo, so a mistake can be destructive. However, the tool is widely documented, and the step-by-step prompts are clear enough for a careful beginner.

Safety and Best Practices

Before using TestDisk, follow these safety rules:

  • Stop using the disk immediately – any write operation can overwrite the very data you want to recover.
  • Work on a copy if possible – use a tool like dd to create a sector-by-sector image of the disk and run TestDisk on the image.
  • Do not write to the original disk until you are sure – TestDisk’s “Writeâ€� action is final.
  • Use a different disk for the TestDisk program itself – do not install it on the drive you are trying to recover.
  • Be patient – a deep scan on a large drive can take hours.

If you are not confident, consider using a professional data recovery service, but that is expensive and not always necessary.

Alternatives to TestDisk

There are other free and commercial tools that can recover partitions:

  • PhotoRec – from the same author, focuses on file recovery rather than partition structure.
  • GParted – a graphical partition editor that can sometimes detect and recover lost partitions, but it is not a dedicated recovery tool.
  • MiniTool Partition Wizard Free – offers a “Partition Recoveryâ€� wizard with a graphical interface.
  • EaseUS Partition Master – commercial, but has a free trial version.
  • TestDisk’s own documentation – the official wiki is a valuable resource for specific cases.

For most users, TestDisk is the first choice because it is free, open-source, and runs on multiple operating systems. The lack of a graphical interface is its main drawback, but the command-line prompts are relatively straightforward.

Frequently Asked Questions

Will TestDisk recover my files after a partition is deleted?

Yes, if the partition structure is still intact or can be rebuilt, TestDisk will restore access to the partition, and your files will be visible again. It does not recover individual files – it recovers the partition itself. If the partition table is rebuilt correctly, the filesystem becomes mountable and the files are exactly as they were.

Can TestDisk recover a partition from a failed SSD?

It depends on the failure. If the SSD has logical corruption (e.g., a bad partition table), TestDisk can help. If the SSD has physical damage or the controller has failed, TestDisk cannot fix that. In such cases, you would need specialized hardware or a professional service.

Is TestDisk safe to use?

TestDisk is safe if you use it carefully. The main risk is writing the wrong partition table to the wrong disk, which can destroy data. Always verify the disk selection, and consider using a disk image for testing. The program itself does not modify anything until you explicitly choose “Write�.

How long does a TestDisk deep scan take?

A deep scan reads every sector of the disk. On a 1 TB drive, it can take several hours, depending on the disk speed and the computer’s processing power. A quick search is much faster – usually a few minutes – and often finds the lost partition if it was recently deleted.

Can TestDisk recover a partition from a USB flash drive?

Yes, TestDisk works on USB drives, SD cards, and other removable media, as long as the operating system can see the device. The process is the same as for an internal hard drive, but you must select the correct device letter or /dev/sdX identifier.

What should I do if TestDisk finds the partition but the files are still not accessible?

If the partition is recovered but the filesystem is still corrupted, you may need to repair the filesystem. On Windows, run chkdsk on the recovered partition. On Linux, use fsck. If that fails, you may need to use a file recovery tool like PhotoRec to extract the files directly.

Related

Formula used
in t | Finish time | min | 50 | 0
in d | Distance | km | 10 | 0
out pace | Average pace | min/km | t / d | 2
out speed | Average speed | km/h | d / (t / 60) | 2

Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.