I know there is a very similar question: How to fix 'modprobe vboxdrv' error in virtualBox?
If I restart my server I have to do following:
sudo apt update
sudo apt install --reinstall linux-headers-$(uname -r) virtualbox-dkms dkms
sudo modprobe vboxdrv
sudo modprobe vboxnetflt
Without this workaround I can not start my virtual machines on the server. I do not understand why I have to do it again and again and again after each restart of the server.
An easy hack would be, to create a service file inside my systemd which will reinstall it and load both kernel modules. After this service file is finished the virtual machines could be started. But that is not a good solution. I want to avoid that I have to reinstall it each time.
Any solutions? Thanks in advance.
dkms status
virtualbox, 5.1.38, 4.4.0-201-generic, x86_64: installed
uname -r
4.4.0-201-generic
lsb_release -rd
Description: Ubuntu 16.04.7 LTS
Release: 16.04
So each time I restart the server I got:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing
'modprobe vboxdrv'
as root.
So the service of vboxdrv delievers
service vboxdrv status
● virtualbox.service - LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
Active: active (exited) since Do 2021-01-28 14:02:19 CET; 5 days ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0
Memory: 0B
CPU: 0
If i try to setup vboxdrv I got:
sudo /etc/init.d/vboxdrv setup
sudo: /etc/init.d/vboxdrv: command not found
Also I tried:
sudo apt-get install shim-signed
sudo su
openssl req -new -x509 -newkey rsa:2048 -keyout mok.priv -outform DER -out mok.der -nodes -days 36500 -subj "/CN=[name of key]/"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./mok.priv ./mok.der $(modinfo -n vboxdrv)
mokutil --import mok.der
EFI variables are not supported on this system
So how can I solve that problem with EFI/UEFI secure boot on Ubuntu Mate 16.04?
dkms status
anduname -r
please add both to yourquestion. Alsolsb_release -rd
please. – nobody Feb 01 '21 at 17:04sudo dpkg-reconfigure virtualbox-dkms
paste it https://paste.ubuntu.com/ here. so we can see if the build itselfs throw errors. – nobody Feb 02 '21 at 14:38