In this blog, we are going the solve the Error: modprobe: ERROR: could not insert ‘vboxdrv’: Operation not permitted. This error comes when we run the command sudo modprobe vboxdrv
.
Also Read: How to convert PNG to JPG on Ubuntu Via Command Line
The issue is that the vboxdrv module is not signed and therefore does not load with the kernel. This will occur if your computer has the SecureBoot mode enabled, which is quite common on current equipment. Follow the below step to Solve modprobe: ERROR: could not insert 'vboxdrv': Operation not permitted
.
Steps to Solve modprobe: ERROR: could not insert ‘vboxdrv’: Operation not permitted:
1. Install the mokutil
package to be able to do signed. So Open the Terminal and first update and upgrade your system.
sudo apt-get update sudo apt-get upgrade
Now install the mokutil
package by using the command given below.
sudo apt-get install mokutil
Also Read: How to Install and Use WifiPumpkin3 in Kali Linux 2021
2. Generate the signature file by using the command:
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"
3. Then add it to the kernel:
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv)
Also Read: Command Line Browser on Ubuntu 2021
4. Register it for the Secure Boot.
IMPORTANT! That will ask you for a password. Put the one you want. Then, you will only have to use it once in the next reboot.
sudo mokutil --import MOK.der
5. Finally, restart the computer. A blue screen will appear with a keyboard wait, press the key that asks you to interrupt the boot.
Also Read: How to Change Application Icon in Ubuntu 2021
When you are inside the blue screen, select
Enroll MOK > Continue > Yes
Also Read: libc6-dev : Breaks : libgcc-9-dev (< 9.3.0.5~) but 9.2.1-19 is to be installed
And it will ask you for the password that you have previously entered, you will enter it and you will be informed that the operation has been completed successfully.
Now your operating system will start and your Error (modprobe: ERROR: could not insert ‘vboxdrv’: Operation not permitted) will be solved. I tested this in Ubuntu, Kubuntu and Debian. Hope this help someone.
Also Read: How to Install Sticky Notes Indicator on Ubuntu 2021