Compiling ZFS Against Different Kernels
./configure are often
ZFS dkms packages are on Debian only available for jessie and wheezy. The maintainer has made it very clear that he will not support any messing around with the dmks packages.
It it sometimes a healthy excercise to compile and package oneself. Compiling ZFS On Linux is quickly done. Beware: This breaks grub-pc on my system. I do not care and write grub.cfg myself. If yoou do, leave it alone.
When upgrading or preparing another system, it is not practical to compile for the currently running kernel alone. It is not (at least to me) immediately clear how to compile against a different target kernel. Having finally understood that object files referenced it the documentation actually are included in the header package, it, it is very easy:
When you just update kernels, it is sufficient to install the kmod-* packages.
The resulting packages do not update module dependencies, so you need to run
Doing this on Debian as I or on other distributions is a kind of Frankenstein configuration. It is safe if you know what you are doing. It is not if you do not and are not able to pull yourself out and together if things go wrong on your own. Nobody will help you.