Mounting Veracrypt Encrypted Linux Drive from File

MOUNTING VERACRYPT ENCRYPTED LINUX DRIVE FROM FILE

 

Firstly install Veracrypt – the GUI version on your Linux install.

I had trouble both encrypting and mounting using the command line. With mounting it said that it couldn’t mount a filesystem over 2TB but the GUI worked fine.

“Error: Kernel cryptographic service test failed. The cryptographic service of your kernel most likely does not support volumes larger than 2 TB.”

Anyway….

Download and install Veracrypt

mkdir veracrypt
cd veracrypt

Get it from here: https://www.veracrypt.fr/en/Downloads.html
wget https://launchpad.net/veracrypt/trunk/1.21/+download/veracrypt-1.21-setup.tar.bz2
tar -xjvf “veracrypt-1.1.7-setup.tar.bz2”
rm -f veracrypt-1.1.7-setup.tar.bz2
./veracrypt-1.1.7-setup-gui-x64

 

…and follow the prompts.

Ensure if your server is headless that you ssh to it with X windows – i.e ssh -X username@server and configure Xorg correctly before hand.

 

Command line mount / dismount

cd <dir holding the crypt file>
# Mount
sudo veracrypt -m nokernelcrypto veracrypt4t /media/veracrypt
 
# Dismount
sudo veracrypt -d veracrypt4t

 

Mounting and dismounting Veracrypt

In a terminal run the following command:

$ veracrypt

This will bring up the Veracrypt GUI as seen below. The first slot is already mounted but in your instance it probably won’t be.

 

Find the file that will represent your encrypted file system – in this case /data1/veracrypt4t – this can be typed directly into the dropdown box or you can browse with “Select File”.

Then press the mount button.

 

Due to the complexity and length of the password I have been choosing to check “Display Password” to confirm it is correct before pressing OK. Leave everything else as is.

Press the OK button to mount the drive.

 

Now you have your mounted drive, the directory is specified in the program.

To dismount it when you are finished simply highlight your drive in the main window and select “Dismount”.

Further Reading

https://veracrypt.codeplex.com/documentation

http://linuxg.net/how-to-install-veracrypt-1-0e-on-the-most-popular-linux-systems/

https://dougvitale.wordpress.com/2013/11/18/using-truecrypt-on-linux-and-windows/#use-linux