⚠️ DISCLAIMERThis is an unofficial workaround for compiling OpenZFS on Linux Kernel 7.1.x.
- Use at your own risk: Modifying kernel modules and Secure Boot keys can potentially render your system unbootable if done incorrectly.
- Not affiliated with OpenZFS: This guide is a community contribution and is not endorsed by the OpenZFS project maintainers.
- Backup your data: Always ensure you have a working recovery image before experimenting with kernel modules.
This guide consolidates the successful steps taken to run OpenZFS 2.4.3 on Linux Kernel 7.1.x under Fedora 43 using Gregory Lee’s root-on-ZFS setup, Secure Boot, and UKI.
- Fedora 43 with Gregory Lee’s ZFS scripts installed (
kernel-update,zfs-update). - Secure Boot enabled with custom keys enrolled.
- UKI (Unified Kernel Images) configured via
systemd-boot. - DNF5 as the default package manager.
OpenZFS 2.4.3 does not officially support Kernel 7.1.x. You must force the build system to use the experimental flag.
Action: Edit the DKMS framework override file.
sudo nano /etc/dkms/framework.conf.d/override.confAdd this line:
ZFS_CONFIGURE_ARGS="--enable-linux-experimental"Note: If your framework version ignores this variable, you may need to edit /var/lib/dkms/zfs/2.4.3/source/dkms.conf directly and add --enable-linux-experimental to the PRE_BUILD configure command string.
The default script fails on DNF5 due to strict dependency resolution and metadata conflicts between zfs-dkms and new kernels.
Action: Edit /usr/local/bin/kernel-update.
Find the dnf command (usually command -p dnf ... update kernel\*) and modify it to:
- Use
installinstead ofupdate. - Add
--allowerasingto bypass thezfs-dkmsmetadata conflict. - Exclude
kernel-selftests-internalto avoid missing dependency errors (bpftool,fuse-libs).
New Command Line:
command -p dnf -y --repo=updates install kernel\* --allowerasing --exclude=kernel-selftests-internal || exit 1Ensure the --allowerasing and --exclude flags are placed after the install command, as required by DNF5 syntax.
Run the modified script. It will install the new kernel (e.g., 7.1.3) despite the zfs-dkms conflict warning.
sudo kernel-updateNote: DNF may temporarily remove zfs userspace packages to satisfy the transaction. This is expected.
Since the update transaction may have removed the ZFS packages, reinstall them to trigger the DKMS build for the new kernel.
Action: Force the installation of ZFS 2.4.3 (ignoring the downgrade prompt).
sudo dnf install zfs zfs-dkms zfs-dracut --allowerasingIf DNF attempts to downgrade to 2.4.2 or fails due to conflicts, use rpm to force the install:
# Download RPMs first
sudo dnf download zfs-2.4.3-1.fc43.x86_64 zfs-dkms-2.4.3-1.fc43.noarch zfs-dracut-2.4.3-1.fc43.noarch
# Force install ignoring dependencies
sudo rpm -Uvh --force --nodeps zfs-*.rpmAction: Manually trigger the DKMS build if it didn't happen automatically.
# Clean previous failed builds
sudo rm -rf /var/lib/dkms/zfs/2.4.3/build
# Build and install
sudo dkms autoinstall -k 7.1.3-100.fc43.x86_64
# If "already installed" error occurs:
sudo dkms install --force -m zfs -v 2.4.3 -k 7.1.3-100.fc43.x86_64Because you are using Secure Boot and UKI, you must manually regenerate the boot image to include the newly built ZFS modules.
Action: Generate the initramfs (override the running kernel check).
sudo DRACUT_KMODDIR_OVERRIDE=1 dracut -f \
--kver 7.1.3-100.fc43.x86_64 \
--kmoddir /lib/modules/7.1.3-100.fc43.x86_64 \
/boot/initramfs-7.1.3-100.fc43.x86_64.imgAction: Create and sign the UKI.
sudo kernel-install add 7.1.3-100.fc43.x86_64 /boot/vmlinuz-7.1.3-100.fc43.x86_64Verification: Ensure ZFS modules are inside the signed UKI.
sudo lsinitrd /boot/EFI/Linux/$(cat /etc/machine-id)-7.1.3-100.fc43.x86_64.efi | grep zfsYou should see zfs.ko.xz and spl.ko.xz.
If you use proprietary NVIDIA drivers, they will likely be missing after the manual kernel update, causing a fallback to nouveau.
Action: Reinstall NVIDIA akmods.
sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cudaWait for the build to complete (2–5 minutes).
Action: Regenerate Initramfs and UKI again to include NVIDIA modules.
sudo DRACUT_KMODDIR_OVERRIDE=1 dracut -f -k 7.1.3-100.fc43.x86_64 /boot/initramfs-7.1.3-100.fc43.x86_64.img
sudo kernel-install add 7.1.3-100.fc43.x86_64 /boot/vmlinuz-7.1.3-100.fc43.x86_64Manual kernel-install runs may create duplicate or debug entries that clutter systemd-boot.
Action: Remove stale UKI files.
# List entries
ls -lht /boot/EFI/Linux/
# Remove debug or stale entries (keep the latest working one)
sudo rm /boot/EFI/Linux/*+debug*.efi
sudo rm /boot/EFI/Linux/*-old.efiEnsure only one valid entry exists for Kernel 7.1.3.
For subsequent kernel updates (e.g., 7.2.x):
- Run
sudo kernel-update: Your modified script will handle the DNF transaction. - Verify DKMS Build: Ensure
dkms statusshows the module built for the new kernel. - Regenerate UKI: If the script doesn't do it automatically, run the
dracutandkernel-installcommands from Step 6. - NVIDIA: If
akmodsdoesn't trigger automatically, reinstallakmod-nvidiaand regenerate the UKI.
Note: This workflow remains necessary until OpenZFS releases a version (e.g., 2.4.4+) that officially supports the new kernel series and updates its RPM metadata.