How to Fix Broken TrueCrypt/VeraCrypt Volumes and Recover Your Data

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.

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.

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.

24 thoughts on “How to Fix Broken TrueCrypt/VeraCrypt Volumes and Recover Your Data”

  1. I tried TestCrypt, but it shows no header was found, later my external hard disk could not load anymore. simply not working. advice?

    Reply
    • Check if the drive was formatted. You may use recovery software to recover the drive including the headers and then use TestCrypt to recovery your encrypted volume. You could try to clone the drive to another physical disk and try the same steps. Also, make sure that the drive is not mounted by the file system on the host machine otherwise the virtual machine can’t mount it at the same time.

      Reply
  2. Your volume was initially created with Truecrypt ? You mention Veracrypt, but from what i understand TestCrypt only works on truecrypt volumes, not veracrypt ones.

    Reply
    • Mine was initially created with TrueCrypt and I have since switched to VeraCrypt without issues so far.
      Have a read on this discussion for VeraCrypt recovery issues. Please share your results and help others recover their memories.

      Reply
  3. Hi, I have a VeraCrypt partition on a USB and then a different VeraCrypt encrypted container on a harddrive. Both have the same password and have not been upgraded in any way.

    The USB volume stopped working with the standard error “Incorrect Password, etc.” I tried to past a screenshot here, but it doesn’t allow images? Anyway, I think everyone knows that error. For a couple of weeks I lost access but was still able to access the container on the other drive with the same password.

    THEN, all of a sudden, both veracrypt options are locked to me. Now, this is troubling because I thought Veracrypt was a great alternative to TrueCrypt now, so I put in some important files. I tried using the backup volume header as some suggested. I tried mount and auto-mount. Nothing is working and it is very frustrating. This seems not to be some kind of magic error with two different volumes using two different methods both randomly getting corrupted at different times, but instead a fatal flaw in the Veracrypt software. I am hoping someone can solve this issue and unlock all of our files!

    Thank you!

    Reply
    • John, could you try using the same versions of VeraCrypt and OS – same as the versions (and privileges) you were using at the time you initially created the containers. Let us know how it goes.

      Reply
  4. Hi Infosysteria team !

    I created a veracrypt volume with a hidden volume inside. I copied some (important) files in the hidden volume. Afterwards, I copied a lot of other files in the normal volume, BUT forgot to select “protect hidden volume against damage cause by writing to outer volume”.

    Then, I can not access the idden volume anymore.
    Can you please help me ?

    Thanks a lot !

    Reply
    • Azyet, which type of storage device?

      Probably filesystem corruption due to deletes/overwrites of metadata, but not the data itself.
      Did you have success using any of the recovery tools? Any error messages?

      Read up on wear levelling. Switching over to Factory Access Mode and proceeding data recovery through disk image could be an option.

      Reply
      • I have a truecrypt volume save in drive D on my laptop. After the laptop when faulty, I take out the hardisk and make it as an external hardisk. So what happened was I plug in the external hardisk on other pc, then open the drive and mounting the volume. While it still mounts, the external become connect and disconnect (pc usb port faulty) and I restart the pc.

        Now the external hardisk won’t load in pc anymore and takes time to load the drive and even crash my windows explorer. Is there any change I can recover it back?

        Thanks for your help.

        Reply
      • I did the same thing, wrote 2 files on the normal drive when a hidden drive with data already existed. I am having trouble installing TrueCrypt as I am getting that dialog box you showed, even though I have Windows 10. Not sure which of the dependencies I am supposed to download.

        Reply
    • Same thing. VeraCrypt mounts the hidden volume, but windows can’t access it.
      When mounted I tried to run Stellar Data Recovery on this drive, it found no files to recover. So far I had no luck with recovering anything from hidden volume. I’m seeking more information on the matter. If I move forward in the future I’ll update this thread.

      It could be smart to have the option “protect hidden volume against damage cause by writing to outer volume” ON by default.

      Another good idea to get a pop-up reminder “protect hidden volume against damage cause by writing to outer volume” every time you’re trying to do anything with the Normal Volume.

      Reply
  5. Hi Info,

    I am using the same OS and version of Veracrypt (same privileges too). Nothing has worked so far.

    I really appreciate you messaging on this though, at least that is a plus in this whole situation. I would advise people reading this not to use VeraCrypt right now as there are many posts about this type of issue. My TrueCrypt drive that I still have is working great, even now, so I think this is a VeraCrypt specific problem?

    I will post if somehow it works someday.

    Reply
  6. Type: hidden
    Algo: AES (HMAC SHA 512)

    USB accepts pass, mounts and opens on drive letter but file structure is still encrypted with folder names in symbols and not set out in the actual structure of the file system on disk. all folders and files inaccessible. have been using in this configuration for 6 months without issue until now.

    Assume data is lost but open to any recovery suggestions?

    Reply
  7. I have a TrueCrypt container volume on a standard hard drive. It mounts successfully, shows as normal with AES encryption. when I click on the mounted drive it says that you need to format the disk before you can use it. The secondary message I receive is that the drive is not accessible and the volume does not contain a recognized file system. As others have stated it just happened out of the blue, same setup as when the container was created. Computer has no other issues, barely moves and never leaves the house.

    I had also switched to VeraCrypt for all my other data since TrueCrypt is no longer secure. Most of those containers are fine except for one which also seems to be having this problem, so while VeraCrypt may be an improvement from a security perspective there seems to be an underlying common issue.

    When I run the analyzer, with the container mounted, it says no TrueCrypt header can be found. Any thoughts or other things I might try? I may just be using the analyzer incorrectly.

    Thanks for you help!

    Reply
  8. Hi everyone,
    the same problem seems to popup time and time again. It is sad to see that there is so little support by the makers of this program. Probabely because it is “open source”?
    I’ll try to live with the loss of some important files…

    Reply
  9. Hi “guys” Whist i fully appreciate the enormous concerns and how much time can be spent trying to recover from “lost” data. As last time in that situation it ran into about 2 weeks spread over something like 4-6weeks and cost me a sizable GBP. In this case my problem is not one of lost data, just a lost USB Drive (64Gb). My first time with Vera, so i decided to start on a new drive and get used to the basics (thankfully) before storing anything important. I used the Beginners Guide to set everything up following the stages. Somehow, things went wrong and after a couple of attempts at finding where/how. I thought it best to start over, on recovery of the USB Drive. I have scoured the web and used CMD/DOS commands, a couple of free recovery progs Aomei, HP and all in vain. The stick can be seen in Disk management as a number and i have changed the Letter. Yet i still get “no media”& “please insert…” file manger reports 0 space & 0 used. Trying to Format returns “no media” Im not the least bit worried about the data but if im going to use Vera in the future she has to let me have another go.

    Reply
  10. I’ll just post this quickly in case it saves anyone else heaps of time.

    The windows error:- “You need to format the disk in drive X: before you can use it. Do you want to format it?”

    can also be caused by the Veracrypt container or the drive it is on being ext4 formatted and therefore illegible to Windows (even with a compatibility layer like ext2fs running in the background)

    IMO TestCrypt shouldn’t be a windows-only tool, the problems of windows Veracrypt versus linux Veracrypt in terms of what containers can be formatted, checked, or read are already too many.

    Reply
  11. hey , great article. testcrapt found my volume, but cannot mount it since c++ 2010 is no longer available. also i got strange compatibility messages while trying to install NET.

    any ideas how to get the requirements installed ?

    thank you

    Reply
  12. Previous story:
    I originally encrypted my entire SSD as a volume with Veracrypt.
    Now I made the mistake of opening Disk Management. While the window was still open, I made inputs on my second screen with the keyboard. I clicked Enter once when a message opened in the Disk Management window milliseconds before.
    I assume that the window suggested to delete the “unknown” volume and I confirmed this by typing Enter.
    In the volume management it says that the volume is online and not allocated (I have not formatted it either). When I right click on the black bar and go to properties, it shows in the Volumes tab under Type “Basic” and under Partition Style “GUID Partition Table (GPT)”.

    Since then I have been looking for a way to repair the volume and mount it normally.

    I hate it when messages open in the foreground and you always confirm them by accident with the space bar or Enter because you are working too fast. Such messages are an imposition, if not double-query. Especially with such important settings, you have to offer this.

    Can I use Testcrypt to repair Veracrypt volumes? I have read that the program should only work for Truecrypt and do not want to lose my data by trying.
    Currently I haven’t done any formatting or anything else with the SSD that could affect the data. Only a few scas I have run which should not affect the data.

    I hope someone can help me.
    As you can imagine, I really want to get the data.
    PS. I remember the password.

    Reply
  13. This article looks like it could be helpful. Thank you!

    Here’s my situation:

    I have an WD external hard drive with two partitions, both encrypted with TrueCrypt. The first partition is working fine, but while TrueCrypt will let me mount the volume on the second partition (taking much longer than usual) *and I can even see the volume properties*, Windows won’t let me see the filesystem. When I try to look at the contents of the mounted drive in Explorer or using a command prompt, after another LONG wait I get an error message about the filesystem being corrupt and inaccessible.

    (I actually got that message for the first time as I was writing this. In all my previous tries, Windows returned a vague error message about receiving an “invalid parameter” when I tried to view the contents of the drive. So things are getting worse??)

    I haven’t tried testcrypt yet. Does anyone have any thoughts or advice on how I can recover my files? I’d really appreciate it.

    Reply
  14. I have a hidden TrueCrypt partition (asking to format when I click drive letter)… and after many years I am not sure if I forgot the password or the disk is now actually corrupted. Will running modify anything on the disk itself and ruin my chances of recovering it later in case I just forgot the password (and remember it at a later time, or try to brute-force it?)

    Reply

Leave a Comment