2

I was wondering if custom kernel modules that I compile and install via a package will persist through a kernel upgrade. I am trying to install ZFS as kernel module in Ubuntu but the problem is because of license conflicts I cannot make it directly part of the kernel. So I was wondering if I upgrade my kernel from the Ubuntu repo will APT doing anything to "migrate" the old kernel modules over to the new kernel. Because with something like ZFS I need to be very careful because my system would be sitting on ZFS and if I break it the system is unbootable.

Can someone give me some insight to whether I need to take special precautions or not.

1 Answer 1

2

If you install another kernel, any kernel modules you had on a prior kernel will NOT continue to work. Any kernel modules that do work in the new kernel will either be ones that are shipped directly with the kernel, or ones that are compiled automatically on boot using the DKMS system (see http://en.wikipedia.org/wiki/Dynamic_Kernel_Module_Support ).

With that said, you don't have to worry about upgrading your kernel as long as you keep the previous version of your kernel around, and know how to boot to it from the grub menu. If the new kernel doesn't work, just reboot into the old, working kernel.

3
  • Oh I see that makes sense. I was wondering what DKMS meant when referring to modules in linux. Cool thanks. Jul 12, 2012 at 0:58
  • 1
    Be careful though; if you want to use DKMS with a ZFS module, then you'll have to have DKMS compile against the new kernel and create the kernel module BEFORE you reboot into the new kernel. Because obviously you won't be able to mount the filesystem containing the necessary files (your C compiler, your Linux kernel headers, your ZFS source code, the DKMS binaries, etc.) if you can't mount your root filesystem, or whichever filesystem the files are mounted on. Jul 12, 2012 at 3:34
  • Excelent point. Do you are saying to be sure the modules compile before I reboot. Gotch ya. Jul 12, 2012 at 13:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .