Initialization
  1. dd if=/dev/zero of=fs.bin bs=1M count=5
  2. losetup /dev/loop1 fs.bin
  3. cryptsetup luksFormat /dev/loop1
Open and mount
  1. cryptsetup luksOpen /dev/loop1 fs.bin
  2. mkfs.ext3 /dev/mapper/fs.bin
  3. mkdir crypted
  4. mount /dev/mapper/fs.bin crypted
Umount and close
  1. umount crypted
  2. cryptsetup luksClose fs.bin
  3. losetup -d /dev/loop1
Advertisements