Debian

Mount encrypted LUKS usb disk at boot

Find USB Disk UUID

sudo blkid

or e.g.

sudo blkid /dev/sdg1 | awk -F '"' '{print $4}'

Edit crypttab file

sudo nano /etc/crypttab

and add a new line entry such as:

UUID=<name>    UUID=<disk_uuid>    <mount_point>    <type>

Example:

sdg5_crypt    UUID=123456789-1234-1234-1234-1234567890ab    none    luks

Separate values with spaces or tabs.

Edit fstab file

sudo nano /etc/fstab

and add a new line entry such as:

<file system>    <mount point>    <type>    <options>    <dump>    <pass>

Example:

/dev/mapper/sdg5_crypt	/media/username/myusbdisk	ext4	defaults	0	0

Separate values with spaces or tabs.