![Ubuntu 更新后无法启动](https://linux22.com/image/948803/Ubuntu%20%E6%9B%B4%E6%96%B0%E5%90%8E%E6%97%A0%E6%B3%95%E5%90%AF%E5%8A%A8.png)
我在 Asrock J4005(嵌入式 CPU)下运行使用 5.15.0.47 内核的 Ubuntu Jammy。更新并重启后,启动过程停止(显示器显示无信号)。我从 grub 菜单选项中删除了 quiet 和 splash,我可以看到一堆信息,但没有明显的错误。
使用恢复模式,我能够获取与我的嵌入式网卡 (realtek r8168) 相关的更新错误 (dkms 崩溃日志)。错误是内核和 realtek 模块之间的 gcc 版本不匹配。我将 Ubuntu 配置为使用 gcc11 而不是 gcc8,并且能够重建 r8168-dkms。完成此步骤后,我仍然无法正常启动。我可以在恢复模式下启动,然后从恢复菜单中选择“尝试恢复正常启动”。通过这样做,我找到了一个完全正常工作的 Ubuntu。
我如何才能找到正常启动过程不起作用的原因?使用恢复模式启动这台电脑不是一个选择,因为我将这台电脑用作没有屏幕和键盘的服务器
我找到了这个文件:r8168-dkms.0.crash
DKMSBuildLog:
DKMS make.log for r8168-8.049.02 for kernel 5.15.0-47-generic (x86_64)
Mo 05 Sep 2022 16:32:48 CEST
make: Entering directory '/usr/src/linux-headers-5.15.0-47-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
You are using: gcc (Ubuntu 8.5.0-0ubuntu4) 8.5.0
CC [M] /var/lib/dkms/r8168/8.049.02/build/r8168_n.o
CC [M] /var/lib/dkms/r8168/8.049.02/build/r8168_asf.o
CC [M] /var/lib/dkms/r8168/8.049.02/build/rtl_eeprom.o
CC [M] /var/lib/dkms/r8168/8.049.02/build/rtltool.o
gcc: error: unrecognized command line option ‘-mharden-sls=all’; did you mean ‘-mhard-float’?
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/r8168/8.049.02/build/r8168_n.o] Error 1
make[1]: *** Waiting for unfinished jobs....
gcc: error: unrecognized command line option ‘-mharden-sls=all’; did you mean ‘-mhard-float’?
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/r8168/8.049.02/build/r8168_asf.o] Error 1
gcc: error: unrecognized command line option ‘-mharden-sls=all’; did you mean ‘-mhard-float’?
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/r8168/8.049.02/build/rtl_eeprom.o] Error 1
gcc: error: unrecognized command line option ‘-mharden-sls=all’; did you mean ‘-mhard-float’?
make[1]: *** [scripts/Makefile.build:297: /var/lib/dkms/r8168/8.049.02/build/rtltool.o] Error 1
make: *** [Makefile:1881: /var/lib/dkms/r8168/8.049.02/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.0-47-generic'
DKMSKernelVersion: 5.15.0-47-generic
Date: Mon Sep 5 16:32:50 2022
DuplicateSignature: dkms:r8168-dkms:8.049.02-1ubuntu1:gcc: error: unrecognized command line option ‘-mharden-sls=all’; did you mean ‘-mhard-float’?
Package: r8168-dkms 8.049.02-1ubuntu1
PackageVersion: 8.049.02-1ubuntu1
SourcePackage: r8168
Title: r8168-dkms 8.049.02-1ubuntu1: r8168 kernel module failed to build
还有哪些文件有用?dmesg?一些 /var/syslog 文件?在启动过程中,屏幕直接关闭而不显示错误。
谢谢