dkms fails under kernel 5.11

Discussions related to using VirtualBox on Linux hosts.

dkms fails under kernel 5.11

Postby brainchild » 24. Jun 2021, 13:03

Since upgrading my Linux Mint system to kernel 5.11, I am unable to start any virtual machines.

The following messages appears in a popup window:

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.

If your system has EFI Secure Boot enabled you may also 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.

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


The advise given is not helpful, as shown by the following:

Code: Select all   Expand viewCollapse view
$ sudo modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.11.0-22-generic


Finally, after removing the DKMS drivers, and attempting to reinstall them using the package manager, the results are not encouraging, as seen in the following:

Code: Select all   Expand viewCollapse view
Setting up virtualbox-dkms (6.1.16-dfsg-6~ubuntu1.20.04.2) ...
Loading new virtualbox-6.1.16 DKMS files...
Building for 5.11.0-22-generic
Building initial module for 5.11.0-22-generic
ERROR (dkms apport): kernel package linux-headers-5.11.0-22-generic is not supported
Error! Bad return status for module build on kernel: 5.11.0-22-generic (x86_64)
Consult /var/lib/dkms/virtualbox/6.1.16/build/make.log for more information.
dpkg: error processing package virtualbox-dkms (--configure):
 installed virtualbox-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
 virtualbox-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)


Please advise. By design, DKMS drives should apply seamlessly to new kernels. I am not finding others having the same issue, making the matter even more mysterious.
brainchild
 
Posts: 24
Joined: 31. May 2021, 02:09

Re: dkms fails under kernel 5.11

Postby fth0 » 24. Jun 2021, 13:30

As you can see in Chapter 15. Change Log, Linux kernels 5.11 and 5.12 are only supported by VirtualBox 6.1.20 and newer. I'd suggest to uninstall the Ubuntu provided VirtualBox version and to install the current one provided by Oracle.
fth0
Volunteer
 
Posts: 2153
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...

Re: dkms fails under kernel 5.11

Postby scottgus1 » 24. Jun 2021, 14:33

Just in case you're wondering how on earth 'fth0' knows you're running the Ubuntu fork version of Virtualbox:
fth0 wrote:I'd suggest to uninstall the Ubuntu provided VirtualBox version and to install the current one provided by Oracle.


It's because he's really good...

Also because official Virtualbox from http://www.virtualbox.org/wiki/Downloads does not use dkms.
scottgus1
Site Moderator
 
Posts: 12443
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: dkms fails under kernel 5.11

Postby brainchild » 24. Jun 2021, 14:46

I followed the advice and successfully gained a working installation of VirtualBox. Since I pulled a Debian package file manually, I would have to do the same again manually for each upgrade. Is a Debian repository or Ubuntu PPA available to automate upgrades of packages from this line?

Needless to say, it's inconvenient that Oracle and Ubuntu provide two different styles of packaging for the same application.

(It's also inconvenient that Ubuntu pushed a new kernel before pushing the release of VirtualBox needed to run under it.)
brainchild
 
Posts: 24
Joined: 31. May 2021, 02:09

Re: dkms fails under kernel 5.11

Postby scottgus1 » 24. Jun 2021, 14:56

brainchild wrote:Is a Debian repository or Ubuntu PPA available to automate upgrades of packages from this line?

There is some repository info on https://www.virtualbox.org/wiki/Linux_Downloads for official Virtualbox.

brainchild wrote:it's inconvenient that Oracle and Ubuntu provide two different styles of packaging for the same application.

Tell us about it. You'd need to spend some time reading the forum to see how many Linux host users have come here for help with their forks of Virtualbox and have to be told that we only support the official Virtualbox, not the forks. Get folks to stop forking, and the inconvenience will drop off.

brainchild wrote:the same application

They're not. Forks are different apps than the original, even if they run and look the same on the surface, with different maintainers who can do different things with their forks as they desire.
scottgus1
Site Moderator
 
Posts: 12443
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: dkms fails under kernel 5.11

Postby brainchild » 24. Jun 2021, 15:02

Does Ubuntu patch the source files, or just create a package following a design different from the one from Oracle?
brainchild
 
Posts: 24
Joined: 31. May 2021, 02:09

Re: dkms fails under kernel 5.11

Postby scottgus1 » 24. Jun 2021, 15:10

Good question, regrettably I don't know. Their fork uses dkms, official does not, so it can't just be a repackaging of official code. That added '_ubuntu' in the version number requires a source code change, too.
scottgus1
Site Moderator
 
Posts: 12443
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: dkms fails under kernel 5.11

Postby brainchild » 24. Jun 2021, 15:12

In the official repository, the package name is tied to the version number, so obtaining upgrades of major releases still depends on a manual operation. It would be helpful if the package names omitted any version number, and left management of version numbers to the package manager itself. This constraint allows upgrades to be fully automated by the package manager, while the user simply selects which packages overall to include in the system.
brainchild
 
Posts: 24
Joined: 31. May 2021, 02:09

Re: dkms fails under kernel 5.11

Postby scottgus1 » 24. Jun 2021, 15:28

You can post that as an enhancement on the Bugtracker if you want. We wouldn't have any way to change that here.
scottgus1
Site Moderator
 
Posts: 12443
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: dkms fails under kernel 5.11

Postby fth0 » 24. Jun 2021, 20:43

brainchild wrote:In the official repository, the package name is tied to the version number, so obtaining upgrades of major releases still depends on a manual operation.

Note that the same (implicitly) holds true for the Ubuntu provided version, since they probably won't switch between major versions of a software inside one Ubuntu distribution version.

brainchild wrote:It would be helpful if the package names omitted any version number, and left management of version numbers to the package manager itself. This constraint allows upgrades to be fully automated by the package manager, while the user simply selects which packages overall to include in the system.

This could bring a danger (or at least a nuisance): VirtualBox often changes the format of the .vbox files between major versions (e.g. 6.0 -> 6.1), and if you try out a newer VirtualBox version with an existing VM and then want to go back ...
fth0
Volunteer
 
Posts: 2153
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: No registered users and 13 guests