You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 22.04启动6.2.0-26内核触发panic,且无法正常卸载/配置该内核(含fuse钩子错误)

Ubuntu 22.04启动6.2.0-26内核触发panic,且无法正常卸载/配置该内核(含fuse钩子错误)

看起来你遇到了挺棘手的内核问题——当前运行5.19.0-50-generic一切正常,但启动6.2.0-26-generic直接触发内核panic,而且这个内核既没法正常配置也没法卸载,甚至安装Node.js都被牵连报错。我帮你梳理下问题细节,并给出可行的解决步骤:

一、内核Panic日志详情

当尝试启动6.2.0-26-generic时,系统抛出以下panic信息:

[    0.249519] x86/cpu: SGX disabled by BIOS.

[    0.707338] tpm tpm0: [Firmware Bug]: TPM interrupt not working, polling instead

[    0.802756] /dev/root: Can't open blockdev

[    0.802792] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

[    0.802820] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.2.0-26-generic #26~22.04.1-Ubuntu

[    0.802847] Hardware name: LENOVO 20N3S77600/20N3S77600, BIOS N2IETA1W (1.79 ) 01/16/2023

[    0.802881] Call Trace:

[    0.802893]  <TASK>

[    0.802905]  dump_stack_lvl+0x48/0x70

[    0.802927]  dump_stack+0x10/0x20

[    0.802944]  panic+0x35a/0x3a0

[    0.802963]  mount_block_root+0x27b/0x280

[    0.802983]  mount_root+0x83/0xb0

[    0.802998]  prepare_namespace+0xf5/0x200

[    0.803016]  kernel_init_freeable+0x1c1/0x200

[    0.803034]  ? __pfx_kernel_init+0x10/0x10

[    0.803053]  kernel_init+0x1b/0x200

[    0.803070]  ? __pfx_kernel_init+0x10/0x10

[    0.803087]  ret_from_fork+0x29/0x50

[    0.803105]  </TASK>

[    0.803175] Kernel Offset: 0x8200000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)

[    0.803212] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

核心问题是VFS无法挂载根文件系统,同时日志里还提到了SGX被BIOS禁用、TPM固件bug,这些可能和新内核的硬件兼容性有关。

二、/boot目录文件列表

当前/boot下的文件如下(包含两个版本的内核文件):

@komp:/boot$ ls

config-5.19.0-50-generic      initrd.img.old                vmlinuz

config-6.2.0-26-generic       memtest86+.bin                vmlinuz-5.19.0-50-generic

efi                           memtest86+.elf                vmlinuz-6.2.0-26-generic

grub                          memtest86+_multiboot.bin      vmlinuz.old

initrd.img                    System.map-5.19.0-50-generic

initrd.img-5.19.0-50-generic  System.map-6.2.0-26-generic

三、安装Node.js时触发的内核配置错误

安装Node.js时,系统尝试配置残留的6.2.0-26内核,触发了initramfs的fuse钩子错误:

komp:~$ sudo apt-get install nodejs

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

nodejs is already the newest version (18.17.1-deb-1nodesource1).

The following packages were automatically installed and are no longer required:

libfreerdp-client2-2 libfreerdp-server2-2 libfreerdp2-2 libjs-highlight.js libvncserver1

libwinpr2-2

Use 'sudo apt autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 296 not upgraded.

2 not fully installed or removed.

After this operation, 0 B of additional disk space will be used.

Do you want to continue? [Y/n] y

Setting up initramfs-tools (0.140ubuntu13) ...

update-initramfs: deferring update (trigger activated)

Setting up linux-image-6.2.0-26-generic (6.2.0-26.26~22.04.1) ...

Processing triggers for initramfs-tools (0.140ubuntu13) ...

update-initramfs: Generating /boot/initrd.img-5.19.0-50-generic

E: /usr/share/initramfs-tools/hooks/fuse failed with return 1.

update-initramfs: failed for /boot/initrd.img-5.19.0-50-generic with 1.

dpkg: error processing package initramfs-tools (--configure):

installed initramfs-tools package post-installation script subprocess returned error exit status 1

Processing triggers for linux-image-6.2.0-26-generic (6.2.0-26.26~22.04.1) ...

/etc/kernel/postinst.d/dkms:

* dkms: running auto installation service for kernel 6.2.0-26-generic

...done.

/etc/kernel/postinst.d/initramfs-tools:

update-initramfs: Generating /boot/initrd.img-6.2.0-26-generic

E: /usr/share/initramfs-tools/hooks/fuse failed with return 1.

update-initramfs: failed for /boot/initrd.img-6.2.0-26-generic with 1.

run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1

dpkg: error processing package linux-image-6.2.0-26-generic (--configure):

installed linux-image-6.2.0-26-generic package post-installation script subprocess returned error exit status 1

Errors were encountered while processing:

initramfs-tools

linux-image-6.2.0-26-generic

E: Sub-process /usr/bin/dpkg returned an error code (1)

这里的关键错误是E: /usr/share/initramfs-tools/hooks/fuse failed with return 1,它导致initramfs生成失败,进而卡住了内核包的配置流程。


四、解决步骤

1. 先修复fuse钩子错误,恢复initramfs功能

首先处理fuse钩子的问题,这是当前所有报错的源头:

  • 临时禁用有问题的fuse钩子脚本:
    sudo chmod -x /usr/share/initramfs-tools/hooks/fuse
    
  • 重新生成当前在用的5.19内核的initramfs:
    sudo update-initramfs -u -k 5.19.0-50-generic
    
  • 如果之后需要恢复fuse钩子,可以检查脚本内容是否有语法错误或适配问题:
    sudo nano /usr/share/initramfs-tools/hooks/fuse
    
    对比默认脚本内容,修复错误后再重新赋予执行权限:sudo chmod +x /usr/share/initramfs-tools/hooks/fuse

2. 强制清理/卸载有问题的6.2.0-26内核

修复initramfs后,就可以处理残留的6.2内核了:

  • 尝试强制重新配置内核包,看能否正常完成:
    sudo dpkg --configure -a --force-all
    
  • 如果还是失败,直接强制卸载6.2内核相关的所有包:
    sudo apt remove --purge linux-image-6.2.0-26-generic linux-headers-6.2.0-26-generic linux-modules-6.2.0-26-generic
    
  • 手动清理/boot目录下残留的6.2内核文件(注意不要误删5.19的文件):
    sudo rm -f /boot/config-6.2.0-26-generic /boot/initrd.img-6.2.0-26-generic /boot/System.map-6.2.0-26-generic /boot/vmlinuz-6.2.0-26-generic
    
  • 更新GRUB引导菜单,确保系统默认引导正常的5.19内核:
    sudo update-grub
    

3. 后续预防建议

  • 如果之后需要尝试升级内核,先检查BIOS设置:比如调整SGX启用状态、检查TPM相关选项,日志里的固件提示可能影响新内核的兼容性。
  • 优先使用Ubuntu官方稳定内核源,避免使用可能存在兼容性问题的第三方内核包。

备注:内容来源于stack exchange,提问作者Hendranata Saputra

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 15:33:14