所有内核升级均挂在 update-secureboot-policy --enroll-key 上

TiZ*_*TiZ 5 apt dpkg kernel dkms secure-boot

我在我当前的笔记本电脑以及我想要出售的旧笔记本电脑上运行 Xubuntu 18.04。我最近把它安装在后者上;它完全干净,没有 PPA 或额外的内核。

\n\n

两个系统都是 Nvidia Optimus 笔记本电脑,并且都以 UEFI 模式安装。我当前的笔记本电脑已关闭安全启动。我还没有对旧的做过类似的事情。我已经在我的主笔记本电脑上通过图形驱动程序 PPA 安装了 nvidia 396,并在旧笔记本电脑上使用了官方存储库中的 nvidia 390。我的主笔记本电脑有 xanmod 内核和普通内核。旧笔记本电脑只有原厂内核。

\n\n

两个系统在尝试升级内核时都会遇到 dpkg 完全挂起的情况。系统本身不会挂起,但升级会卡住。一些终端侦查表明了这一点:

\n\n
TiZLappy:~$ pgrep dpkg\n2499\nTiZLappy:~$ pstree -l 2499\ndpkg\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80linux-image-4.1\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80run-parts\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80dkms_autoinstal\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80dkms\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80dkms\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80frontend\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80update-securebo\n                                                                              \xe2\x94\x94\xe2\x94\x80whiptail\nTiZLappy:~$ ps aux | grep securebo\nroot      5146  0.0  0.1 111876 22928 pts/1    S+   23:57   0:00 /usr/bin/perl -w /usr/share/debconf/frontend /usr/sbin/update-secureboot-policy --enroll-key\nroot      5160  0.0  0.0   4628  1844 pts/1    S+   23:57   0:00 /bin/sh /usr/sbin/update-secureboot-policy --enroll-key\ntiz      10409  0.0  0.0  22004  1028 pts/2    S+   23:59   0:00 grep --color=auto securebo\nTiZLappy:~$ ps aux | grep whiptail\nroot      5175  0.0  0.0  32356  4252 pts/1    S+   Jul03   0:00 whiptail --backtitle Package configuration --title Configuring Secure Boot --output-fd 12 --nocancel --msgbox Your system has UEFI Secure Boot enabled.  UEFI Secure Boot requires additional configuration to work with third-party  drivers.  The system will assist you in configuring UEFI Secure Boot. To permit the use  of third-party drivers, a new Machine-Owner Key (MOK) has been generated. This  key now needs to be enrolled in your system\'s firmware.  To ensure that this change is being made by you as an authorized user, and not  by an attacker, you must choose a password now and then confirm the change  after reboot using the same password, in both the "Enroll MOK" and "Change  Secure Boot state" menus that will be presented to you when this system  reboots.  If you proceed but do not confirm the password upon reboot, Ubuntu will still  be able to boot on your system but any hardware that requires third-party  drivers to work correctly may not be usable. --scrolltext 21 84\ntiz      30605  0.0  0.0  22004  1040 pts/2    S+   00:07   0:00 grep --color=auto whiptail\n
Run Code Online (Sandbox Code Playgroud)\n\n

因此 update-secureboot-policy 脚本直接被冻结,并且阻碍了整个升级。我不知道鞭尾是否应该呈现某种对话框或有用的交互,但事实并非如此;既不在 apt 上,也不在dpkg --configure -a.

\n\n

终止这些卡住的进程不允许 apt 继续升级过程。

\n\n

这种行为在我的带有 xanmod 和图形驱动程序 PPA 的主笔记本电脑上以及在我的带有所有库存的旧笔记本电脑上都是相同的,因此不能将此归咎于额外的软件包。

\n

小智 2

使用 ps 你可以看到鞭尾在问你什么。问题是:它的输出被重定向到/dev/null。某些“higherup”脚本不希望破坏它正在调用的下标之一,并将输出重定向到 devnull。但是当您有 secureboot 时, update-secureboot-policy 输出就变得非常重要。

在文件 /usr/lib/dkms/common.postinst 中,您会发现在重定向到 /dev/null 之前有大约 30 行。删除重定向。

在我的系统上,升级的非正常停止已经破坏了系统,它将不再尝试安装密钥。我希望你的情况不是这样......