Kernel headers missing for 6.13.4?

(edit: ignore the grub error, it’s ok)
Hello, dnf up --refresh now results in:

>>> Non-critical error in post-transaction scriptlet: kernel-core-0:6.13.4-200.fc41.x86_64
>>> Scriptlet output:
>>> grub2-probe: error: ../grub-core/kern/fs.c:123:unknown filesystem.
>>> 
>>> Error! Your kernel headers for kernel 6.13.4-200.fc41.x86_64 cannot be found at /lib/modules/6.13.4-200.fc41.x86_64/build or /lib/modules/6.13.4-200.fc41.x86_64/source.
>>> Please install the linux-headers-6.13.4-200.fc41.x86_64 package or use the --kernelsourcedir option to tell DKMS where it's located.
>>> dracut-install: Failed to find module 'zfs'
>>> dracut[E]: FAILED:  /usr/lib/dracut/dracut-install -D /var/tmp/dracut.uMJgwF/initramfs -H --kerneldir /lib/modules/6.13.4-200.fc41.x86_64/ -m zfs
>>> dracut[F]: installkernel failed in module zfs
>>> /usr/lib/kernel/install.d/50-dracut.install failed with exit status 1.

and

# dnf up --refresh
Updating and loading repositories:
 Fedora 41 openh264 (From Cisco) - x86_64                                                                                                                                                      100% |   1.7 KiB/s | 989.0   B |  00m01s
 Fedora 41 - x86_64                                                                                                                                                                            100% |  51.2 KiB/s |  26.8 KiB |  00m01s
 ZFS on Linux for Fedora 41                                                                                                                                                                    100% |   4.4 KiB/s |   2.9 KiB |  00m01s
 Fedora 41 - x86_64 - Updates                                                                                                                                                                  100% |  34.2 KiB/s |  18.9 KiB |  00m01s
Repositories loaded.
Problem 1: installed package zfs-dkms-2.3.0-1.fc41.noarch conflicts with kernel-devel > 6.12.999 provided by kernel-devel-6.13.4-200.fc41.x86_64 from updates
  - cannot install the best update candidate for package zfs-dkms-2.3.0-1.fc41.noarch
  - cannot install the best update candidate for package kernel-devel-6.11.4-301.fc41.x86_64
 Problem 2: installed package zfs-2.3.0-1.fc41.x86_64 requires zfs-kmod = 2.3.0, but none of the providers can be installed
  - installed package zfs-dkms-2.3.0-1.fc41.noarch conflicts with kernel-devel > 6.12.999 provided by kernel-devel-6.13.4-200.fc41.x86_64 from updates
  - package zfs-dkms-2.3.0-1.fc41.noarch from zfs conflicts with kernel-devel > 6.12.999 provided by kernel-devel-6.13.4-200.fc41.x86_64 from updates
  - package kernel-devel-matched-6.13.4-200.fc41.x86_64 from updates requires kernel-devel = 6.13.4-200.fc41, but none of the providers can be installed
  - cannot install the best update candidate for package zfs-2.3.0-1.fc41.x86_64
  - cannot install the best update candidate for package kernel-devel-matched-6.11.4-301.fc41.x86_64

Package                                                                        Arch              Version                                                                         Repository                                        Size
Skipping packages with conflicts:
 kernel-devel                                                                  x86_64            6.13.4-200.fc41                                                                 updates                                       77.3 MiB
Skipping packages with broken dependencies:
 kernel-devel-matched                                                          x86_64            6.13.4-200.fc41                                                                 updates                                        0.0   B

Nothing to do.

How to resolve? Thanks

1 Like

‘rpm -qa | grep kernel’ in terminal please

It’s cult print error zfs-dkms package should be updated from
ZFS on Linux for Fedora 41 repo for new kernels to work

# rpm -qa | grep kernel
kernel-modules-core-6.11.4-301.fc41.x86_64
kernel-core-6.11.4-301.fc41.x86_64
kernel-modules-6.11.4-301.fc41.x86_64
kernel-6.11.4-301.fc41.x86_64
kernel-modules-extra-6.11.4-301.fc41.x86_64
libreport-plugin-kerneloops-2.17.15-3.fc41.x86_64
kernel-devel-6.11.4-301.fc41.x86_64
kernel-devel-matched-6.11.4-301.fc41.x86_64
kernel-srpm-macros-1.0-24.fc41.noarch
kernel-tools-libs-6.13.4-200.fc41.x86_64
kernel-core-6.13.4-200.fc41.x86_64
kernel-modules-core-6.13.4-200.fc41.x86_64
abrt-addon-kerneloops-2.17.6-3.fc41.x86_64
kernel-modules-6.13.4-200.fc41.x86_64
kernel-6.13.4-200.fc41.x86_64
kernel-headers-6.13.3-200.fc41.x86_64
kernel-modules-extra-6.13.4-200.fc41.x86_64
kernel-tools-6.13.4-200.fc41.x86_64

yes this is a fresh f41 on zfs root install, in chroot, zfs was installed by:

dnf install -y https://dl.fedoraproject.org/pub/fedora/linux/releases/${VERSION_ID}/Everything/x86_64/os/Packages/k/kernel-devel-$(uname -r).rpm
dnf --releasever=${VERSION_ID} install -y https://zfsonlinux.org/fedora/zfs-release-2-6$(rpm --eval "%{dist}").noarch.rpm
dnf install -y zfs zfs-dracut

it used to work fine about 3 weeks ago though…

hmm you missing devel packages ‘sudo dnf install kernel-devel’

yes, it skips them:

ackage                                                                        Arch              Version                                                                         Repository                                        Size
Skipping packages with conflicts:
 kernel-devel                                                                  x86_64            6.13.4-200.fc41                                                                 updates                                       77.3 MiB
Skipping packages with broken dependencies:
 kernel-devel-matched                                                          x86_64            6.13.4-200.fc41                                                                 updates                                        0.0   B

Nothing to do.

but why?

You current version of zfs-dkms is preventing you to install kernel-devel, which is the package which would have provided the kernel headers needed for compiling the modules. You need to ask the provider of zfs for an updated and compatible version.

1 Like

I would think you need to talk to whoever is maintaining zfs-dkms for help.

1 Like

thanks

yup, thanks.

I will ask, or wait awhile.

This is the correct kernel headers package.
It is only updated when the kernel headers change, not at each kernel release.

dnf search does not find it… i’m not knowledgeable enough about this…
in the future i plan to use gregory-lee-bartholomew

scripts for updating zfs and kernel on this system:

This script will also configure the installed system to exclude ZFS and the Linux kernel from the normal sudo dnf update command. This is done because it is not uncommon for ZFS updates to fail on Fedora Linux when newer Linux kernels are availabe before ZFS is compatible with them. Instead, the user should use zfs-update to update ZFS and kernel-update to update the Linux kernel. These overrides and scripts are installed under /usr/local/bin. You can remove those scripts to revert this behavior if you so choose.

Yes you install zfs for kernel-core-6.11.4-301.fc41.x86_64 and i assume it is working well but package zfs-dkms-2.3.0-1.fc41.noarch not allow to install kernel-devel > 6.12.999 provided by kernel-devel-6.13.4-200.fc41.x86_64 from updates and fail to install kernel-devel 6.13.4 it’s not solvable until new zfs-dkms package

thanks. I just need to figure out how to do these upgrades in the future.
I will try to boot this system with old kernel for now, but when new zfs.dkms package is released, do i need to manually install it by

dnf --releasever=${VERSION_ID} install -y https://zfsonlinux.org/fedora/zfs-release-2-6$(rpm --eval "%{dist}").noarch.rpm

or… just trying to wrap my head around this… also need to check
gregory-lee-bartholomew

scripts closer, if they contain some checks…

they seem to contain some checks:

dnf:

#!/usr/bin/bash

UPDATE=0
NUMARG=0
FILTER=()

if ! [[ $* =~ --installroot ]]; then
	for arg do
		[[ ${arg:0:1} == - ]] && continue
		case "$arg" in
			(update|upgrade|up) UPDATE=1 ;;
			(*) break ;;
		esac
	done
fi

if [[ $UPDATE == 1 ]]; then
	for arg do
		[[ ${arg:0:1} == - ]] && continue

		if [[ $arg =~ ^zfs ]]; then
			printf -- '%b' \
				'use e[1mzfs-updatee[22m ' \
				'to update zfs.\n'
			exit 1
		fi

		if [[ $arg =~ ^kernel ]]; then
			printf -- '%b' \
				'use e[1mkernel-updatee[22m ' \
				'to update the kernel.\n'
			exit 1
		fi

		NUMARG=$(($NUMARG+1))
	done

	FILTER=('--exclude=kernel*')
	if ! [[ $* =~ --repo ]] && ! [[ $* =~ --repoid ]]; then
		FILTER+=('--disablerepo=zfs*')
	fi
fi

/usr/bin/dnf "${FILTER[@]}" "$@"
if [[ $? -eq 0 ]] && [[ $NUMARG -eq 1 ]] && [[ -t 1 ]]; then
	cat <<- 'END'

		zfs and kernel updates were excluded
		run e[1mzfs-updatee[22m to update zfs
		run e[1mkernel-updatee[22m to update the kernel

	END
fi

kernel-update:

#!/usr/bin/bash

shopt -s lastpipe

for arg; do [[ $arg =~ ^--refresh$ ]] && break; done

/usr/bin/dnf -q --repo=updates rq --upgrades --queryformat="%{name}-%{evr}\n" kernel "${BASH_REMATCH[0]}" \
	| read KERNEL

if [[ -z $KERNEL ]]; then
	printf 'No kernel updates found, aborting ...\n'
	exit 1
fi

rpm -q zfs | read ZFS

tr -d '\t' <<- WARNING

	Kernel update e[1m$KERNELe[22m is available.
	Your current version of OpenZFS is e[1m$ZFSe[22m.

	Before proceeding, check \
	e[1mhttps://github.com/openzfs/zfs/releasese[22m to verify that
	your version of OpenZFS is compatible with this kernel update.

WARNING
read -r -N 1 -p "Update to $KERNEL [y/n]?: " UPDATE
printf '\n'

if [[ $UPDATE == y ]]; then
	/usr/bin/dnf -y --repo=updates update kernel*
fi

zfs-update:

#!/usr/bin/bash

/usr/bin/dnf --repo=zfs update "$@"

But to build the kernel modules, the kernel headers are provided by kernel-devel.

1 Like

This is one of several threads in the last 2 days with similar problem noted with zfs-dkms.
It appears that ZFS has a problem with the 6.13.4 kernel when dkms is installed.

A quick search for zfs-dkms reveals at least 2 including this one.

https://discussion.fedoraproject.org/t/kernel-panic-after-upgrading-to-6-13-4-on-fedora-41/146074/17