CryptSetupLuks

20th March 2015 at 10:59am
TechnicalNotes

https://www.digitalocean.com/community/tutorials/how-to-use-dm-crypt-to-create-an-encrypted-volume-on-an-ubuntu-vps

dd if=/dev/urandom of=/home/nicolaw/topsecret1.bin bs=1M count=10240
sudo apt-get -y install cryptsetup-bin
cryptsetup -y luksFormat /home/nicolaw/topsecret1.bin 
sudo cryptsetup luksOpen /home/nicolaw/topsecret1.bin topsecret1
lsblk
mkfs.ext4 -j /home/nicolaw/topsecret1.bin
mkdir -p /home/nicolaw/topsecret1
sudo mount /home/nicolaw/topsecret1.bin /home/nicolaw/topsecret1
sudo chown nicolaw:root /home/nicolaw/topsecret1
sudo chmod 700 /home/nicolaw/topsecret1
df -hTP
ls -al /home/nicolaw/topsecret1