【问题标题】:Debian: how to install a patched kernel?Debian:如何安装打过补丁的内核?
【发布时间】:2021-03-31 13:46:13
【问题描述】:

我需要为我的内核应用一个小补丁(我正在运行 Debian 10)。
然后,我想测试该内核,以确保更改有效。

我确实想卸载我当前的、稳定的、工作的内核,以防万一出现故障而我需要返回它。

为此,我关注this Debian guide。我成功运行了test-patches 脚本,该脚本应用了我的补丁并编译了内核。

这创建了一些.deb 文件。但安装失败 - 见下文。

$ sudo dpkg -i linux-image-4.19.0-5-amd64-unsigned_4.19.37-5+deb10u2a~test_amd64.deb 
[sudo] password for jrw: 
Selecting previously unselected package linux-image-4.19.0-5-amd64-unsigned.
dpkg: considering removing linux-image-4.19.0-5-amd64 in favour of linux-image-4.19.0-5-amd64-unsigned ...
dpkg: no, cannot proceed with removal of linux-image-4.19.0-5-amd64 (--auto-deconfigure will help):
 linux-image-amd64 depends on linux-image-4.19.0-5-amd64
  linux-image-4.19.0-5-amd64 is to be removed.

dpkg: regarding linux-image-4.19.0-5-amd64-unsigned_4.19.37-5+deb10u2a~test_amd64.deb containing linux-image-4.19.0-5-amd64-unsigned:
 linux-image-4.19.0-5-amd64-unsigned conflicts with linux-image-4.19.0-5-amd64
  linux-image-4.19.0-5-amd64 (version 4.19.37-5+deb10u1) is present and installed.

dpkg: error processing archive linux-image-4.19.0-5-amd64-unsigned_4.19.37-5+deb10u2a~test_amd64.deb (--install):
 conflicting packages - not installing linux-image-4.19.0-5-amd64-unsigned
Errors were encountered while processing:
 linux-image-4.19.0-5-amd64-unsigned_4.19.37-5+deb10u2a~test_amd64.deb

现在,我想这是有道理的。我已经安装了 4.19 内核,所以它与我的新的、稍加补丁的 4.19 软件包冲突?

但是这里的标准程序是什么? 如何让两个内核并排安装?

【问题讨论】:

    标签: linux debian


    【解决方案1】:

    最终,我通过调整debian/config/defines 中的“abiname”设置解决了这个问题。这会导致它创建一个名称与我安装的名称(略有)不同的软件包,因此它们可以并排共存。

    我从Debian Kernel Mailing List 那里得到了这个建议

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-10
      • 2015-10-30
      • 1970-01-01
      • 1970-01-01
      • 2014-10-31
      相关资源
      最近更新 更多