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: 25
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: 2609
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: 13765
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: 25
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: 13765
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: 25
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: 13765
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: 25
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: 13765
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: 2609
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 WhatHaveYou » 28. Oct 2021, 07:20

I do not mean to shoot the messenger or so to speak to shoot those who try to clean up after the event, but . .

Has this VirtualBox kernel/packaging situation been in one of Lunduke's 'Linux Sucks' videos? It should have been. That is so especially given all the additional fun that one has with the 'extension pack' (and indeed, on my system, error messages from VirtualBox - and even the version number - being displayed in an unreadable colour). It is all a terrible, greatly off-putting mess.
WhatHaveYou
 
Posts: 71
Joined: 25. Oct 2018, 04:13

Re: dkms fails under kernel 5.11

Postby brainchild » 28. Oct 2021, 08:57

fth0 wrote: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.


It is not quite the same, the way I think about it, but rather the difference between later versus never. It is quite a big difference in fact.

fth0 wrote: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 ...


I feel the limitation you describe does not bear on my suggestion. Either users would receive automatic upgrades across major versions of the application through their distribution's package manager, or users would only receive automatic upgrades with in a major release sequence.

In the prior case, many users, indeed probably most, will never receive the upgrades. In the latter case, there would be some hassle, which is currently imposed on the user, to account for the changes in file format, though which ideally would be handled gracefully by the application (for example, by having the capability to write file changes within the existing older format, unless the user agrees through a prompt to upgrade the format of the particular file).
brainchild
 
Posts: 25
Joined: 31. May 2021, 02:09


Return to VirtualBox on Linux Hosts

Who is online

Users browsing this forum: Majestic-12 [Bot] and 22 guests