cryptsetup -y -c twofish-cbc-essiv:sha256 luksFormat /dev/mapper/memelabs--de2-misc cryptsetup luksOpen /dev/mapper/memelabs--de2-misc misc-crypt mkfs.ext3 -b 4096 -E stride=8 /dev/mapper/misc-crypt echo "misc-crypt /dev/mapper/memelabs--de2-misc none luks,check=ext2,retry=1" >> /etc/crypttab echo "/dev/mapper/misc-crypt /misc-crypt ext3 defaults 1 2" >> /etc/fstab mkdir /misc-crypt update-initramfs -u -k all
For using latter:
cryptsetup luksOpen /dev/mapper/memelabs--de2-misc misc-crypt mount /dev/mapper/misc-crypt /misc-crypto umount /misc-crypt cryptsetup luksClose misc-crypt
For encrypted swap look in the documentation of crytosetup of debian.