sudo dd if=/dev/urandom of=/root/keyfile bs=1024 count=4sudo chmod 0400 /root/keyfilesudo cryptsetup luksAddkey /dev/sdX /root/keyfile- edit
/etc/crypttabsdX_crypt /dev/sdX /root/keyfile lukssdX_crypt /dev/disk/by-uuid/UUID_GOES_HERE /root/keyfile luks
- edit
/etc/fstab/dev/mapper/sdX_crypt /media/sdX ext4 defaults 0 2
- Because we edited
/etc/crypttabwe have to:sudo update-initramfs -u -k all - Validate
/etc/fstab:sudo mount -a
- LVM
- LUKS
- https://www.cyberciti.biz/hardware/howto-linux-hard-disk-encryption-with-luks-cryptsetup-command/
- https://www.howtoforge.com/automatically-unlock-luks-encrypted-drives-with-a-keyfile
- https://unix.stackexchange.com/questions/64863/luks-storing-keyfile-in-encrypted-usb-drive
- https://wiki.archlinux.org/index.php/Dm-crypt/Device_encryption
- https://wiki.archlinux.org/index.php/Dm-crypt
- https://askubuntu.com/questions/450895/mount-luks-encrypted-hard-drive-at-boot
- http://lowtek.ca/roo/2012/how-to-add-second-drive-to-luks-ubuntu/