无法降级 linux-image-amd64

无法降级 linux-image-amd64

前段时间,想在Debian 10 Buster 系统上尝试5.10.127-2~bpo10+1内核。

但是,Debian 不再维护或修补该内核。

现在,新的 4.19.x 内核不再自动升级,因为 linux-image-amd64 包的版本是 5.10.127-2~bpo10+1。

当我尝试降级回 4.19.169-1 时,4.19.x 系列内核将自动升级,我得到:

root@domac:~# apt-get -t buster -s install linux-image-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-amd64 is already the newest version (5.10.127-2~bpo10+1).

我知道 --allow-downgrades 选项,但是手册说它很危险,它会在不询问任何问题的情况下损害系统:

   --allow-downgrades
       This is a dangerous option that will cause apt to continue without prompting if it is doing downgrades. It should not be used except in very
       special situations. Using it can potentially destroy your system! Configuration Item: APT::Get::allow-downgrades. Introduced in APT 1.1.

我可以试试

root@domac:~# apt-get -t buster -s --allow-downgrades install linux-image-amd64

但是,我不确定这在生产机器上是否安全。在非 root 模拟中,它没有降级或重新安装 linux-image-amd64 版本 4.19.269-1:

username@domac:~$ apt-get -t buster -s --allow-downgrades install linux-image-amd64
NOTE: This is only a simulation!
      apt-get needs root privileges for real execution.
      Keep also in mind that locking is deactivated,
      so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-image-amd64 is already the newest version (5.10.127-2~bpo10+1).

非常感谢大家的帮助。

笔记:

在 CentOS 克隆和 rpm 打包上,我可以使用以下方法降级内核:

# rpm -ivh --oldpackage ./kernel-<version>-<build>.rpm

已成功完成多次,但我似乎找不到等效的 .deb apt 包。

答案1

确实,降级软件包永远无法保证。但对于这个特定情况,这linux-image-amd64几乎是一个空元包仅用于其对实际内核包的依赖。这样的降级不会有危险。

声明预期的版本或发布版本(直到 Debian 11 才有单独的 -security 代号,所以不是busterbuster-security将负责强制预期的版本/发布,而不会强制降级任何其他软件包(如果需要它,它反而会失败):

apt-get install linux-image-amd64/buster

(今天)这将拉包linux-image-4.19.0-23-amd64这是实际的 4.19.269 内核(加上 Debian 的更改),但是4.19.282 正在筹备中


关于支持和安全的一些说明。

  • 反向移植的软件包没有任何安全保障。

  • Debian 10 现已长期支持服务阶段,对一组有限的软件包提供更有限的支持。可以假设诸如内核之类的基础软件包仍会获得安全支持,但可能不会获得所有支持。

    例如在这个页面上:https://security-tracker.debian.org/tracker/source-package/linux可以看出:

    通常(但并非总是)它取决于上游源上修复的可用性,因为内核仍然比其他软件包上游源跟踪得更紧密。

无论如何,现在计划升级到 Debian 11 是个好主意。

相关内容