Page 1 of 1

Error: "kernel modules failed", No They Didn't

Posted: 4. May 2020, 17:42
by chrisretusn
Can't remember when this started to happen, it been a few versions at least.

The VirtualBox drivers are loading successfully. VirtualBox is fully operational on my host. I looks like the problem is in the startup scripts I noted another thread similar to this, since it was specific to Ubuntu, I am started another thread. (Can't post links yet or I would have referenced it.)

Operating System: Slackware64-current with kernel 5.4.38

On boot after installing a new kernel, the following error is received:

Code: Select all

Starting VirtualBox kernel modules ...failed!
  (modprobe vboxpci failed. Please use 'dmesg' to find out why)
Output of 'dmesg | grep vbox'

Code: Select all

[   67.504767] vboxdrv: Found 4 processor cores
[   67.521322] vboxdrv: TSC mode is Invariant, tentative frequency 3214534313 Hz
[   67.521325] vboxdrv: Successfully loaded version 6.1.6 (interface 0x002d0001)
Output of 'cat /var/log/messages | grep vbox'

Code: Select all

May  4 21:35:09 racermach vboxdrv.sh: Stopping VirtualBox services.
May  4 21:35:09 racermach vboxdrv.sh: VirtualBox services stopped.
May  4 21:36:19 racermach vboxdrv.sh: Starting VirtualBox services.
May  4 21:36:19 racermach vboxdrv.sh: Building VirtualBox kernel modules.
May  4 21:36:54 racermach vboxdrv.sh: VirtualBox kernel modules built.
May  4 21:36:54 racermach kernel: [   67.521322] vboxdrv: TSC mode is Invariant, tentative frequency 3214534313 Hz
May  4 21:36:54 racermach vboxdrv.sh: VirtualBox services started.
Output of 'cat /var/log/vbox-setup.log'

Code: Select all

Building the main VirtualBox module.
Building the net filter module.
Building the net adaptor module.
Output of '/etc/rc.d/rc.vboxdrv setup'

Code: Select all

Stopping VirtualBox kernel modules ...done.
Removing old VirtualBox netadp kernel module ...done.
Removing old VirtualBox netflt kernel module ...done.
Removing old VirtualBox kernel module ...done.
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)
Output of 'cat /var/log/vbox-setup.log'

Code: Select all

Building the main VirtualBox module.
Building the net filter module.
Building the net adaptor module.
Output of 'bash VirtualBox-6.1.6-137129-Linux_amd64.run'

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation.............
VirtualBox Version 6.1.6 r137129 (2020-04-09T18:55:07Z) installer
Removing previous installation of VirtualBox 6.1.6 r137129 from /opt/VirtualBox
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...

VirtualBox has been installed successfully.

Re: Error: "kernel modules failed", No They Didn't

Posted: 4. May 2020, 18:17
by Martin
Check where the reference to vboxpci is coming from.
As far as I understand it shouldn't exist anymore with VirtualBox 6.1.x because the experimental PCI passthrough support has been discontinued.

Re: Error: "kernel modules failed", No They Didn't

Posted: 5. May 2020, 05:27
by chrisretusn
There are two startup scripts that contain "vboxpci" The first and the one Slackware uses to start the drivers on boot up "/etc/rc.d/rc.vboxdrv". This script is started by "/etc/rc.d/rc.local". The other script is /etc/init.d vboxdrv' and is not utilized by Slackware and can be eliminated as causing the problem.

There are 12 lines in "/etc/rc.d/rc.vboxdrv" that use "vboxpci", I suspect the problem is somewhere in this script.

Re: Error: "kernel modules failed", No They Didn't

Posted: 16. May 2020, 13:55
by chrisretusn
A follow up since there has been no response since May 5.

It is possible the file vboxdrv.sh is involved in this. On my system it is located in /opt/VirtualBox/. There are 15 lines the contain vboxpci.

There is no reference to vboxdrv.sh in the rc.vboxdrv script.

I forgot to include the first line below in the "On boot after installing a new kernel, the following error is received:" in my original post.

Code: Select all

vboxdrv.sh: Starting VirtualBox services.

Starting VirtualBox kernel modules ...failed!
  (modprobe vboxpci failed. Please luse 'dmesg' to find out why)
As a side note, after reboot and logging in as root, issuing '/etc/rc.d/rc.vboxdrv status' results in the following:

Code: Select all

VirtualBox kernel modules (vboxdrv, vboxnetflt, vboxnetadp) are loaded.
Which indicates the kernel modules did not fail.

Re: Error: "kernel modules failed", No They Didn't

Posted: 13. Jun 2020, 17:37
by chrisretusn
Problem solved.

In short, I've been using VirtualBox for a long time. Prior to version 5.0.0 for operating systems like Slackware, the init scripts were placed in /etc/rc.d/ (rc.vboxautostart-service, rc.vboxballoonctrl-service, rc.vboxdrv, rc.vboxweb-service) and the /etc/rc.d/rc.local was modified to run these scripts.

Beginning with version 5.0.0 the init scripts were moved from /etc/rc.d/ to /etc/init.d/ (vboxautostart-service, vboxballoonctrl-service, vboxdrv, vboxweb-service). There is no mention of this change in the 5.0.0 Changelog.

When I upgraded from 4.3.40 to 5.0.0 those init scripts in /etc/rc.d/ remained in place. What was effectively taking place was the scripts in /etc/init.d were being executed followed by the same scripts /etc/rc.d/ being executed from /etc/rc.d/rc.local. As time progressed changes were being made to the init scripts in /etc/init.d/ but not to the scripts in /etc/rc.d/. This issue went unnoticed until after upgrading to version 6.1.0 (PCI passthrough was dropped, ref: 6.1.0 Changelog). That my theory on why I was getting this "(modprobe vboxpci failed. Please use 'dmesg' to find out why)" error message.

My solution was to remove the those init scripts from /etc/rc.d/ since they are no longer updated. The error message has gone away. In Slackware /etc/init.d/ is not used; however, it is fully supported.

As a side note. As of version 6.1.10, there are 15 lines in /etc/init.d/vboxdrv that match vboxpci.