TestDisk - Recover a deleted or lost partition

Page 1 / 1

If you have deleted a partition by mistake, or one or more partitions on your hard drive have disappeared, TestDisk will help you to restore them (and their data).

As you can see, the partition D is no longer displayed because Windows doesn't recognize it (hence the unallocated space displayed on the image above).

To recover a deleted partition, you must repair the partition table of the concerned hard drive in order to recover the missing partition information.
For this, we will use TestDisk.

Download "TestDisk", unzip the downloaded zip file and run the "testdisk_win.exe" file.
Then, select "Create" and press Enter.

Select the hard drive where the partition was before being removed, then press Enter.

TestDisk detects the type of partition used on the selected hard disk and display it in green at the bottom of the window.
In our case, our hard drive uses an Intel partition type (Intel/PC partition). So, we select Intel, and we press Enter.

Select Analyse and press Enter.

TestDisk displays the list of partitions currently present on the hard drive.
Select Quick Search and press Enter.

During the search, TestDisk finds one or more partitions.
In our case, the quick search was sufficient to recover our partition that had been deleted by mistake.
Indeed :
- The first line is our first partition that had been deleted, because she starts at 0 ... and ends at 10198 ...
- The second line is our 2nd partition , because she starts at 10198 ... (so, just after the previous partition).

In short, TestDisk found successfully our 2 partitions (one that had been deleted and that which is still there).

Select the first line and press "p" to display files of this partition. (As indicated at the bottom of the window of TestDisk)

If you see your files in the list, TestDisk has not made a mistake.
Do the same for other partitions detected by TestDisk TestDisk and if properly displays files of detected partitions, it's ok.
Otherwise, exit the program to avoid losing other partitions.

Note : press "q" to return to the list of detected partitions.

By default, it's possible that TestDisk detects a partition as a primary bootable partition instead of primary partition.
To correct this little detail (this is optional if no OS is installed on the selected hard disk), select the appropriate partition and use the arrow keys "left" and "right" to bring the P letter instead of the * at the beginning of the line.

Then, press Enter.

As TestDisk has successfully detected our 2 partitions that were present on our hard drive (before you delete one of them), we can write this partition table on the hard disk.
For this, select "Write" and press Enter.

Note : If TestDisk didn't detect all partitions (those existing and those that were deleted by mistake), select "Deeper Search" and press Enter. The procedure is the same as the quick search, it simply takes more time than the quick search.

IMPORTANT : TestDisk must detect all partitions that must be present on the concerned hard disk. So, this list must contain partitions that are still visible by Windows, and those that have been deleted by mistake). If it is not the case, partitions that are not shown here no longer appear under Windows.
If you have already made that mistake, you can try to reuse that program using the quick search and the deeper search to recover all your partitions.

Confirm by pressing Y.

As indicated by TestDisk, you need to reboot your computer for the change to take effect.
Appuez Enter.

Exit the program and reboot your computer.

As you can see in the disk management, partition D (games) has reappeared in the place where Windows displayed previously an unallocated space.
The other partition is still there since TestDisk had also detected it.

The partition also has reappeared in the workstation (or computer).

And no files were lost.
Note : it is not a data recovery, but simply a repair of the partition table of the hard drive concerned. TestDisk has just added the missing entry in the partition table in order for it reappears. This proves that delete a partition never deletes its contents. (unless you rewrite data on it later)