TrueCrypt and its follower, VeraCrypt, are wonderful encryption tools that are freely available. These tools can are used to encrypt data at rest on storage devices including external hard drives and USB flash drives. This tutorial explain how to repair your corrupted TrueCrypt/VeraCrypt container (volume) using TestCrypt and get your data back.
Signs and Symptoms of Broken TrueCrypt/VeraCrypt Volumes
After using TrueCrypt for years to protect my Western Digital external hard drive, I recently noticed that I was no longer able to mount my volume and access my files, and started to panic a bit. I connected the USB to my laptop and tried to mount the volume on Windows, Linux and Mac without success.
In Windows I got the message “You need to format the disk in drive X: before you can use it. Do you want to format it?” and in macOS I tried to mount the disk manually using “diskutil mountDisk /dev/disk2” without success. I also tried to mount the volume using VeraCrypt in TrueCrypt mode. However, I received “Invalid password” and “Invalid Volume” albeit the password entered was correct.
How to Repair TrueCrypt/VeraCrypt Volumes
If you are in a similar situation, I recommend that you try the following steps. By the way, do not attempt to repair any filesystems using “chkdisk” or similar recovery tools at this point as it may damage the volume. If you have already attempted to repair the volume, you may have luck so read on. I recommend you to use any version of Windows to recover your volume.
I’m using a MacBook and used VirtualBox to install Windows 10 on a virtual machine. If using VirtualBox, you will have to give the virtual machine access to the device storing your volume. Connect the USB device or USB cable to the computer and make sure that your host is not trying to mount or occupy its resources.
In VirtualBox and after installing a virtual machine with Windows, right click the virtual machine and click “Settings”. Click “Ports” and “USB”. And make sure “Enable USB Controller” and “USB 3.0 (xHCI) Controller” is enabled. Click the green plus sign to add a new USB filter. In the drop down menu select your storage device and enable it in the list before clicking “OK”.
Finally, start the virtual machine. In my case using USB 1.1 or USB 2.0 did not work, and with USB 3.0 as controller, Windows automatically downloaded the required device drivers. So make sure the virtual machine has internet access. Before you proceed make sure your storage device is listed in “Disk Drives” in “Device Manager”.
TestCrypt is a first aid tool that you can use to recover your TrueCrypt/VeraCrypt volume. It is a Windows tool. So ensure that you have access to a device with Windows installed, or, alternatively, an virtual machine running Windows.
Simply visit http://testcrypt.sourceforge.net and download TestCrypt. You must install the required dependencies, as described in the “Requirements” section on the website before you install TestCrypt, otherwise you won’t be able to mount you volume. And you will receive this error:
Now, connect the device that holds the corrupted volume, and start TestCrypt and follow the on-screen instructions to recover your volume. Note that you must provide the correct password to recover your volume. TestCrypt is a tool to repair your volume, not a password cracking tool. If you can’t remember your password, it is worth guessing as you might be lucky. The recovery process usually takes around 20-30 minutes.
Once recovered, you should be able to navigate your files using Explorer in Windows. TestCrypt is a rescue tool so you will only be able to copy, and not modify any files or folders on the damaged volume. Nevertheless, you still got your data back and now your first priority should be to copy it to a safe place.
Join the discussion
Feel free to ask questions in the comments if you are stuck. Or share your approach with others if you succeeded in recovering your files. All the best.