Error mounting truecrypt disk with cryptsetup

cryptsetuptruecrypt

Trying to use cryptsetup to mount a drive encrypted with truecrypt.

Doing this:

sudo cryptsetup open --type tcrypt --readonly /dev/sdc1 encrypted_drive 

and then typing the passphrase gives me:

Activation is not supported for 4096 sector size.

What does this error mean, and how can I mount my truecrypt volume?

Useful information:

  • The drive was encrypted with truecrypt 7.1a
  • The machine trying to do this is booted into a live USB version of ubuntu, specifically ubuntu 14.04.01, i386 desktop version.
  • cryptsetup --version yields cryptsetup 1.6.1
  • removing the --readonly option produces no change

Best Answer

cryptsetup expects the sector size to be 512, but in your case it seems to be 4096, since that is what truecrypt does for devices with physical/logical sector size of 4096. This information is stored in the TrueCrypt header, you can also see it with cryptsetup tcryptDump.

The Linux version of truecrypt mounts such containers fine like so:

truecrypt /dev/sdc1 /mnt/somewhere

According to dmsetup it still uses regular encryption regardless of sector size, so this is a limitation of cryptsetup itself. You could open an issue for it on the cryptsetup issue tracker: https://code.google.com/p/cryptsetup/issues/list

Related Question