Crypted disk image

From Alessandro's Wiki
Jump to: navigation, search

http://www.techrepublic.com/blog/opensource/create-encrypted-loopback-filesystems-on-linux/67

dd if=/dev/urandom of=crypted_image.img bs=1M count=50


  • open the device (device_name will be in /dev/mapper)
cryptsetup -M plain -c aes-cbc-plain -h plain open crypted_image.img device_name
  • mount
mount /dev/mapper/crypted_image /media/disk
  • open the device (deprecated)
losetup -e aes /dev/loop0 crypted_image.img 
Password:
  • make filesystem (deprecated)
mkfs -t ext2 /dev/loop0
  • mount via loop (deprecated)
mount -o loop,encryption=aes crypted_image.img /media/disk