Kernel driver not installed (rc=-1908) partially SOLVED

Discussions about using Linux guests in VirtualBox.
Post Reply
IKM
Posts: 3
Joined: 10. Mar 2018, 08:29

Kernel driver not installed (rc=-1908) partially SOLVED

Post by IKM »

Bonjour,

My system is a brand new one install. I did for a friend of mine : the OS is just intalled : Ubuntu 16.04
I did install the last virtualbox-5.2_5.2.8-121009~Ubuntu~xenial_amd64.deb
Computer is HP-ProBook-450-G3
I authorised the virtualisation inside the BIOS

When I want to start a virtual machine such as Win XP (the virtual computer is empty because XP is not yet installed) I have this message :
Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/sbin/vboxconfig'

as root.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

The virtual machine 'XP' has terminated unexpectedly during startup with exit code 1 (0x1).
Code d'erreur :
NS_ERROR_FAILURE (0x80004005)
Composant :
MachineWrap
Interface :
IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}
Please can you help me ? I do not understand what I have to do. I went on many forum but I still didn't find any solution.
I do have the exact virtual machine in my computer, it is an ASUS one and it works good. I am using virtualbox for more then 8 years and never met this issue before.


I read a post here in this forum and did the following below without solving anything :
To resolve the above issue only need to following the instructions gave by @matpen.

$ sudo apt-get install ppa-purge
$ sudo ppa-purge ppa:ubuntu-toolchain-r/test
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609

Then after removing and reinstalling the 4.4.0-116 kernel, modprobe gave us right answer.

$ sudo apt-get purge linux-headers-4.4.0-116 linux-headers-4.4.0-116-generic linux-image-4.4.0-116-generic linux-image-extra-4.4.0-116-generic linux-signed-image-4.4.0-116-generic
$ sudo apt-get install linux-generic linux-signed-generic

A reboot system running and check the vergmacic:

$ modinfo vboxdrv | grep vermagic
vermagic: 4.4.0-116-generic SMP mod_unload modversions retpoline
IKM
Posts: 3
Joined: 10. Mar 2018, 08:29

Re: Kernel driver not installed (rc=-1908) partially SOLVED

Post by IKM »

Good afternoon,

Just to informed all of you that I find a solution by reading this topic :
Steps to make it work, specifically for Ubuntu/Debian

Install the virtualbox package. If the installation detects that Secure Boot is enabled, you will be presented with the issue at hand and given the option to disable Secure Boot. Choose “No”.
Create a personal public/private RSA key pair which will be used to sign kernel modules. I chose to use the root account and the directory /root/module-signing/ to store all things related to signing kernel modules.

$ sudo -i
# mkdir /root/module-signing
# cd /root/module-signing
# openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=YOUR_NAME/"
[...]
# chmod 600 MOK.priv

Use the MOK (“Machine Owner Key”) utility to import the public key so that it can be trusted by the system. This is a two step process where the key is first imported, and then later must be enrolled when the machine is booted the next time. A simple password is good enough, as it is only for temporary use.

# mokutil --import /root/module-signing/MOK.der
input password:
input password again:

Reboot the machine. When the bootloader starts, the MOK manager EFI utility should automatically start. It will ask for parts of the password supplied in step 3. Choose to “Enroll MOK”, then you should see the key imported in step 3. Complete the enrollment steps, then continue with the boot. The Linux kernel will log the keys that are loaded, and you should be able to see your own key with the command: dmesg|grep 'EFI: Loaded cert'
Using a signing utility shippped with the kernel build files, sign all the VirtualBox modules using the private MOK key generated in step 2. I put this in a small script /root/module-signing/sign-vbox-modules, so it can be easily run when new kernels are installed as part of regular updates:

#!/bin/bash

for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do
echo "Signing $modfile"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 \
/root/module-signing/MOK.priv \
/root/module-signing/MOK.der "$modfile"
done

# chmod 700 /root/module-signing/sign-vbox-modules

Run the script from step 5 as root. You will need to run the signing script every time a new kernel update is installed, since this will cause a rebuild of the third party VirtualBox modules. Use the script only after the new kernel has been booted, since it relies on modinfo -n and uname -r to tell which kernel version to sign for.
Load vboxdrv module and fire up VirtualBox:

# modprobe vboxdrv

The procedure can also be used to sign other third party kernel modules, like the nvidia graphics drivers, if so is required. (I have not tested that myself.)
Please if you have, anytime, another 'normal' solution to provide to me do not hesitate to alert me.

Thank you very much
Last edited by IKM on 10. Mar 2018, 17:23, edited 1 time in total.
Martin
Volunteer
Posts: 2561
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: Kernel driver not installed (rc=-1908) partially SOLVED

Post by Martin »

In many cases a "normal" solution would be to just disable Secure Boot in BIOS/UEFI. ;)
IKM
Posts: 3
Joined: 10. Mar 2018, 08:29

Re: Kernel driver not installed (rc=-1908) partially SOLVED

Post by IKM »

Martin wrote:In many cases a "normal" solution would be to just disable Secure Boot in BIOS/UEFI. ;)
Ok, maybe in many cases. But it wasn't on this machine.
I found a lot of forum where they are saying the same thing, but it did not work on the HP-ProBook-450-G3.
Post Reply