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.
Mar 22, 2021 VeraCrypt is a free disk encryption software brought to you by IDRIX (and based on TrueCrypt 7.1a. It adds enhanced security to the algorithms used for system and partitions encryption making it immune to new developments in brute-force attacks. It also solves many vulnerabilities and security issues found in TrueCrypt. Aug 12, 2019 VeraCrypt is a project based on the source code of the old TrueCrypt software, which was discontinued. VeraCrypt has a variety of bug fixes and supports modern PCs with EFI system partitions, a configuration many Windows 10 PCs use. How to Install VeraCrypt and Encrypt your System Drive Download VeraCrypt to get started. VeraCrypt is free disk encryption software and is based on TrueCrypt.
Update 2nd January 2021:
We have since the below update recieved a steady stream of inquiries of varying degrees of quality regarding the recovery of damaged VeraCrypt containers.
Please ensure to include:
- A brief description of the damaged container and the issue including screenshot(s) of errors
- Steps you have taken in attempts to repair your damaged container (e.g. formatted, commands, re-paritioning, use of recovery tools or devices)
- What worked and what didn’t work?
Please be assured that your emails are being read and that we are doing the best we can to develop an open source solution that may help people like you with recovering lost files and memories.
In the meantime, feel free to join the discussion in the comments below.
Stay safe and take care out there.
Update 8th November 2020: Users of VeraCrypt needed for research project
The solution in this article seem to work mostly for TrueCrypt users. As of today, a research project has launched in attempts to build a open source software tool that can help VeraCrypt users to repair VeraCrypt volumes and recover the encrypted data. Please email veracrypt {at} infosysteria.com if you would like to get directly in touch with the researcher and pilot the tool that may succeed in mounting your VeraCrypt drive.
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.
Veracrypt Volume Extension
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”.
Installing TestCrypt
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.
Feel free to ask questions in the comments if you are stuck. Or share your approach with others if you succeeded. All the best.
Veracrypt Linux
The following instructions are for mounting encrypted or files in order to access or add data using the VeraCrypt software:
- Installers for VeraCrypt can be found here: https://www.veracrypt.fr/en/Downloads.html
- Open VeraCrypt
- Choose an open Volume Slot at the main screen and then click Select File…
- Using the Finder window, navigate to the location of the encrypted Volume/Container you wish to mount (i.e. on your desktop, from a USB drive, etc.). Once you have located the file, click to select it and then click Open
- Now that you have selected the file to mount, it is time to decrypt it and mount it as a local drive for you to access. At the main screen, click the Mount button
- You will be asked to enter the password for the encrypted volume. Please enter the password as provided and then click OK
- If you have entered the password correctly, the volume will have mounted and will now be accessible from a Finder window
- When you are finished working with the encrypted volume and wish to eject, switch back to the VeraCrypt window. Make sure that the Volume is selected in the Volume Slot screen and then click Dismount.
Your volume will be unmounted. If the encrypted volume was on a USB drive, the USB drive can now be safely ejected.
- Open VeraCrypt
- Choose an open Volume Drive letter at the main screen and then click Select File…
- At the Select a VeraCrypt Volume screen, navigate to where your encrypted volume is (i.e. on your Desktop or from a USB drive), select it and then click Open
- Now that you have selected the file to mount, it is time to decrypt it and mount it as a local drive for you to access. At the main screen, click the Mount button
- You will be asked to enter the password for the encrypted volume. Please enter the password as provided and then click OK
- If you have entered the password correctly, the volume will have mounted and will now be accessible from an Explorer window.
- When you are finished working with the encrypted drive and wish to eject, switch back to the VeraCrypt window. Make sure that the Drive is selected in the Volume Slot screen and then click Dismount.
Your volume will be unmounted. If the encrypted volume was on a USB drive, the USB drive can now be safely ejected.
Veracrypt Mac
If you are unable to connect or run into any other issues, please contact tdi.computing@dartmouth.edu (603-653-0810) for assistance.