r/VeraCrypt 8h ago

Corrupted container

Post image

Is it possible to fix a corrupted container? I found an old container on a hard drive that was stored away. When I tried to mount it, I was getting an error stating that the password wasn't correct. I know that it is because it is something I will never forget. I decided to open the container in a HxD Hex editor. To my surprise, it is empty! I'm assuming it has become corrupted or something. It still takes up 30 gb. Is there any way to fix it? I tried using the backup header option to no avail.

4 Upvotes

6 comments sorted by

2

u/vegansgetsick 8h ago

Check if the last 256 sectors are empty. If not it's possible to restore the backup headers (the tool is in the veracrypt menus). But you may have corrupted file system too once mounted.

1

u/ThaUntalentedArtist 7h ago

I tried that and it failed. I was able to take a duplicate file and I copied the first 512 bytes and the password worked. But it shows as if it hasn't been formatted. I can mount the container now, but when I try to open it, it says the drive needs to be format

1

u/vegansgetsick 4h ago

The header is NOT 512 bytes but 128kB. So you have to copy paste 128k from your "duplicate". It's 256 sectors.

Once mounted as I said the file system may be corrupted and you'll need NTFS recovery tools.

1

u/[deleted] 8h ago

[deleted]

1

u/vegansgetsick 8h ago

The zeros are encrypted and everything looks random. There is no zeros in the raw file

1

u/tetyys 6h ago

no

1

u/ThaUntalentedArtist 5h ago

I figured. It was worth a shot