启用安全启动后内核更新无法加载 zfs 模块,dkms 似乎没问题

启用安全启动后内核更新无法加载 zfs 模块,dkms 似乎没问题

Ubuntu 23.10

内核更新至 6.5.0-15 后,系统无法在启动时加载 zfs 模块。我以前遇到过这个问题,通过 dpkg-reconfiguring zfs-dkms 解决了。这次它似乎已经针对正在运行的内核进行了配置,再次重新配置没有任何效果。

我知道我可以通过关闭安全启动(我目前正在做的)或回滚到以前的内核版本(可能,实际上没有尝试,应该可行)来“解决”这个问题。

» dkms status                                                                                                                 
zfs/2.2.0, 6.5.0-15-generic, x86_64: installed
» uname -a                                                                                                                    
Linux swiftmoon 6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan  9 17:03:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

从 apt 日志中:

Setting up linux-image-6.5.0-15-generic (6.5.0-15.15) ...
I: /boot/vmlinuz is now a symlink to vmlinuz-6.5.0-15-generic
I: /boot/initrd.img is now a symlink to initrd.img-6.5.0-15-generic
Setting up linux-image-generic-hwe-22.04 (6.5.0.15.17) ...
Setting up linux-image-generic (6.5.0.15.17) ...
Setting up linux-headers-6.5.0-15-generic (6.5.0-15.15) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.5.0-15-generic
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Building module:
Cleaning build area...
make -j12 KERNELRELEASE=6.5.0-15-generic................
Signing module /var/lib/dkms/zfs/2.2.0/build/module/zfs.ko
Signing module /var/lib/dkms/zfs/2.2.0/build/module/spl.ko

Running the post_build script:
Cleaning build area...

(跳过)

zfs.ko.zst:
Running module version sanity check.
Module version 2.2.0-0ubuntu1~23.10 for zfs.ko.zst
exactly matches what is already found in kernel 6.5.0-15-generic.
DKMS will not replace this module.
You may override by specifying --force.

spl.ko.zst:
Running module version sanity check.
Module version 2.2.0-0ubuntu1~23.10 for spl.ko.zst
exactly matches what is already found in kernel 6.5.0-15-generic.
DKMS will not replace this module.
You may override by specifying --force.
depmod...
dkms autoinstall on 6.5.0-15-generic/x86_64 succeeded for zfs
 * dkms: autoinstall for kernel 6.5.0-15-generic
   ...done.

编辑:通过删除 zfs-dkms 解决了这个问题。结果发现我活在过去,它根本不需要,正如评论中指出的那样。

EDIT_2:系统在空闲约 30 分钟后完全冻结,重新启动后会加载到恢复模式并在启动登录管理器时冻结。通过回滚 zfs 快照修复。目前在日志中找不到任何有用的东西。不知道该怎么做。

相关内容