I wasn’t sure if this was better to go into the Kernel or Pacman forum so please feel free to move this post to the better of the two
I have a ZFS root system, but this topic applies to any system using ZFS, whether root or not
Certain call methods for creating DKMS with kernels 4.13.3 and newer have been updated, which are incompatible with ZFS on Linux 7.3 and SPL 7.3 packages - DKMS will not build when upgrading using Pacman or manually – you will get errors such as:
spl.ko needs unknown symbol vfs_write spl.ko needs unknown symbol vfs_read
when DKMS attempts to build the kernel extensions because these flags have been depreciated in the newest kernel.
This bug is known and addressed in the newest version, ZFS + SPL 7.4, and a patch is also available. The problem is described on github here: https://github.com/zfsonlinux/spl/issues/656
In the meantime, if you haven’t already, make sure to get the LTS kernel and headers:
$ sudo pacman -S linux-lts linux-lts-headers
Note: Always install LTS when using ZFS on root, otherwise you might find yourself with a non-bootable system if the upgrade of the primary kernel doesn’t work properly!
Tip: It’s prudent to add
linux-lts to your IgnorePkg line and remove it only once you know you have a working mainline kernel and headers (IgnorePkg explained below) – or even more cautious to ignore it indefinitely to make sure you always have a non-moving kernel to fall back on.
Note: Holding back your kernel and kernel headers is not the same as holding back other packges in an Arch-based system. They can be held back for as long as current packages still support them, which is likely to be several years.
To fix your non-LTS kernel, hold it back for the meantime until the ZFS + SPL packages in the Antergos repo get upgraded to 7.4
The easiest way to do this is get the downgrade package from the AUR:
$ yaourt downgrade
Once it’s installed, run downgrade as sudo for both linux and linux-headers. You have to run it separately for each one:
$ sudo downgrade linux
$ sudo downgrade linux-headers
When choosing a kernel, I’d recommend 4.12.13-1 as the newest kernel one would want to use with ZFS 7.3. Make sure to get the same linux-headers version you chose as linux kernel!
After the older kernel and headers are installed, downgrade will ask you if you want to add the package to
/etc/pacman.conf - e.g. :
add linux-headers to IgnorePkg? [y/n]
y for each one and the kernel and headers will be ignored when upgrading your system until you remove the
IgnorePkg line in
/etc/pacman.conffor each one.
When you’re ready to upgrade your kernel after the ZFS and SPL in the Antergos repo have been upgraded to version 7.4, simply edit
/etc/pacman.conf and delete or comment out the IgnorePkg line:
$ sudo nano /etc/pacman.conf
# to the beginning of the line to comment it out and it will upgrade as normal:
#IgnorePkg = linux linux-headers
CTRL-X will exit you from nano, asking if you want to save the file before you leave.
Now reboot your system and it should work. If not, use your LTS kernel to boot or use a fallback in the
advanced options menu in GRUB.
Once you get back inside your booting system, type:
$ uname -r
To show your kernel version. If there was a problem booting your new kernel (if you get an error regarding your pool or ZFS not functioning), reboot into your LTS kernel and update your grub. I like to use the
update-grub wrapper from Ubuntu because it’s dead simple. Install it by invoking:
$ yaourt update-grub
$ sudo update-grub
Or you can do it the old-fashioned way without installing anything:
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Note: If you’ve booted into a working mainline kernel as shown with
uname -r (4.12.13, for example) and your
/etc/pacman.conf has an
linux-lts, now is a good time to remove
IgnorePkg, update linux-lts, and then put
linux-lts back in your