每当我运行时sudo apt install
它都会说:
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
但是当我运行时sudo dpkg --configure -a
它说:
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.
我安装 Virtualbox 后它就开始这样了
我该如何修复它?
答案1
MOK经理
sudo mokutil --disable-validation
Root password:
Password:12345678
Password:12345678
sudo reboot
您将在 MOK 管理器中启动 = 蓝屏。
- 禁用安全启动时,需要回答的问题为“是”。显示的数字是密码字符:7 是密码的第 7 个字符,保留 12345678 更安全。确保启用了数字锁定键盘并输入数字。
- 注册密钥/按回车键:EFI/ubuntu/grubx64/OK/Redo for/BOOT/bootx64.efi/OK
- 注册哈希/按回车键:EFI/ubuntu/grubx64.efi/OK/Redo for/BOOT/bootx64.efi/OK
- 重启
启动时,你会看到一条消息说以不安全模式启动。启动时安全启动将被暂时禁用。
mokutil --sb-state
当我们编译启用了安全启动的自定义内核时,也会出现同样的问题。我们只需在 MOK 中禁用安全启动即可。无需注册密钥和哈希。
mokutil --sb-state
SecureBoot enabled
uname -a
Linux mm 5.0.0-050000rc8-generic #201902242030 SMP Mon Feb 25 01:32:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
在内核 5.0-rc8 上测试
如果 2 和 3 不起作用,请在 MOK 中选择安全启动并使用相同的密码禁用它。在 MOK 中,在启动时禁用安全启动更好,并且适用于所有发行版。