How to properly update external kernel modules at kernel updates?

But I wonder what happens when there is an update of the Linux kernel? I use ZFS only for storage now and every time there is a new kernel update I get conflicts between ZFS and the new kernel so I can not install the new kernel without uninstall zfs first. Is it possible to recompile the ZFS kernel module for the new kernel without first rebooting to the new kernel?

The way I solve it today is to uninstall ZFS and spl packages, upgrade the kernel, reboot and recompile zfs and spl packages after the reboot and install them again.But if I was using ZFS as a root file system then I do not understand how to do this (I can not boot on ZFS if I have uninstalled the zfs module before the reboot).

Of course I could have asked this question in the comments of the wiki page, but I see this can be a genreal question also. If an external kernel module is required for booting and it depends on the kernel then how is it possible to recompile the module for the new kernel before rebooting? I think there is something called DKMS that can assist but it should be possible to do it manually also?

Re: How to properly update external kernel modules at kernel updates?

According to AUR wiki I use makepkg -s to create a package?OK I will try it and see ho it works at next kernel update.Perhaps the problem was because of trying to update both the kernel and the zfs module at the same time.

Edit: I found the makepkg wiki. makepkg -i is just a shorter way of "pacman -U package.tar.gz".So you mean there is no need to recompile the zfs package to adopt it for the new kernel, just reinstall the package?

It depends on linux >3.5 and linux-headers >3.5.I tend to get dependency problems at the kernel updates but I will investigate further next time and note exact output to troubleshoot.

Re: How to properly update external kernel modules at kernel updates?

Well I was thinking of having one grub menu alternative to boot on ext4 root (standard hardware/software for booting) as a rescue option if things fails with ZFS and another choises for ZFS roots. Thanks!

Re: How to properly update external kernel modules at kernel updates?

I have the same question too, I asked the same question at kernel sub-forum 2 weeks ago. For a minor kernel update, you can just copy

/usr/lib/modules/`uname -r`/addon

to /usr/lib/modules/new_kernel. then do a

pacman -U /var/cache/pacman/pkg/linux-new-version

.It is really painful on a system using zfs as root fs. I think the gentoo way is much easier to follow, The /usr/src/linux is always a symbol link to a specific version what the user want. Every modules updates is compiled again /usr/src/linux, which is mucher easier to update 3rd party modules without booting into that kernel, obviously the user have to update 3rd party kernel after updating to a new kernel before booting into the new version kernel.

Re: How to properly update external kernel modules at kernel updates?

Would you explain it a bit, for example, the PKGBUILD below, how to change it to let it compile against a specific version kernel?

Differs based on package, that question is better asked upstream.

Looking at that PKGBUILD, you should look at the contents of autogen.sh or the configure script, and maybe do some sed magic to change calls to uname to a fixed value.

Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.