Upgrade within 13-stable: no modules found by bootloader, so ZFS fails

Did you compare the previous kernel configuration file with the custom file or perhaps by mistake with GENERIC?
It was indeed the custom kernel config file against its previous version from backup.
Obviously, I forgot to pull in these added options when upgrading to 13-stable, and so I tried to pull them now.
Still puzzling why the custom kernel fails. I'll try setting up a spare partition as a UFS backup root FS, just to be able to try some more analysis. I'd really like the custom kernel, in particular since I want to cherry-pick some jail-related netlink change from -current.
 
It was indeed the custom kernel file, compared against the previous one.

Obviously, I forgot to pull these options when upgrading to 13-stable, so I tried pulling them now. I doubt they are the reason for the failure.

I arranged a free partition as a backup UFS, for an alternative root FS. I'll try to start that one, and see whether the ZFS problems can be analyzed from there.
 
(Sorry for the semi double post. I didn't notice the forum software switched to a second page.)
 
OK, the UFS fallback has proven to be useful.

When trying to kldload the ZFS module, I get an
lz4_compress_zfs undefined

I wonder
  • why this happens
  • and why the loader did not tell me this when loading zfs.ko from there
 
Well, the problem appears to be that my zfs.ko uses the wrong source file for lz4. There are two of them:
# ls -l /usr/src/sys/cddl/contrib/opensolaris/common/lz4/lz4.c /sys/contrib/openzfs/module/zfs/lz4.c -rw-r--r-- 1 root wheel 27065 Aug 21 22:06 /sys/contrib/openzfs/module/zfs/lz4.c -rw-r--r-- 1 root wheel 25961 Aug 21 22:06 /usr/src/sys/cddl/contrib/opensolaris/common/lz4/lz4.c
For whatever reason, it uses the one from the opensolaris directory rather than the one from openzfs.
Only the latter defines lz4_compress_zfs and lz4_decompress_zfs.

Puzzling.
 
When going to /sys/modules/zfs, and build the module there, it gets the correct lz4 file used.
 
With the manually built zfs.ko, the kernel boots from zfs root now (including my cherry-picked change from -current).

Still puzzling, also why the loader does not complain about the unresolved symbol when loading zfs.ko.
 
Back
Top