HOWTO: Replacing cryptoloop with dm-crypt in Debian

A while back, I wrote a little HOWTO on putting the cryptoloop module back in Debian. Yesterday, Josh Triplett pointed out to me that current dm-crypt can actually be used instead of the cryptoloop module to compatibly work with cryptoloop-formatted volumes. Huh.

It turns out to be as simple as

$ apt-get install cryptsetup
$ cryptsetup create -c mycipher -s mykeysize volume-label /dev/sdx7
$ mount /dev/mapper/volume-label /mount-point

Obviously you'll need to make some substitutions in the above. Use

$ umount /mount-point
$ cryptsetup remove volume-label

to clean up afterwards. Enjoy. (B)