Luks – crypto volume

Setup of LUKS crypto volume on Ubuntu:

sudo cryptsetup luksFormat -c aes-xts-plain64 -s 512 -h sha512 -y DEVICE
sudo cryptsetup -c aes-xts-plain64 -s 512 -h sha512 luksFormat DEVICE
sudo pv -tpreb /dev/zero | dd of=/dev/mapper/crypto_forensiscs bs=128M
sudo mkfs.ext4 /dev/mapper/crypto_forensics
sudo mkdir /media/crypto_forensics
sudo mount /dev/mapper/crypto_forensics /media/crypto_forensics/

Auto-Mount-Script:

#!/bin/sh
umount /media/crypto_forensics/
cryptsetup luksClose /dev/mapper/crypto_forensics
cryptsetup luksOpen /dev/sdb crypto_forensics
cryptsetup -v status crypto_forensics
mount /dev/mapper/crypto_forensics /media/crypto_forensics/

Leave a Reply