Page 1 of 1

[SOLVED] modprobe vboxdrv gives Required key not available

PostPosted: 23. Jan 2020, 02:53
by Ecoron
Hi,

I've installed Virtualbox on a pretty new install of Ubuntu bionic (18.04) and downloaded a VDI image from osboxes. I loaded it in VirtualBox but when I want to start it I get the following dialogue:
Code: Select all   Expand viewCollapse view
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'

but when I try to do the modprobe in the shell I get:
Code: Select all   Expand viewCollapse view
# modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Required key not available

What am I missing? I've already tried purge & reinstall virtualbox-dkms but that didn't help either but I got a message like:
Code: Select all   Expand viewCollapse view
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤ Configuring Secure Boot ├────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │                                                                                                                                                                                                                                                                          │
 │ Your system has UEFI Secure Boot enabled.                                                                                                                                                                                                                                │
 │                                                                                                                                                                                                                                                                          │
 │ UEFI Secure Boot requires additional configuration to work with third-party drivers.                                                                                                                                                                                     │
 │                                                                                                                                                                                                                                                                          │
 │ The system will assist you in configuring UEFI Secure Boot. To permit the use of third-party drivers, a new Machine-Owner Key (MOK) has been generated. This key now needs to be enrolled in your system's firmware.                                                     │
 │                                                                                                                                                                                                                                                                          │
 │ To ensure that this change is being made by you as an authorized user, and not by an attacker, you must choose a password now and then confirm the change after reboot using the same password, in both the "Enroll MOK" and "Change Secure Boot state" menus that will  │
 │ be presented to you when this system reboots.                                                                                                                                                                                                                            │
 │                                                                                                                                                                                                                                                                          │
 │ If you proceed but do not confirm the password upon reboot, Ubuntu will still be able to boot on your system but any hardware that requires third-party drivers to work correctly may not be usable.                                                                     │
 │                                                                                                                                                                                                                                                                          │
 │                                                                                                                                  <Ok>                                                                                                                                    │
 │                                                                                                                                                                                                                                                                          │
 └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

when I re-installed the package. I entered a password on the next dialogue and the rebooted.
Upon reboot, it brought me to a blue dialogue that let me Enroll in MOK upon which I entered that same password again, it then let me select reboot which brought my system back up but my Virtual Box still shows the above dialogue when I try to start the VM.

Re: modprobe vboxdrv gives Required key not available

PostPosted: 23. Jan 2020, 04:42
by scottgus1
I seem to recall the Linux gurus saying that official Virtualbox does not use dkms. This might mean you are using your distro's fork, which we don't support. Download and install from http://www.virtualbox.org, then we can help.

Re: modprobe vboxdrv gives Required key not available

PostPosted: 23. Jan 2020, 19:59
by Ecoron
scottgus1 wrote:I seem to recall the Linux gurus saying that official Virtualbox does not use dkms. This might mean you are using your distro's fork, which we don't support. Download and install from virtualbox_org, then we can help.


HI scottgus1,

Thanks for the response, I removed all Ubuntu packages with sudo apt remove virtualbox* and downloaded the bionic version from virtualbox_org.
I then moved on with installation and got the same result:
Code: Select all   Expand viewCollapse view
$ sudo dpkg -i ~/Downloads/virtualbox-6.0_6.0.16-135674_Ubuntu_bionic_amd64.deb
[sudo] password for ron:
(Reading database ... 295254 files and directories currently installed.)
Preparing to unpack .../virtualbox-6.0_6.0.16-135674_Ubuntu_bionic_amd64.deb ...
Unpacking virtualbox-6.0 (6.0.16-135674~Ubuntu~bionic) over (6.0.16-135674~Ubuntu~bionic) ...
Setting up virtualbox-6.0 (6.0.16-135674~Ubuntu~bionic) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
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.
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for systemd (237-3ubuntu10.33) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.9-2) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
$ sudo -s
# modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Required key not available

Re: modprobe vboxdrv gives Required key not available

PostPosted: 23. Jan 2020, 20:04
by scottgus1
OK, at least you're running something the Linux gurus can support, that's good. I'm not a Linux guru by any stretch of the imagination, so hopefully someone who knows how to fix this will come along.

Re: modprobe vboxdrv gives Required key not available

PostPosted: 23. Jan 2020, 22:23
by fth0
Ecoron wrote:
Code: Select all   Expand viewCollapse view
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.

Since you are using UEFI Secure Boot and have already enrolled the Machine Owner Key (MOK), this part of the console output tells you what to do. Search for Secure Boot signing kernel modules. You'll have to sign the mentioned VirtualBox kernel modules each time you update your Linux kernel or your VirtualBox installation. Alternatively, you can disable Secure Boot.

Re: modprobe vboxdrv gives Required key not available

PostPosted: 29. Jan 2020, 23:19
by Ecoron
fth0 wrote:
Ecoron wrote:
Code: Select all   Expand viewCollapse view
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.

Since you are using UEFI Secure Boot and have already enrolled the Machine Owner Key (MOK), this part of the console output tells you what to do. Search for Secure Boot signing kernel modules. You'll have to sign the mentioned VirtualBox kernel modules each time you update your Linux kernel or your VirtualBox installation. Alternatively, you can disable Secure Boot.


I did disable secure boot in the BIOS and it lett m,e bring up my VMs as expected!