|
Fri
22
Jul '05
|
by Frank Spychalski filed under Computer
No Comments »
|
I bought an USBStick a couple of days ago and I wanted to created a little crypted filesystem on it. I expected to search for two hours until I find a decent piece of information, try it three time, destroy my usbstick inbetween and finish very frustrated. I’m glad I was wrong. It took me less than 10minutes and the only thing I still need to figure out is how to do this as a normal user. This is the description how to setup the encrypted fs which I will repeat here because it’s so short and just in case it disappears but credits to Paul Coates.
To create the filesystem (I used only 64M) and mount it use:
# /sbin/modprobe cryptoloop # /sbin/modprobe blowfish # dd if=/dev/zero of=/mnt/usbstick/secure bs=1k count=64000 # losetup -e blowfish /dev/loop0 /mnt/usbstick/secure Password: # mkfs -t ext2 /dev/loop0 64000 # mount -t ext2 /dev/loop0 /mnt/loop
To mount it again later:
# losetup -e blowfish /dev/loop0 /mnt/usbstick/secure Password: # mount -t ext2 /dev/loop0 /mnt/loop
To umount it:
# umount /dev/loop0 # losetup -d /dev/loop0 # sync