If your computer uses SecureBoot, you may occasionally encounter this problem after upgrading the operating system. Thankfully, the solution is simple after some initial setup the first time.
The error generally reads something like: Could not load ‘modprobe vboxdrv’
First time:
- Create signing keys:
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=Descriptive name/"
- Sign the module (vboxdrv for this example):
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
- Register the keys to Secure Boot:
sudo mokutil --import MOK.der
- Supply a password for later use after reboot
- Reboot and follow instructions to Enroll MOK (Machine Owner Key).
- Restart after enrolling
- After the reboot, you may also need to load the module:
sudo modprobe vboxdrv
After future updates you might re-encounter the problem, then you just need:
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
sudo modprobe vboxdrv
REFERENCES: