shim-signed 破坏 dkms

shim-signed 破坏 dkms

我正在尝试在 Ubuntu 16.04 上安装 dkms 软件包。我无法访问互联网,因为 Ubuntu 无法检测到以太网适配器 (Realtek)。在 Google 上搜索该问题,似乎我必须安装 r8168 驱动程序,我用另一台 PC 下载了 r8168-dkms_8.041.00-1_all.deb 文件并尝试安装它。不幸的是,这取决于陣容尚未安装。

因此,我手动下载了 dkms_2.2.0.3-2ubuntu11_all.deb 并运行以下命令:

sudo dpkg -i dkms_2.2.0.3-2ubuntu11_all.deb

但是我对 shim-signed 有一个问题,我对此不熟悉。

shim-signed (1.33.1~16.04.5+15+1533136590.3beb971-0ubuntu1) breaks dkms (<< 2.2.0.3-2ubuntu11.6) and is installed

我按照此链接中的方法 2 操作https://wiki.ubuntu.com/UEFI/SecureBoot/DKMS在 shim-signed 中禁用安全启动,但老实说,我甚至不知道这是否有意义(并且它并没有解决问题)......

有人知道如何在没有互联网连接的情况下安装 dkms 吗?

更新 1

我删除了 16.04,成功安装了 Ubuntu 20.04。但是,它只检测到 Wi-Fi 适配器,而没有检测到以太网适配器。

以太网适配器应为:Realtek Semiconductor Co., Ltd. RTS5260 PCI Express 读卡器(rev 01)

lspci -v:
Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5260 PCI Express Card Reader (rev 01)
    Subsystem: CLEVO/KAPOK Computer RTS5260 PCI Express Card Reader
    Flags: bus master, fast devsel, latency 0, IRQ 151
    Memory at a2100000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: <access denied>
    Kernel driver in use: rtsx_pci
    Kernel modules: rtsx_pci
lspci -knn | grep Eth -A2; ifconfig
Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. Device [10ec:3000] (rev 06)
    Subsystem: CLEVO/KAPOK Computer Device [1558:7714]
    Kernel modules: r8169
lshw -c network
*-network UNCLAIMED
       description: Ethernet controller
       product: Realtek Semiconductor Co., Ltd.
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:48:00.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list
       configuration: latency=0
       resources: ioport:3000(size=256) memory:a2200000-a220ffff memory:a2210000-a2213fff

uname -r
5.8.0-44-generic

cat: /etc/network/interfaces: No such file or directory

更新 2

我将 r8169 驱动程序添加到黑名单。我在启动过程中向“内核命令”添加了以下参数(请参阅https://wiki.archlinux.org/index.php/Kernel_module#Blacklisting):

module_blacklist=r8169

然后,我使用以下命令手动上传了 r8168:

modprobe r8168

然而,它似乎不起作用:

dmesg

[  288.556472] r8168: module verification failed: signature and/or required key missing - tainting kernel

更新 3

根据@heynnema 的第一个回答,我运行

sudo apt install dkms r8168-dkms

但我收到了这些错误:

ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/r8168-dkms.0.crash'
Error! Bad return status for module build on kernel: 5.8.0-44-generic (x86_64)
Consult /var/lib/dkms/r8168/8.048.00/build/make.log for more information.
dpkg: error processing package r8168-dkms (--configure):
 installed r8168-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
 r8168-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)

make.log文件:

less /var/lib/dkms/r8168/8.048.00/build/make.log

DKMS make.log for r8168-8.048.00 for kernel 5.8.0-44-generic (x86_64)
dom 7 mar 2021, 17:58:28, CET
make: Entering directory '/usr/src/linux-headers-5.8.0-44-generic'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

make: *** [Makefile:746: include/config/auto.conf] Error 1
make: Leaving directory '/usr/src/linux-headers-5.8.0-44-generic'

更新 4

v5.9.16我安装了以下软件包并运行

sudo dpkg -i *.deb
  • Linux 标头-5.9.16-050916_5.9.16-050916.202012211331_all.deb
  • Linux 标头-5.9.16-050916-generic_5.9.16-050916.202012211331_amd64.deb
  • Linux-映像-未签名-5.9.16-050916-generic_5.9.16-050916.202012211331_amd64.deb
  • Linux 模块-5.9.16-050916-generic_5.9.16-050916.202012211331_amd64.deb

但我收到以下错误:

Setting up linux-headers-5.9.16-050916-generic (5.9.16-050916.202012211331) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.9.16-050916-generic

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j20 KERNELRELEASE=5.9.16-050916-generic -C /lib/modules/5.9.16-050916-generic/build M=/var/lib/dkms/r8168/8.048.00/build.....
Signing module:
 - /var/lib/dkms/r8168/8.048.00/5.9.16-050916-generic/x86_64/module/r8168.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

r8168.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.9.16-050916-generic/updates/dkms/

depmod...

Warning: Unable to find an initial ram disk that I know how to handle.
Will not try to make an initrd.

DKMS: install completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j20 KERNELRELEASE=5.9.16-050916-generic KVERSION=5.9.16-050916-generic...(bad exit status: 2)
ERROR (dkms apport): binary package for rts_pstor: 1.11 not found
Error! Bad return status for module build on kernel: 5.9.16-050916-generic (x86_64)
Consult /var/lib/dkms/rts_pstor/1.11/build/make.log for more information.
   ...done.

安装已完成,但是当我尝试启动新内核时,它会打印一些错误而没有完成启动过程(黑屏)。

更新 5

dkms status

r8168, 8.048.00, 5.8.0-44-generic, x86_64: installed
r8168, 8.048.00, 5.8.0-45-generic, x86_64: installed (WARNING! Diff between built and installed module!)
r8168, 8.048.00, 5.9.16-050916-generic, x86_64: installed
rts_pstor, 1.11: added
cat /var/lib/dkms/rts_pstor/1.11/build/make.log 

DKMS make.log for rts_pstor-1.11 for kernel 5.9.16-050916-generic (x86_64)
sab 20 mar 2021, 11:35:44, CET
sed "s/RTSX_MK_TIME/`date +%y.%m.%d.%H.%M`/" timestamp.in > timestamp.h
cp -f ./define.release ./define.h
make -C /lib/modules/5.9.16-050916-generic/build/ SUBDIRS=/var/lib/dkms/rts_pstor/1.11/build modules
make[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
make[1]: Entering directory '/usr/src/linux-headers-5.9.16-050916-generic'
  LEX     scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[3]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make[2]: *** [Makefile:606: syncconfig] Error 2
make[1]: *** [Makefile:711: include/config/auto.conf.cmd] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.9.16-050916-generic'
make: *** [Makefile:39: default] Error 2

更新 6

sudo lshw -C network

  *-network                 
       description: Wireless interface
       product: Wi-Fi 6 AX200
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:47:00.0
       logical name: wlp71s0
       version: 1a
       serial: 5c:80:b6:8f:c3:4d
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwlwifi driverversion=5.8.0-48-generic firmware=55.d9698065.0 cc-a0-55.ucode ip=192.168.178.66 latency=0 link=yes multicast=yes wireless=IEEE 802.11
       resources: irq:16 memory:a2300000-a2303fff
  *-network UNCLAIMED
       description: Ethernet controller
       product: Realtek Semiconductor Co., Ltd.
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:48:00.0
       version: 06
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd cap_list
       configuration: latency=0
       resources: ioport:3000(size=256) memory:a2200000-a220ffff memory:a2210000-a2213fff

答案1

从 /etc/default/grub 中删除module_blacklist=r8169,然后sudo update-grub如果安装了 r8168-dkms 模块,则将 r8169 列入黑名单的正确位置(如果需要)应位于 /etc/modprobe.d/r8168-dkms.conf。但不要立即执行此操作

r8169 内核模块是必须的驱动你的以太网卡...

Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. Device [10ec:3000] (rev 06)

假设您有无线连接,请执行以下操作...

dkms status

如果只出现 r8168-dkms,则执行以下操作...

sudo rm -i /var/crash/r8168-dkms.0.crash

sudo apt purge r8168-dkms dkms

sudo apt install --reinstall linux-headers-5.8.0-44-generic

sudo apt install build-essential dkms r8168-dkms

reboot

更新#1:

对于内核 5.9.16...https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.9.16/。下载 4 个文件,但跳过低延迟文件、安装并报告。

更新 #2:

启动到 5.8.0-45-generic 内核。

sudo apt purge5.9.16-050916-generic 内核...(最容易安装gdebi并使用它来卸载以下 .deb 文件...)

linux-headers-5.9.16-050916_5.9.16-050916.202012211331_all.deb
linux-headers-5.9.16-050916-generic_5.9.16-050916.202012211331_amd64.deb
linux-image-unsigned-5.9.16-050916-generic_5.9.16-050916.202012211331_amd64.deb
linux-modules-5.9.16-050916-generic_5.9.16-050916.202012211331_amd64.deb

sudo dkms remove r8168/8.048.00 --all# 从所有内核中删除 r8168

sudo apt purge r8168-dkms# 删除 r8168 驱动程序

从 /etc/default/grub 中删除module_blacklist=r8169(如果它仍然存在)

sudo update-grub

reboot# 重启计算机

如果需要读卡器...

  • sudo dkms build rts_pstor/1.11#构建读卡器内核模块

  • sudo dkms install rts_pstor/1.11#安装读卡器内核模块

  • dkms status# 确认读卡器模块已安装

否则...

  • sudo dkms remove rts_pstor/1.11 --all

相关内容