软件更新程序安装了最新的内核 4.4.0-130,然后我重新启动,但在 grub 高级设置菜单中找不到它。我查找了一下,发现它没有运行:
dpkg -l | grep linux-image
rc linux-image-4.4.0-109-generic 4.4.0-109.132 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-112-generic 4.4.0-112.135 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-116-generic 4.4.0-116.140 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-119-generic 4.4.0-119.143 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-121-generic 4.4.0-121.145 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rc linux-image-4.4.0-122-generic 4.4.0-122.146 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-124-generic 4.4.0-124.148 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-127-generic 4.4.0-127.153 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-128-generic 4.4.0-128.154 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-130-generic 4.4.0-130.156 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
uname -r
4.4.0-128-generic
然后我运行了 Grub Customizer,其中列出了新内核,保存了新配置并再次重新启动。新内核仍然没有运行。然后我打开终端并运行:
sudo update-grub
我再次重新启动,结果还是一样。
更新:-128 和 -130 似乎可以启动,但在桌面界面前挂起,好像级联故障,每个先前的内核现在都出现启动问题。当前运行 4.4.0-124
我应该如何进行故障排除,并使新内核在此类更新后正常运行?我可以清除 -130,然后通过 apt 重新安装更新吗?有什么安全的方法可以做到这一点?
根据要求编辑:
:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 1900716 0 1900716 0% /dev
tmpfs 384252 6096 378156 2% /run
/dev/sda6 40197496 8797872 29334628 24% /
tmpfs 1921244 45500 1875744 3% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 1921244 0 1921244 0% /sys/fs/cgroup
/dev/loop0 38528 38528 0 100% /snap/handbrake-jz/132
/dev/loop2 38528 38528 0 100% /snap/handbrake-jz/133
/dev/loop1 142848 142848 0 100% /snap/gnome-3-26-1604/64
/dev/loop3 38656 38656 0 100% /snap/handbrake-jz/134
/dev/loop6 89088 89088 0 100% /snap/core/4917
/dev/loop4 88704 88704 0 100% /snap/core/4650
/dev/loop5 89088 89088 0 100% /snap/core/4830
/dev/sda7 502672688 410111864 71567120 86% /home
tmpfs 384252 88 384164 1% /run/user/1000
:~$ df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
udev 475179 521 474658 1% /dev
tmpfs 480311 756 479555 1% /run
/dev/sda6 2564096 339157 2224939 14% /
tmpfs 480311 147 480164 1% /dev/shm
tmpfs 480311 3 480308 1% /run/lock
tmpfs 480311 16 480295 1% /sys/fs/cgroup
/dev/loop0 511 511 0 100% /snap/handbrake-jz/132
/dev/loop2 502 502 0 100% /snap/handbrake-jz/133
/dev/loop1 27651 27651 0 100% /snap/gnome-3-26-1604/64
/dev/loop3 503 503 0 100% /snap/handbrake-jz/134
/dev/loop6 12842 12842 0 100% /snap/core/4917
/dev/loop4 12841 12841 0 100% /snap/core/4650
/dev/loop5 12841 12841 0 100% /snap/core/4830
/dev/sda7 31932416 117242 31815174 1% /home
tmpfs 480311 37 480274 1% /run/user/1000
:~$
重新安装输出:
:~$ sudo apt install --reinstall linux-image-generic
[sudo] password for x:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-124 linux-headers-4.4.0-124-generic
linux-headers-4.4.0-127 linux-headers-4.4.0-127-generic
linux-image-4.4.0-124-generic linux-image-4.4.0-127-generic
linux-image-extra-4.4.0-124-generic linux-image-extra-4.4.0-127-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 10 not upgraded.
Need to get 0 B/2,532 B of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 316411 files and directories currently installed.)
Preparing to unpack .../linux-image-generic_4.4.0.130.136_amd64.deb ...
Unpacking linux-image-generic (4.4.0.130.136) over (4.4.0.130.136) ...
Setting up linux-image-generic (4.4.0.130.136) ...
:~$
重启后:
:~$ uname -r
4.4.0-130-generic
:~$
我重启了 10 次,但还是一样解决结果还测试了以前的内核到 -124,观察到零(硬启动)在桌面界面之前挂起。显然这解决了我的问题 user535733,如果你以发布的答案的形式重新陈述你的想法,我很乐意给你信用。我会进一步研究这一点,以供将来参考和启发。
答案1
第一个明确的问题是你没有安装最新的内核:你的最新版本是 -130,而 Ubuntu 目前分发的是 -136。此类问题最常见的原因是你的linux-image-generic
元软件包已过期。
解决方案:使用sudo apt install --reinstall linux-image-generic
刷新元包,它将反过来为您发布的 Ubuntu 引入最新的内核。
你似乎又有一个,第二个问题比较模糊有多种症状:
- 过时的
linux-image-generic
元包 - 内核正在安装,但未在 GRUB 中显示
导致这些症状的可能原因有多种:
/
或磁盘空间不足/boot
:使用以下方法检查df
- 磁盘 inode 不足:检查
df -i
- Apt 冲突:查看 apt 错误消息
磁盘空间和 apt 问题通常不会自行解决。似乎您可能需要做一些事情(无论您是否知道)才能解决问题。