#general help cryptsetup luksFormat --help #format cryptsetup luksFormat /dev/sdc1 #open cryptsetup luksOpen /dev/sdc1 mywd #see dev mapper devices ls -lh /dev/mapper/ #zero it out (could take a long time - use pv to monitor) pv -tpreb /dev/zero | dd of=/dev/mapper/mywd bs=512M #make partition mkfs -t ext2 /dev/mapper/mywd #mount mount -t auto /dev/mapper/mywd /mnt/mywd #see status cryptsetup -v status mywd #add a keyfile (will aask for exisiting pass) cryptsetup luksAddKey /dev/sdc1 /etc/keys/sdc1_key #then it's possible to cryptsetup --key-file=/etc/keys/sdc1_key luksOpen /dev/sdc1 mywd #finally to kill the old passphrase cryptsetup --key-file=/etc/keys/sdc1_key luksKillSlot /dev/sdc1 0 #to close cryptsetup luksClose mywd