Recover Unallocated Partition of Hard disk

Testdisklogo clear 100.pngToday was a hectic day for me. Today suddenly while accessing my External hard disk in latest Windows 10 May 2019 update the disk was not initialising. While trying to initialise disk with GPT/MBR from the "Disk Management" suddenly my hard disk started displaying as "Unallocated".

It was such a frustrating situation for me as I was worried about loosing my data. I have tried many solutions to fix it out but unfortunately it was increasing my frustration. At last, I found a freeware named as "TestDisk" which saved me. Initially while running this command line utility, I was unable to understand the processing even if it had pretty easy instructions but later I was able to fix my hard disk access.

In the world of data recovery it happens that your Operating System stops detecting your external hard disk. I have tried to use Ubunut Live CD to access the hard disk but it also shows me the same issue as on Windows.

In my case it was corrupted/damaged partition table, which is the reason the Operating system stopped detecting the External hard disk partition properly. To make it easier in working with TestDisk command line utility, following are the steps to recover the data, hope this helps you guys:

Testdisk https://www.cgsecurity.org/wiki/TestDisk


  • In order to recover a damaged partition table, kindly follow the following steps: 



  1. Start testdisk_win.exe
  2. Create a new log file.
  3. Scroll down to drive which contains the damaged partition table > Proceed
  4. Intel/EFI GPT (Select the partition table type - usually the default value is the correct one as TestDisk auto-detects the partition table type.) > Analyse > Quick Search
  5. Should TestDisk search for partition created under Vista ? > Y
  6. If the lost partition was a primary partition, move arrows to change * to P and press Enter.[P may already be there, if it is, still go to the next step to 'Write partition table'.]
  7. Move arrows to Write and press Enter.
  8. Write partition table, confirm ? (Y/N) > Y
  9. You will have to reboot for the change to take effect.


  • To recover individual files / individual directories from a hard drive which cannot display them in Windows because of a damaged partition table: 



  1. Copy Testdisk to hard drive with enough space to recover the lost files/directories then start testdisk_win.exe
  2. Create a new log file
  3. Scroll down to drive which contains the files/directories to recover > Proceed
  4. Intel/EFI GPT (Select the partition table type - usually the default value is the correct one as TestDisk auto-detects the partition table type.) > Analyse > Quick Search
  5. Should TestDisk search for partition created under Vista ? > Y
  6. Instead of moving arrows to get to the letter P, physically press key P on your keyboard.This lists the files and directories 
  7. Now use arrows to move down to select any file or directory and press C on keyboard to copy selected file or directory. 
or
To copy all files and directories, move the arrow to the top marked with one dot: .Then press C on keyboard and all files and directories will be copied to the location where you ran TestDisk from.


  • Use instructions above to recover files/directories from a hard drive with a damaged partition table. If partitions already exist, it may be recovered to an image file. To create an image of the entire partition:



  1. Copy Testdisk to hard drive with enough space to store the image of the partition 
  2. Create a new folder inside which you want to save the image.dd file then start testdisk_win.exe
  3. Create a new log file
  4. Scroll down to drive which contains the partition to copy > Proceed
  5. Intel/EFI GPT (Select the partition table type - usually the default value is the correct one as TestDisk auto-detects the partition table type.) > Advanced > Scroll down to partition to recover 
  6. Use right arrow to get to Image Creation > Enter 
  7. Select where to store the image.dd file > Press Enter then press the Y key on keyboard.
  8. File image.dd will contain the recovered partition.

You can use freeware such as OSFMount to mount image.dd files to access files inside them directly.