Saturday, November 23, 2013

diskpart clean command wipes truecrypt volume

Today accidentally i flushed the truecrypt encrypted volume on my external USB harddrive using the "diskpart" by executing the "clean" command.

I successfully recovered the partition table using the "testdisk" utility and brought back all the lost information's.

Testdisk uitility page.
http://www.cgsecurity.org/wiki/TestDisk_Download


The 1 TB external harddisk has 931 GB as a normal partition and rest of the free space as a truecrypt volume.

Instead of selecting the pendrive i accidentally selected the external harddrive and flushed the partition information using the diskpart.

Following steps helped me recover.

1.   run testdisk
2.   choose to create a log file
3.   choose the disk that you ran clean on
4.   choose intel
5.   choose analyze
6.   choose quick search
7.   confirm to proceed
8.   testdisk should find the deleted partition
9.   confirm to save the partition table.
10. Restart the computer

After reboot, I went into the disk management by executing the command "diskmgmt.msc" from Run dialog box.

I was able to see the two lost partition. The truecrypt volume was showing as "unallocated".
 Follow the steps to recover.

Right-click the unallocated volume.

Choose New Simple Volume from the shortcut menu.

1. The New Simple Volume Wizard appears. Click the Next button.

2. On the "Specify Volume Size" screen do not alter anything. click next

3. On the "Assign Drive Letter or Path" screen choose the last option "Do not assign a drive letter or drive path" and click next.

4. On the "Format Partition" screen Choose the first option "Do not format the volume" and click next

5. Click finish

You will be able to see the unallocated partition showing as RAW / Healthy. 

Open Truecrypt and mount the encrypted volume. 

For some reason truecrypt keep telling the password was wrong while i try to mount the volume.

It let me in after 5 password attempts.


All the best.



2 comments:

  1. Hi, what about when you have also accidentally created a new partition on that drive and THEN realised you've chosen to clean the wrong drive? Is it still recoverable?

    ReplyDelete
  2. Thank you so much! You encourage me to keep trying to mount it and it eventually worked.

    ReplyDelete