Ubuntu Encrypted Loopback Disk
Friday, 03 October 2008 21:47
So I have a need for a encrypted disk - as a loop back file. I wrote earlier on how to restore a partimage backup to loopback, so lets see if we can make this work.- We need to tell the kernal how to encrypt disks with a module
modprobe cryptoloop
- Create the loop file (like before, but with urandom to help hide the disk, the count is MB*1000 so in this case 1M)
dd if=/dev/urandom of=myharddisk.img bs=1000 count=1000
- Create the loopback device (I'm going to use TwoFish)
losetup -e twofish /dev/loop0 ./myharddisk.img
- At this point, you will be asked for a password - create your own
- Create the file system of choice (ext3 for me)
mkfs.ext3 /dev/loop0
- Mount the new loop back point /dev/loop0
mount /dev/loop0 /mnt/my/mount/point
Enjoy!
Add your comment
My Certifications![]()


Tags
This will be shown to users with no Flash or Javascript.










