Description
System information
Type | Version/Name |
---|---|
Distribution Name | Fedora |
Distribution Version | 33 |
Linux Kernel | 5.8 --> 5.9 |
Architecture | amd64 |
ZFS Version | 2.0.0 |
SPL Version | 2.0.0 |
Describe the problem you're observing
Using Fedora 33 actually with ZFS on Root :
NAME FSTYPE
sda
├─sda1 bios_boot_part
├─sda2 vfat
├─sda3 zfs_member 5000
The problem appeared since zfs/0.8.5 version release. After a kernel-upgrade, Fedora keeps the last three kernels available on the system.
Despite the fact that dkms builds correctly the modules for the new kernel, and all the files and/or links are correctly included in the initramfs images for all the installed kernels, one can not boot anymore with previous ones already installed.
Example :
$ dkms status
zfs, 0.8.5, 5.8.18-300.fc33.x86_64, x86_64: installed
zfs, 0.8.5, 5.9.10-200.fc33.x86_64, x86_64: installed
$ ls -l /var/lib/dkms/zfs/
укупно 2
drwxr-xr-x. 4 root root 5 25. нов. у 12:53 0.8.5
lrwxrwxrwx. 1 root root 35 23. нов. у 22:31 kernel-5.8.18-300.fc33.x86_64-x86_64 -> 0.8.5/5.8.18-300.fc33.x86_64/x86_64
lrwxrwxrwx. 1 root root 35 25. нов. у 12:53 kernel-5.9.10-200.fc33.x86_64-x86_64 -> 0.8.5/5.9.10-200.fc33.x86_64/x86_64
$ ls -l /var/lib/dkms/zfs/0.8.5/
укупно 2
drwxr-xr-x. 3 root root 3 23. нов. у 22:31 5.8.18-300.fc33.x86_64
drwxr-xr-x. 3 root root 3 25. нов. у 12:53 5.9.10-200.fc33.x86_64
lrwxrwxrwx. 1 root root 18 23. нов. у 22:28 source -> /usr/src/zfs-0.8.5
$ sudo lsinitrd /boot/initramfs-5.9.10-200.fc33.x86_64.img | grep zfs
[судо] лозинка за корисника gogi:
zfs
-rw-r--r-- 1 root root 35 Oct 23 17:08 etc/modprobe.d/zfs.conf
-rw-r--r-- 1 root root 324 Oct 23 17:30 etc/udev/rules.d/90-zfs.rules
-rwxr-xr-x 1 root root 32752 Oct 23 17:30 usr/lib64/libzfs_core.so.1.0.0
lrwxrwxrwx 1 root root 32 Oct 23 17:30 usr/lib64/libzfs_core.so.1 -> ../../lib64/libzfs_core.so.1.0.0
-rwxr-xr-x 1 root root 505696 Oct 23 17:30 usr/lib64/libzfs.so.2.0.0
lrwxrwxrwx 1 root root 27 Oct 23 17:30 usr/lib64/libzfs.so.2 -> ../../lib64/libzfs.so.2.0.0
-rwxr-xr-x 1 root root 269 Oct 23 17:30 usr/lib/dracut/hooks/cleanup/99-zfs-needshutdown.sh
-rwxr-xr-x 1 root root 2081 Oct 23 17:30 usr/lib/dracut/hooks/cmdline/95-parse-zfs.sh
-rwxr-xr-x 1 root root 2553 Oct 23 17:30 usr/lib/dracut/hooks/mount/98-mount-zfs.sh
-rwxr-xr-x 1 root root 2619 Oct 23 17:30 usr/lib/dracut/hooks/pre-mount/90-zfs-load-key.sh
-rwxr-xr-x 1 root root 484 Oct 23 17:30 usr/lib/dracut/hooks/shutdown/20-export-zfs.sh
-rwxr-xr-x 1 root root 4860 Oct 23 17:30 usr/lib/dracut-zfs-lib.sh
-rw-r--r-- 1 root root 778788 Oct 23 17:30 usr/lib/modules/5.9.10-200.fc33.x86_64/extra/zfs.ko.xz
-rw-r--r-- 1 root root 152 Oct 23 17:30 usr/lib/modules-load.d/zfs.conf
-rwxr-xr-x 1 root root 2015 Oct 23 17:30 usr/lib/systemd/system-generators/dracut-zfs-generator
lrwxrwxrwx 1 root root 20 Oct 23 17:30 usr/lib/systemd/system/initrd.target.wants/zfs-import.target -> ../zfs-import.target
-rw-r--r-- 1 root root 365 Oct 23 17:30 usr/lib/systemd/system/zfs-env-bootfs.service
-rw-r--r-- 1 root root 498 Oct 23 17:30 usr/lib/systemd/system/zfs-import-cache.service
-rw-r--r-- 1 root root 465 Oct 23 17:30 usr/lib/systemd/system/zfs-import-scan.service
-rw-r--r-- 1 root root 101 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target
drwxr-xr-x 2 root root 0 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants
lrwxrwxrwx 1 root root 25 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants/zfs-env-bootfs.service -> ../zfs-env-bootfs.service
lrwxrwxrwx 1 root root 27 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants/zfs-import-cache.service -> ../zfs-import-cache.service
lrwxrwxrwx 1 root root 26 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants/zfs-import-scan.service -> ../zfs-import-scan.service
-rwxr-xr-x 1 root root 28368 Oct 23 17:30 usr/sbin/mount.zfs
-rwxr-xr-x 1 root root 138304 Oct 23 17:30 usr/sbin/zfs
$ sudo lsinitrd /boot/initramfs-5.8.18-300.fc33.x86_64.img | grep zfs
zfs
-rw-r--r-- 1 root root 35 Oct 23 17:08 etc/modprobe.d/zfs.conf
-rw-r--r-- 1 root root 324 Oct 23 17:30 etc/udev/rules.d/90-zfs.rules
-rwxr-xr-x 1 root root 32752 Oct 23 17:30 usr/lib64/libzfs_core.so.1.0.0
lrwxrwxrwx 1 root root 32 Oct 23 17:30 usr/lib64/libzfs_core.so.1 -> ../../lib64/libzfs_core.so.1.0.0
-rwxr-xr-x 1 root root 505696 Oct 23 17:30 usr/lib64/libzfs.so.2.0.0
lrwxrwxrwx 1 root root 27 Oct 23 17:30 usr/lib64/libzfs.so.2 -> ../../lib64/libzfs.so.2.0.0
-rwxr-xr-x 1 root root 269 Oct 23 17:30 usr/lib/dracut/hooks/cleanup/99-zfs-needshutdown.sh
-rwxr-xr-x 1 root root 2081 Oct 23 17:30 usr/lib/dracut/hooks/cmdline/95-parse-zfs.sh
-rwxr-xr-x 1 root root 2553 Oct 23 17:30 usr/lib/dracut/hooks/mount/98-mount-zfs.sh
-rwxr-xr-x 1 root root 2619 Oct 23 17:30 usr/lib/dracut/hooks/pre-mount/90-zfs-load-key.sh
-rwxr-xr-x 1 root root 484 Oct 23 17:30 usr/lib/dracut/hooks/shutdown/20-export-zfs.sh
-rwxr-xr-x 1 root root 4860 Oct 23 17:30 usr/lib/dracut-zfs-lib.sh
lrwxrwxrwx 1 root root 65 Oct 23 17:30 usr/lib/modules/5.8.18-300.fc33.x86_64/weak-updates/zfs.ko.xz -> ../../../../../lib/modules/5.9.10-200.fc33.x86_64/extra/zfs.ko.xz
-rw-r--r-- 1 root root 778788 Oct 23 17:30 usr/lib/modules/5.9.10-200.fc33.x86_64/extra/zfs.ko.xz
-rw-r--r-- 1 root root 152 Oct 23 17:30 usr/lib/modules-load.d/zfs.conf
-rwxr-xr-x 1 root root 2015 Oct 23 17:30 usr/lib/systemd/system-generators/dracut-zfs-generator
lrwxrwxrwx 1 root root 20 Oct 23 17:30 usr/lib/systemd/system/initrd.target.wants/zfs-import.target -> ../zfs-import.target
-rw-r--r-- 1 root root 365 Oct 23 17:30 usr/lib/systemd/system/zfs-env-bootfs.service
-rw-r--r-- 1 root root 498 Oct 23 17:30 usr/lib/systemd/system/zfs-import-cache.service
-rw-r--r-- 1 root root 465 Oct 23 17:30 usr/lib/systemd/system/zfs-import-scan.service
-rw-r--r-- 1 root root 101 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target
drwxr-xr-x 2 root root 0 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants
lrwxrwxrwx 1 root root 25 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants/zfs-env-bootfs.service -> ../zfs-env-bootfs.service
lrwxrwxrwx 1 root root 27 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants/zfs-import-cache.service -> ../zfs-import-cache.service
lrwxrwxrwx 1 root root 26 Oct 23 17:30 usr/lib/systemd/system/zfs-import.target.wants/zfs-import-scan.service -> ../zfs-import-scan.service
-rwxr-xr-x 1 root root 28368 Oct 23 17:30 usr/sbin/mount.zfs
-rwxr-xr-x 1 root root 138304 Oct 23 17:30 usr/sbin/zfs
At boot with one of the previous kernels, system starts booting correctly, loading "dracut-premount" hook and then flooding with the following :
dracut-premount : the ZFS modules are not loaded
dracut-premount : Try running ´/sbin/modprobe/zfs´ as root to load them
This is obviously not the behaviour that we want, all the more that at this stage of boot process we don't have any root access through a console.
The trick is to boot with the last kernel (i.e here 5.9.10-*) or to uninstall all zfs modules installed and reinstall only one module for a given kernel installed on the system, and then boot on that kernel...
So if I have some issue with a given kernel and I want to boot on a previous one, I have to first remove all zfs dkms modules installed, then rebuild and install the modules for the kernel I want to boot on, and then boot on it, but of course I will be the only one usable.
Please feel free to ask for more informations if needed.
Thanks.