强制 ubuntu 22.04.3 使用内核 6.2 而不是 5.15

Har*_*ald 0 upgrade updates apt kernel 22.04

我有两台笔记本电脑显示

DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
Run Code Online (Sandbox Code Playgroud)

但其中之一有

Linux ... 6.2.0-39-generic #40~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov 16 10:53:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

另一个显示旧的内核版本:

Linux ... 5.15.0-91-generic #101-Ubuntu SMP Tue Nov 14 13:30:08 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)

两者都很apt-get update; apt-get upgrade干净。我也许可以强迫

apt-get install linux-image-6.2.0-39-generic
Run Code Online (Sandbox Code Playgroud)

但这可能会加剧没有自动更新的问题。使用update-manager已经过时了,因为我只能通过 ssh 访问机器。

我如何知道apt-???切换到较新的内核系列?

use*_*733 7

我如何告诉 apt-??? 切换到较新的内核系列?

无需“强迫”任何事情。

  1. 只需为您的 Ubuntu LTS 版本安装 HWE 元包即可:(sudo apt install linux-generic-hwe-22.04感谢 @noisefloor)

  2. 让它引入依赖项,然后重新启动。

  3. 可选:删除原始 GA 元包:sudo apt remove linux-image-generic

要反转该过程并返回到 GA 内核,只需重新安装 GA 元包并卸载 HWE。

出现差异的原因是您在不同时间使用了两种不同的 22.04 Server 安装介质。过于简单化:较新的安装介质会使用较新的内核重新旋转。HWE 会针对新硬件更新您的内核版本。(感谢@guiverc)

  • 一些服务器所有者不想要更新的内核,因此原始 22.04 服务器安装介质中的原始 GA (5.15) 内核在发行版的生命周期内受到支持。这些人必须使用原始的 22.04 或 22.04.0 服务器安装程序...或者告诉 apt 从 HWE 切换到 GA,如上所述。