Skip to content

Instantly share code, notes, and snippets.

@shantanoo
Created July 3, 2013 04:50
Show Gist options
  • Save shantanoo/5915515 to your computer and use it in GitHub Desktop.
Save shantanoo/5915515 to your computer and use it in GitHub Desktop.
# load required kernel modules
modprobe cryptoloop
modprobe aes
# Create loopback filesystem (change count according to your requirement)
dd if=/dev/urandom of=enc.img bs=1M count=50
# Setup password and create loopback device
losetup -e aes /dev/loop0 enc.img
# create filesystem
mkfs -t ext2 /dev/loop0
# mount filesystem
mount /dev/loop0
mount -o loop,encryption=aes enc.img /media/disk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment