在该问题底部进行了 3 处编辑并提供了更多信息。
当我例行升级到最新的通用内核时,升级失败并停止了我的计算机启动。我不得不执行 zfs 回滚来恢复。它创建了一个 vmlinuz-6.2.0-26-generic,但没有 initrd.img 文件。我的启动目录中有足够的空间(622208 kb)。当我尝试安装软件包时,我收到 dpkg 错误:
dave@dave-X570:~$ sudo apt-get install linux-image-generic
[sudo] password for dave:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
linux-image-6.2.0-26-generic
The following NEW packages will be installed
linux-image-6.2.0-26-generic linux-image-generic
0 to upgrade, 2 to newly install, 0 to remove and 1 not to upgrade.
Need to get 14.3 MB of archives.
After this operation, 14.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-image-6.2.0-26-generic amd64 6.2.0-26.26 [14.3 MB]
Get:2 http://mirror.ox.ac.uk/sites/archive.ubuntu.com/ubuntu lunar-updates/main amd64 linux-image-generic amd64 6.2.0.26.26 [8,224 B]
Fetched 14.3 MB in 1s (10.9 MB/s)
Requesting to save current system state
Successfully saved as "autozsys_dfx1su"
Selecting previously unselected package linux-image-6.2.0-26-generic.
(Reading database ... 740023 files and directories currently installed.)
Preparing to unpack .../linux-image-6.2.0-26-generic_6.2.0-26.26_amd64.deb ...
Unpacking linux-image-6.2.0-26-generic (6.2.0-26.26) ...
Selecting previously unselected package linux-image-generic.
Preparing to unpack .../linux-image-generic_6.2.0.26.26_amd64.deb ...
Unpacking linux-image-generic (6.2.0.26.26) ...
Setting up linux-image-6.2.0-26-generic (6.2.0-26.26) ...
I: /boot/vmlinuz is now a symlink to vmlinuz-6.2.0-26-generic
I: /boot/initrd.img is now a symlink to initrd.img-6.2.0-26-generic
Setting up linux-image-generic (6.2.0.26.26) ...
Processing triggers for linux-image-6.2.0-26-generic (6.2.0-26.26) ...
/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
grep: /boot/config-6.2.0-26-generic: No such file or directory
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: /boot/config-6.2.0-26-generic: No such file or directory
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
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:
linux-image-6.2.0-26-generic
ZSys is adding automatic system snapshot to GRUB menu
E: Sub-process /usr/bin/dpkg returned an error code (1)
这就是我在 /boot 中最终得到的结果:
total 175149
-rw-r--r-- 1 root root 275920 Jun 16 14:22 config-6.2.0-25-generic
drwxr-xr-x 3 root root 512 Jan 1 1970 efi
drwxr-xr-x 4 root root 512 Jan 1 1970 efi2
drwxr-xr-x 4 root root 512 Jan 1 1970 efi3
drwxr-xr-x 6 root root 9 Jul 30 15:17 grub
lrwxrwxrwx 1 root root 27 Jul 30 15:06 initrd.img -> initrd.img-6.2.0-26-generic
-rw-r--r-- 1 root root 147970001 Jul 12 21:37 initrd.img-6.2.0-25-generic
lrwxrwxrwx 1 root root 27 Jul 30 14:39 initrd.img.old -> initrd.img-6.2.0-25-generic
-rw-r--r-- 1 root root 138712 Feb 11 10:16 memtest86+ia32.bin
-rw-r--r-- 1 root root 139776 Feb 11 10:16 memtest86+ia32.efi
-rw-r--r-- 1 root root 144312 Feb 11 10:16 memtest86+x64.bin
-rw-r--r-- 1 root root 145408 Feb 11 10:16 memtest86+x64.efi
-rw------- 1 root root 8163660 Jun 16 14:22 System.map-6.2.0-25-generic
lrwxrwxrwx 1 root root 24 Jul 30 15:06 vmlinuz -> vmlinuz-6.2.0-26-generic
-rw------- 1 root root 13854600 Jun 16 16:47 vmlinuz-6.2.0-25-generic
-rw------- 1 root root 14482632 Jul 10 21:31 vmlinuz-6.2.0-26-generic
lrwxrwxrwx 1 root root 24 Jul 30 14:39 vmlinuz.old -> vmlinuz-6.2.0-25-generic
我在 root ZFS 上运行 Kubuntu 23.04。但如果这是问题所在,我本以为会出现 dkms 错误。为什么安装没有生成 /boot/config-6.2.0-26-generic 或 initrd.img-6.2.0-26-generic?
更新
然后我将 config-6.2.0-25-generic 复制到 config-6.2.0-26-generic,因为 update-initramfs 尚未创建它。然后当我运行 sudo update-initramfs -v -c -k 6.2.0-26-generic 时,它创建了 /boot/initrd.img-6.2.0-26-generic。然后我运行 update-grub 并重新启动。
重启后,它开始启动 6.2.0-26,但未完成。从 6.2.0-25 启动成功。
我在启动过程中注意到了一个重大差异。当它识别出连接的两个显示器时,它开始将启动过程行回显到我的第二个屏幕上,并缩小了我主 4K 屏幕上的字体大小。这一定是在 AMD 显卡驱动程序开始工作并识别屏幕后发生的。但这并没有发生在 6.2.0-26 initrd 映像上。
更新 2
我删除了 6.2.0-26,并继续运行 6.2.0-25 一段时间。然后,当我对 linux-firmware 进行 apt 升级时,它运行了 dkms 并为 6.2.0-25 生成了一个新的内核映像。它没有重新启动。我不得不使用 zfs rollback 来回到正常工作的内核。
因此,dkms 进程似乎出了问题。我运行了 dkms status 并得到了此报告。
dave@dave-X570:/boot$ sudo dkms status
[sudo] password for dave:
fwts-efi-runtime-dkms/23.01.00, 5.19.0-41-generic, x86_64: installed (WARNING! Diff between built and installed module!)
fwts-efi-runtime-dkms/23.01.00, 6.2.0-20-generic, x86_64: installed (WARNING! Diff between built and installed module!)
fwts-efi-runtime-dkms/23.01.00, 6.2.0-23-generic, x86_64: installed (WARNING! Diff between built and installed module!)
fwts-efi-runtime-dkms/23.01.00, 6.2.0-24-generic, x86_64: installed (WARNING! Diff between built and installed module!)
fwts-efi-runtime-dkms/23.01.00, 6.2.0-25-generic, x86_64: installed (WARNING! Diff between built and installed module!)
fwts-efi-runtime-dkms/23.01.00, 6.2.0-26-generic, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 5.19.0-41-generic, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 6.2.0-20-generic, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 6.2.0-23-generic, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 6.2.0-24-generic, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 6.2.0-25-generic, x86_64: installed (WARNING! Diff between built and installed module!)
v4l2loopback/0.12.7, 6.2.0-26-generic, x86_64: installed (WARNING! Diff between built and installed module!)
zfs/2.1.9, 6.2.0-23-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
zfs/2.1.9, 6.2.0-24-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
zfs/2.1.9, 6.2.0-25-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
zfs/2.1.9, 6.2.0-26-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
更新 3
安装了内核 6.2.0-27,生成了 config-6.2.0-27-generic 和 initrd.img-6.2.0-27-generic。但重启失败。所以我重启到了 6.2.0-25-generic。
在将 journalctl -b -1 | grep amdgpu 与 journalctl -b 0 | grep amdgpu 进行比较时,我发现 6.2.0-27 启动中没有 amdgpu 行。
这意味着 initramfs 没有在 initrd.img-6.2.0-27-generic 中包含 amdgpu 固件或模块
答案1
经过所有尝试(包括多次重新安装 Ubuntu)后,使用Linux 6.2.0-26-generic
驱动程序nvidia-driver-535
仍然xserver-xorg-video-nouveau
导致了此问题。
我最后一次安装时没有联网。它启动时Linux 5.19.0-32-generic
没有任何问题。使用sudo apt update && sudo apt upgrade -y
命令,Linux 6.2.0-26-generic
版本会自动安装。重启后,计算机没有再次启动。我在启动时再次选择了版本,它启动时没有任何问题。我从应用程序中的选项卡Linux 5.19.0-32-generic
安装了驱动程序。当我重新启动计算机时,版本已成功打开。nvidia-driver-525
Additional Drivers
Software & Updates
Linux 6.2.0-26-generic
也许这些步骤也能解决您的问题。
附言:我在台式机上使用 Ubuntu 22.04.2 LTS。我有 Ryzen 7 3500 CPU 和 Gigabyte RTX 3060 Ti 8GB GPU
答案2
我报告了与@o.mora 在华硕 Nitro 5(英特尔 i7、NVIDIA RTX 3060 6GB GPU)上的 ubuntu 22.04.2 LTS 上遇到的相同问题。
通过使用 Linux 5.19.0-32 通用版启动并将 nvidia 驱动程序从 Nouveau 更改为 nvidia 服务器驱动程序 525,问题已得到解决。然后使用 6.2.0-26 重新启动,一切正常。
答案3
我遇到了同样的问题。通过使用 Grub 中的“附加选项”菜单实际启动到以前的 5.xx 版本,解决了这个问题。
然后我直接进入驱动程序并将 nvidia 驱动程序更改为nvidia-driver-525
,重新启动并完成。一旦您知道它是什么,解决起来就很简单。
答案4
我也遇到了 Ubuntu 22.04.3 LTS 升级内核后无法启动的问题6.2.0-26-通用(通过apt dist-upgrade)。我找到了 OP 描述我的问题的帖子和@O. Mora 的回复:
经过所有尝试(包括多次重新安装 Ubuntu),使用 Linux 6.2.0-26-generic驱动程序 nvidia-driver-535或者xserver-xorg-video-nouveau导致了这个问题。
因此我使用以前的内核重新启动(5.19.0-50-通用)并发现我确实使用了xserver-xorg-video-nouveau而不是 NVIDIA 驱动程序。我不确定视频驱动程序是如何回滚的。我重新安装了来自 nvidia-driver-525 的 NVIDIA 驱动程序元包(专有),重新启动,内核 6.2.0-26-generic 现在运行正常。
仅供参考:我正在运行带有 NVIDIA 3080 12GB 的 AMD 5800。