从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 LTS 导致内核崩溃。“修复”问题“有效”——但这并不能彻底解决问题!

从 Ubuntu 20.04 LTS 升级到 Ubuntu 22.04 LTS 导致内核崩溃。“修复”问题“有效”——但这并不能彻底解决问题!

直到前几天,我在跑步时Ubuntu 20.04 LTS不小心按了Ctrl++ AltF6这让我的屏幕变黑了,我偶然发现了这个问题。我不知道如何修复这个问题,但我设法回到 Ubuntu 并继续我的工作。但这个组合键似乎损坏了分区上的某些东西/dev/sda5

当我重新启动计算机时,BusyBox屏幕上出现initframs提示,要求我手动运行fsck命令以修复/dev/sda5。 (我使用的是双启动系统:Ubuntu 作为主操作系统,Windows 10 Professional 64 位作为辅助操作系统。Windows 位于。)因此,每次被问到是否应该修复某些问题时,/dev/sda4我都会运行fsck /dev/sda5并输入。当该过程完成后,我尝试书写,但没有成功。因此,我打字并开始工作,但速度比平时慢。yrebootexitUbuntu 20.04 LTS

然后,我终于将 Ubuntu 版本从 升级Ubuntu 20.04 LTS到了Ubuntu 22.04 LTS。起初,一切似乎都运行良好,但新版本的 Ubuntu 也趋于缓慢。当我重新启动计算机时,问题再次出现。这一次,我得到了这样的内核恐慌:

[    0.106049] x86/cpu: SGX disabled by BIOS.
[    0.106049] RETBleed:WARNING: Spectre v2 mitigation leaves CPU vulnerable to RETBleed attacks, data leaks possible!
[    0.370778] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/responses buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80
[    0.370790] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/responses buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80
[    0.483021] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    0.483111] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.15.0-47-generic #51-Ubuntu
[    0.483179] Hardware name: Micro-Star International Co., Ltd. GL62M 7REX/MS-16J9, BIOS E16J9IMS.31C 10/24/2017
[    0.483261] Call Trace:
[    0.483301]  <TASK>
[    0.483322]  show_stack+0x52/0x5c
[    0.483363]  dump_stack_lvl+0x4a/0x63
[    0.483401]  dump_stack+0x10/0x16
[    0.483433]  panic+0x149/0x321
[    0.483467]  mount_block_root+0x144/0x1dd
[    0.483506]  mount_root+0x10c/0x11c
[    0.483539]  prepare_namespace+0x13f/0x191
[    0.483576]  kernel_init_freeable+0x18c/0x1b5
[    0.483616]  ? rest_init+0x100/0x100
[    0.483651]  kernel_init+0x1b/0x150
[    0.483685]  ? rest_init+0x100/0x100
[    0.483719]  ret_from_fork+0x22/0x30
[    0.483758]  </TASK>
[    0.483842] Kernel Offset: 0x29a00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[    0.483926] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

但即使在出现内核恐慌之后,我仍然可以重新启动计算机,运行fsck /dev/dsa5 再次Ubuntu 22.04 LTS开始像以前一样工作(考虑到它在诸如 Firefox 之类的应用程序上运行的速度,它处于或多或少可用的状态)。

然后我发现这个问题但我无法重现答案 1也不是在答案2

当我再次重新启动计算机时,计算机似乎尝试启动 Ubuntu,但失败了。因此,它随后尝试启动 Windows,但 Windows 想要修复文件才能启动。但是,Windows 也未能做到这一点。然后,我再次重新启动计算机并按下 ,F11这使我能够进入GNU GRUB Version 2.06。它为我提供了以恢复模式启动 Ubuntu 的选项。当我打开此选项时,我可以从四个选项中进行选择:

  1. Ubuntu, with Linux 5.15.0-47-generic
  2. Ubuntu, with Linux 5.15.0-47-generic (recovery mode)
  3. Ubuntu, with Linux 5.4.0-125-generic
  4. Ubuntu, with Linux 5.4.0-125-generic (recovery mode)

我首先尝试选择选项 4,但没有成功。(据我所知,出现了内核恐慌再次当我尝试这样做时(但我不再确定是否是这种情况)。)当我重新启动计算机时,我选择了选项 1 并得到以下屏幕:

[    0.112973] x86/cpu: SGX disabled by BIOS.
[    0.448809] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/responses buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80
[    0.448826] tpm_crb MSFT0101:00: [Firmware Bug]: ACPI region does not cover the entire command/responses buffer. [mem 0xfed40000-0xfed4087f flags 0x200] vs fed40080 f80
/dev/sda5 contains a file system with errors, check forced.
Deleted inode 1179964 has zero dtime.  FIXED.
Inodes that were part of a corrupted orphan linked list found.

/dev/sda5: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck exited with status code 4
The root filesystem on /dev/sda5 requires a manual fsck

BusyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntu3) built-in shell (ash)
Enter 'help' for a list of built-in commands

(initframs)

我现在运行fsck /dev/sda5 -y并得到以下输出(...代表遗漏,因为命令运行太快,我无法记录每个输出):

(initframs) fsck /dev/sda5 -y
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
/dev/sda5 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix? yes

Inode 4718704 was part of the orphaned inode list.  FIXED.
Inode 4718839 was part of the orphaned inode list.  FIXED.
Inode 4719315 was part of the orphaned inode list.  FIXED.
Inode 4719471 was part of the orphaned inode list.  FIXED.
Inode 4720219 was part of the orphaned inode list.  FIXED.
Inode 4720221 was part of the orphaned inode list.  FIXED.
Inode 4720679 was part of the orphaned inode list.  FIXED.
Inode 5506154 was part of the orphaned inode list.  FIXED.
Inode 5636869 was part of the orphaned inode list.  FIXED.
Inode 5636979 was part of the orphaned inode list.  FIXED.
Inode 5637123 was part of the orphaned inode list.  FIXED.
Inode 5637124 was part of the orphaned inode list.  FIXED.
Inode 5637363 was part of the orphaned inode list.  FIXED.
Inode 5637375 was part of the orphaned inode list.  FIXED.
Inode 5637686 was part of the orphaned inode list.  FIXED.
Inode 5637696 was part of the orphaned inode list.  FIXED.
Inode 6179120 extent tree (at level 1) could be shorter.  Optimize? yes

Inode 6291478 was part of the orphaned inode list.  FIXED.
Pass 1E: Optimizing extent trees
Pass 2: Checking directory struture

...

Free blocks count wrong for group #707 (7156, counted=7164).
Fix? yes

Free blocks count wrong for group #737 (17164, counted=17166).
Fix? yes

Free blocks count wrong for group #754 (22353, counted=22359).
Fix? yes

Free blocks count wrong for group #755 (26341, counted=26370).
Fix? yes

Free blocks count wrong for group #756repair f (15249, counted=15257).
Fix? yes

Free blocks count wrong for group #771 (20213, counted=20234).
Fix? yes

Inode bitmap differences:  -1179964 -4718704 -4718839 -4719315 -4719471 -4720219 -4720221 -4720679 -5506154 -5636869 -5636979 -(5637123--5637124) -5637363 -5637375 -5637696 -6291478
Fix? yes

Free blocks count wrong for group #144 (5663, counted=5664).
Fix? yes

Free blocks count wrong for group #576 (558, counted=565).
Fix? yes

Free blocks count wrong for group #672 (57, counted=58).
Fix? yes

Free blocks count wrong for group #688 (98, counted=106).
Fix? yes

Free blocks count wrong for group #768 (882, counted=883).
Fix? yes

Free inodes count wrong (5873275, counted=5873293).
Fix? yes

/dev/sda5: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda5: 532851/6406144 files (0.5% non-contagious), 18956397/25600000 blocks
(initframs)

尝试写入reboot不会产生任何结果。写入exit将返回以下输出...

(initframs) reboot
(initframs) exit
/dev/sda5: clean, 532851/6406144 files, 18956397/25600000 blocks
[ 1276.469780] mtd device must be supplied (device name is empty)
[ 1318.592260]
[ 1324.158825] mtd device must be supplied (device name is empty)

…然后重新启动Ubuntu 22.04 LTS(不要担心花费的时间太长。大约 20 分钟后,我回到电脑前输入命令。)

我怎样才能彻底解决这个问题?每次启动电脑时都这么麻烦,这不是解决办法。而且 Windows 也有启动问题,在我看来,这是由我遇到的 Linux 启动问题引起的。

相关内容