make an external luks encrypted disk

/dev/sdb is used as the disk in this example — MAKE SURE TO ADJUST FOR YOUR SYSTEM

a good way to do this is:
ls -l /dev/disk/by-id/

to clean / randomize the drive:
dd if=/dev/urandom bs=100M conv=notrunc of=/dev/sdb

fdisk /dev/sdb — create partition 1
cryptsetup –verbose –verify-passphrase –cipher aes-cbc-essiv:sha256 luksformat /dev/sdb1
cryptsetup luksOpen /dev/sdb1 name
mke2fs -j -L “Label” -m 1 /dev/mapper/name
mkdir /mnt/name
mount /dev/mapper/name /mnt/name


Leave a Comment