You are here

HOWTO: Putting cryptoloop back in Debian

Update 2010-11-20: It has been pointed out to me that dm-crypt can handle cryptoloop volumes. Thus, you may choose to ignore this HOWTO in favor of one on how to do that.

For reasons detailed in Debian Bug #559961 the cryptoloop module has been dropped from the Debian kernel as of the 2.6.32-trunk binary packages. I've filed a complaint at that bug. I know what I'm doing, and am unhappy that the Debian kernel maintainers have taken it upon themselves to gratuitously delete functionality from the Linux kernel image…

In the meantime, here's how you put cryptoloop back.

  • Install the linux-source-2.6.xx package, where xx is your kernel version. You'll need to have the kernel headers somewhere where the makefile can find them; if you have troubles try installing linux-headers-2.6.xx as well.
  • Make a /usr/src/cryptoloop directory.
  • Put a copy of cryptoloop.c from /usr/src/linux-source-2.6.32/drivers/block/ (yes, it's still there) in your new cryptoloop directory.
  • Go to the cryptoloop directory and create the following Makefile:
    obj-m := cryptoloop.o
    	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules  
    	make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
    (Be careful that those tabs at the beginning of the make lines are hard.)
  • Say "make all".
  • As root, say:
    cp cryptoloop.ko /lib/modules/`uname -r`/kernel/drivers/block/
    depmod -a
    modprobe cryptoloop

If all goes well, you should be cryptolooping again. Remember that until Debian is (hopefully) fixed you will have to rebuild cryptoloop.ko whenever you upgrade your kernel. The cryptoloop.c source is unlikely to change, but you might want to check first.

Have fun. Fob



Although I'm using dm-crypt, I still do need cryptoloop, too. I have many cryptoloop encrypted media (DVDs).

Sorry I missed your comment a while back. Yeah, I'm not sure what folks with cryptolooped non-rewritable media are supposed to do. I have some too. Fob

Thanks a lot!

It really is incredible that they would deactivate this without a warning. I'm not a power user, so I didn't even know how to get read access to my volume anymore!

I mean, I'm okay for switching, but I need to access the previous system for that...

By the way, in the line "cp cryptoloop.ko /lib/modules/uname-r/kernel/drivers/block/", you forgot a space between "uname" and "-r".

Have a nice day!

Thanks much for the kind words. I fixed the typo you noted—looks like a copy-paste error. Fob


I tried to follow your route to create the cryptoloop.ko file, but I cannot compile it, cause of a missing Makefile.

I got the error:

/usr/src/linux-headers-2.6.32-3-common/scripts/ /usr/src/linux-headers-2.6.32-3-common/scripts/basic/Makefile: file not found

and there is no MAKEFILE in this directory. there are just 2 files: ==> docproc fixdep

Any idea whats went wrong?

thx for helping

Retested just now and it works for me, so something is weird with your setup or install. Sorry I don't have any great idea offhand. Fob

simple and perfect, thank you


I did have to google up on the fact i had to install the kernel-headers aswell (a simple addon could fix this search for other less-experianced users). Other then that, this worked perfectly! .. thanks alot m8!

Fixed the insns as you suggested; thanks. As noted, I'm using dm-crypt instead now. It's not as nice in some ways, but it beats the alternatives of ditching Debian or constantly remembering to reinstall cryptoloop. Sigh.

The most annoying part of this is that it adds absolutely no security whatsoever. Fob

I was not able to do this with the "supported" method with dm-crypt.
So this helped me a lot!


Thank you really much, you saved me at least a half day of sucking with this. One remark to the other DEBIAN users: you have to install the following packages:

apt-get install linux-source-2.6.32 linux-headers-2.6.32-5-common linux-kbuild-2.6.32 linux-headers-2.6.32-5-amd64 cd /usr/src tar jxvf linux-source-2.6.32.tar.bz2

This applies to amd64 arch, if you have other, you have to change obviously the apt-get line.

After this, you can proceed with the described method.

Yeah, that looks about right. I would suggest installing

  • linux-source
  • linux-headers-amd64

That way, the packages will track changes in Linux kernel version. The other packages you list will be automatically installed by apt to meet the dependencies of these.