VeraCrypt is my favorite encryption software.

Setting up automount at boot is straightforward thanks to Cryptsetup.

Assuming that we have already created an ext4 formatted VeraCrypt volume: /volume1_veracrypt and a key file: /key1

To verify that the unlocking is going to work run:

sudo cryptsetup open \
/volume1_veracrypt \
--type tcrypt \
--veracrypt \
--key-file /key1 \
veracrypt1

If all works there should be an entry in /dev/mapper named veracrypt1

Add entry in /etc/crypttab

veracrypt1 /volume1_veracrypt /dev/null tcrypt-veracrypt,tcrypt-keyfile=/key1

Add entry in /etc/fstab

/dev/mapper/veracrypt1 /mnt/veracrypt1 ext4 nofail 0 2

Comments