作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。
我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为 on-topic对于堆栈溢出。
11 个月前关闭。
社区在 5 个月前审查了是否重新打开此问题并将其关闭:
原始关闭原因未解决
Improve this question
我最近开始使用 Centos 8,我安装了 VirtualBox 来管理我的虚拟机,
我遇到的问题是我的 VirtualBox 无法启动任何虚拟机,它告诉我执行此脚本 /sbin/vboxconfig
作为 root,当我运行此脚本时,会出现以下消息:
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
vboxdrv vboxnetflt vboxnetadp vboxpci
See the documenatation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
There were problems setting up VirtualBox. To re-start the set-up process, run
/sbin/vboxconfig
as root. If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.
请注意,我的安全启动已启用。
最佳答案
经过一番研究,我找到了解决方案。
解决方案 1:禁用安全启动。
解决方案 2:
1- 安装 mokutil
包裹
sudo dnf update
sudo dnf install mokutil
2- 在新文件夹下创建 RSA key 。
sudo -i
mkdir /root/signed-modules
cd /root/signed-modules
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"
chmod 600 MOK.priv
3-此命令将要求您添加密码,下次重新启动后您需要此密码。
sudo mokutil --import MOK.der
4- 重新启动系统并出现蓝屏,选择 Enroll MOK --> Continue --> 输入以前的密码,您的系统将启动。
cd /root/signed-modules
vi sign-virtual-box
将以下 cmd 添加到此脚本中:
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do
echo "Signing $modfile"
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \
/root/signed-modules/MOK.priv \
/root/signed-modules/MOK.der "$modfile"
done
如果上述失败并相应地编辑脚本,请使用以下内容查找符号文件。
find /usr/src -name sign-file
5-添加执行权限并运行脚本
chmod 700 sign-virtual-box
./sign-virtual-box
6- 启动 VirtualBOX
modprobe vboxdrv
有关更多信息,请参阅此链接(适用于 ubuntu 用户)
关于linux - 签署虚拟盒模块(vboxdrv、vboxnetflt、vboxnetadp、vboxpci)Centos 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61248315/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许在 Stack Overflow 上提出有关通用计算硬件和软件的问题。您可以编辑问题,使其成为
我是一名优秀的程序员,十分优秀!