• ZFS on root and kernel upgrade process


    After kernel upgrade the laptop refuse to boot (using ZFS on root).

    Solution:
    Boot from Antergos LIVE USB and do following:

    modprobe zfs
    # Assume your pool name is  'antergos_rntl' 
    # If you don't know your pool name get it from grub config on /boot partition
    # Mount root partition
    zpool import -R /mnt/ -f antergos_rntl
    # Mount boot partition
    mount /dev/sda1 /mnt/boot
    # Chroot
     arch-chroot /mnt/
    # Update packages
    pacman -Syu
    # Update zfs
    pacman -S zfs
    # Rebuild  boot image
    mkinicpio -p linux
    

    Reboot. All working fine.

    Have a great day again.

  • @nwrk , thanks for sharing.:+1:

    1.Antergos Linux KDE plasma / Gnome 2.Ubuntu 17.10 64bit Unity
    Intel Core2 Duo CPU P8400 2.26GHz‖ RAM 3908 MiB ‖ Dell Inc. 0F328M - Dell Inc. Latitude E6500
    Intel Mobile 4 Series Chipset Integrated Graphics [8086:2a42] {i915

  • Hi,

    It’s a pacman hook problem, it updates mkinitcpio before updating zfs modules.

    When updating the kernel, remember always to run mkinitcpio before rebooting:
    sudo pacman -Syu
    sudo mkinitcpio -p linux
    Oh, and if you use the LTS kernel you have to update it, too:
    sudo mkinitcpio -p linux-lts

    Cheers!

  • Hi @karasu ,

    You are right. Today, with kernel update available was watching logs closely.

    After normal pacman / software center upgrade of all updates available including kernel package
    ran:

    sudo mkinitcpio -p linux-lts
    

    Thank you! :beer:

  • @nwrk Just to make sure get this. If I run ‘sudo mkinitcpio -p linux’ after kernel update before I reboot, that is all I need to do? I do not have to boot from USB and do the modprobe/spool import/arch-chroot thing?

    //Christian

  • @cdysthe that’s right. it’s a “race” condition where, sometimes, zfs and spl will get updated after pacman runs mkinitcpio itself. To be sure, just run it yourself before rebooting.

    I’ve been told it’s a pacman hooks problem.

    Cheers!

  • I just tried to upgrade the kernel and this is how it went:

    Checking inter-conflicts...
    Downloading...
    Downloading linux-4.8.8-2-x86_64.pkg.tar.xz...
    Downloading linux-headers-4.8.8-2-x86_64.pkg.tar.xz...
    Checking keyring...
    Checking integrity...
    Loading packages files...
    Checking file conflicts...
    Checking available disk space...
    Running pre-transaction hooks...
    Remove DKMS modules
    ==> dkms remove spl/0.6.5.8 -k 4.8.8-1-ARCH
    ==> dkms remove zfs/0.6.5.8 -k 4.8.8-1-ARCH
    Upgrading linux (4.8.8-1 -> 4.8.8-2)...
    >>> Updating module dependencies. Please wait ...
    Upgrading linux-headers (4.8.8-1 -> 4.8.8-2)...
    Running post-transaction hooks...
    Install DKMS modules
    ==> dkms install zfs/0.6.5.8 -k 4.8.8-2-ARCHconfigure: error: 
    	*** Please make sure the kmod spl devel <kernel> package for your
    	*** distribution is installed then try again.  If that fails you
    	*** can specify the location of the spl objects with the
    	*** '--with-spl-obj=PATH' option.
    Error!  Build of zavl.ko failed for: 4.8.8-2-ARCH (x86_64)
    Consult the make.log in the build directory
    /var/lib/dkms/zfs/0.6.5.8/build/ for more information.
    ==> dkms install spl/0.6.5.8 -k 4.8.8-2-ARCH
    Updating Arch Linux initramfs image
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
      -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    ==> Starting build: 4.8.8-2-ARCH
      -> Running build hook: [base]
      -> Running build hook: [udev]
      -> Running build hook: [autodetect]
      -> Running build hook: [modconf]
      -> Running build hook: [block]
      -> Running build hook: [keyboard]
      -> Running build hook: [keymap]
      -> Running build hook: [resume]
      -> Running build hook: [zfs]
    ==> ERROR: module not found: `zavl'
    ==> ERROR: module not found: `znvpair'
    ==> ERROR: module not found: `zunicode'
    ==> ERROR: module not found: `zcommon'
    ==> ERROR: module not found: `zfs'
    ==> ERROR: module not found: `zpios'
      -> Running build hook: [filesystems]
    ==> Generating module dependencies
    ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
    ==> WARNING: errors were encountered during the build. The image may not be complete.
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
      -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> Starting build: 4.8.8-2-ARCH
      -> Running build hook: [base]
      -> Running build hook: [udev]
      -> Running build hook: [modconf]
      -> Running build hook: [block]
    ==> WARNING: Possibly missing firmware for module: wd719x
    ==> WARNING: Possibly missing firmware for module: aic94xx
      -> Running build hook: [keyboard]
      -> Running build hook: [keymap]
      -> Running build hook: [resume]
      -> Running build hook: [zfs]
    ==> ERROR: module not found: `zavl'
    ==> ERROR: module not found: `znvpair'
    ==> ERROR: module not found: `zunicode'
    ==> ERROR: module not found: `zcommon'
    ==> ERROR: module not found: `zfs'
    ==> ERROR: module not found: `zpios'
      -> Running build hook: [filesystems]
    ==> Generating module dependencies
    ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
    ==> WARNING: errors were encountered during the build. The image may not be complete.
    Error: linux-headers: command failed to execute correctly
    Transaction successfully finished.
    

    I ran ‘sudo mkinitcpio -p linux’ and got this:

    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'default'
      -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
    ==> Starting build: 4.8.8-2-ARCH
      -> Running build hook: [base]
      -> Running build hook: [udev]
      -> Running build hook: [autodetect]
      -> Running build hook: [modconf]
      -> Running build hook: [block]
      -> Running build hook: [keyboard]
      -> Running build hook: [keymap]
      -> Running build hook: [resume]
      -> Running build hook: [zfs]
    ==> ERROR: module not found: `zavl'
    ==> ERROR: module not found: `znvpair'
    ==> ERROR: module not found: `zunicode'
    ==> ERROR: module not found: `zcommon'
    ==> ERROR: module not found: `zfs'
    ==> ERROR: module not found: `zpios'
      -> Running build hook: [filesystems]
    ==> Generating module dependencies
    ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux.img
    ==> WARNING: errors were encountered during the build. The image may not be complete.
    ==> Building image from preset: /etc/mkinitcpio.d/linux.preset: 'fallback'
      -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
    ==> Starting build: 4.8.8-2-ARCH
      -> Running build hook: [base]
      -> Running build hook: [udev]
      -> Running build hook: [modconf]
      -> Running build hook: [block]
    ==> WARNING: Possibly missing firmware for module: wd719x
    ==> WARNING: Possibly missing firmware for module: aic94xx
      -> Running build hook: [keyboard]
      -> Running build hook: [keymap]
      -> Running build hook: [resume]
      -> Running build hook: [zfs]
    ==> ERROR: module not found: `zavl'
    ==> ERROR: module not found: `znvpair'
    ==> ERROR: module not found: `zunicode'
    ==> ERROR: module not found: `zcommon'
    ==> ERROR: module not found: `zfs'
    ==> ERROR: module not found: `zpios'
      -> Running build hook: [filesystems]
    ==> Generating module dependencies
    ==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
    ==> WARNING: errors were encountered during the build. The image may not be complete.
    

    Can I reboot, or is something else wrong?

    //Christian

  • DO NOT REBOOT!

    Try this:
    sudo dkms install spl/0.6.5.8 -k 4.8.8-2-ARCH

    If no error is shown then try this:
    sudo dkms install zfs/0.6.5.8 -k 4.8.8-2-ARCH

    If no error is shown, then try this last one:
    sudo mkinitcpio -p linux

    Before rebooting, I’d recommend you to also install the LTS kernel:

    sudo pacman -S linux-lts linux-lts-headers
    

    Cheers!

  • @karasu said in ZFS on root and kernel upgrade process:

    DO NOT REBOOT!

    Try this:
    sudo dkms install spl/0.6.5.8 -k 4.8.8-2-ARCH

    If no error is shown then try this:
    sudo dkms install zfs/0.6.5.8 -k 4.8.8-2-ARCH

    If no error is shown, then try this last one:
    sudo mkinitcpio -p linux

    Before rebooting, I’d recommend you to also install the LTS kernel:

    sudo pacman -S linux-lts linux-lts-headers
    

    Cheers!

    Thanks! I ended up booting the LIVE USB stick, chroot in and install ZFS that way. Thank you @nwrk !

    I guess this would be easier if I stuck to the LTS kernel? But even more so I would like to know if this is something that will be fixed so those who run ZFS won’t have to do this extra operations when upgrading the kernel?

    //Christian

  • Hi,

    I guess this would be easier if I stuck to the LTS kernel? But even more so I would like to know if this is something that will be fixed so those who run ZFS won’t have to do this extra operations when upgrading the kernel?

    The idea of having an LTS kernel is to have a failsafe for booting (as they are not usually upgraded at the same time).

    The fix should be done by the pacman guys.

    EDIT: It seems it has already been fixed. Needs confirmation, though.
    https://forum.antergos.com/topic/5405/unhappy-about-upgrade-hooks-of-kernel-modules/3

    Cheers!

kernel66 root9 upgrade39 zfs24 Posts 10Views 1882
Log in to reply