After nvidia blob update, vboxdrv not found error

openSUSE 13.2 KDE4, VBox 5.1.6 from (now defunct) http://download.opensuse.org/repositories/Virtualization/openSUSE_13.2/ repo.
Nvidia blob updated from G03 to G04, see https://forums.opensuse.org/showthread.php/526246-NVIDIA-kernel-module-not-initialized-with-latest-kernel-on-leap-42-3?p=2835617#post2835617

As part of the G04 “solution” I deleted all intermediary module folders, keeping only the first and last:

/lib/modules # ls
3.16.6-2-desktop
3.16.7-53-desktop

Now when starting a VM I get the error dialog:

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.

/sbin/vboxconfig does not exist. It appear to have been substituted by /sbin/rcvboxdrv. Some googling led to messages of missing vboxdrv module:

/etc/rc.d # ./vboxdrv setup
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

/etc/rc.d # ./vboxdrv force-reload
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

/etc/rc.d is a link to /etc/init.d. dmesg says absolutely nothing about this - maybe it’s in a systemd log?

Searching for vboxdrv results in:

/lib/modules/3.16.7-53-desktop/weak-updates/misc # ls -al
total 8
drwxr-xr-x 2 root root 4096 Dez 20  2016 .
drwxr-xr-x 4 root root 4096 Dez 20  2016 ..
lrwxrwxrwx 1 root root   46 Dez 20  2016 vboxdrv.ko -> /lib/modules/3.16.7-42-desktop/misc/vboxdrv.ko
lrwxrwxrwx 1 root root   49 Dez 20  2016 vboxnetadp.ko -> /lib/modules/3.16.7-42-desktop/misc/vboxnetadp.ko
lrwxrwxrwx 1 root root   49 Dez 20  2016 vboxnetflt.ko -> /lib/modules/3.16.7-42-desktop/misc/vboxnetflt.ko
lrwxrwxrwx 1 root root   46 Dez 20  2016 vboxpci.ko -> /lib/modules/3.16.7-42-desktop/misc/vboxpci.ko

The files above only appear in the weak-updates …/folder, not the …/misc folder. This only has:

/lib/modules/3.16.7-53-desktop/misc # ls -lsh
total 4,1M
1,8M -rw-r--r-- 1 root root 1,8M Dez 21  2016 vmmon.ko
2,4M -rw-r--r-- 1 root root 2,4M Dez 21  2016 vmnet.ko

/lib/modules/3.16.7.42-desktop was one of the deleted intermediary folders, so all *.ko links where orphaned (0 size). Restoring it from root’s trash gives:

/lib/modules # ls
3.16.6-2-desktop
3.16.7-42-desktop
3.16.7-53-desktop

and

/lib/modules/3.16.7-42-desktop/misc # ls -lsh
total 4,8M
608K -rw-r--r-- 1 root root 608K Set 16  2016 vboxdrv.ko
 20K -rw-r--r-- 1 root root  18K Set 16  2016 vboxnetadp.ko
 48K -rw-r--r-- 1 root root  45K Set 16  2016 vboxnetflt.ko
 44K -rw-r--r-- 1 root root  41K Set 16  2016 vboxpci.ko
1,8M -rw-r--r-- 1 root root 1,8M Ago 30  2016 vmmon.ko
2,4M -rw-r--r-- 1 root root 2,4M Ago 30  2016 vmnet.ko

Note that the restored intermediary folder also has older (but exactly the same byte size) vmmon.ko and vmnet.ko not linked in …/3.16.7-53-desktop/weak-updates/misc.

However, after restoring /lib/modules/3.16.7-42-desktop and rebooting, the same error occurs, be it at VM start or running vboxdrv setup or vboxdrv force-reload.

Lastly:

/etc/rc.d # modprobe -a vboxdrv.ko
modprobe: WARNING: Module vboxdrv.ko not found.

Perhaps because the modules should be somewhere else besides the …/weak-updates directory, like …/3.16.7-53-desktop/misc?

Any ideas?

Thanks,

And the devel files for the running kernel ??

rpm -qa | grep kernel | grep devel

I think that’s OK. They were necessary to compile a bunch of other stuff the last couple of years.

~> rpm -qa | grep kernel | grep devel
kernel-devel-3.16.7-53.1.noarch
kernel-desktop-devel-3.16.7-53.1.x86_64

I’ve seen a package for oS 13.2 in obs called modulo-virtualbox to “Create menu command for Recompile Virtualbox module to be used in case of malfunctions without having to start the terminal procedure is especially useful for those who hate to use the terminal… :wink:

Anyone tried it?

It just so happens that I have virtualbox-5.1.6 source rpm here (essentially the same that was in the Virtualization repo) that you could rpmbuild to produce the suitable kernel modules again.

I would do this in OBS but you can’t add 13.2 repos anymore.

More info:

 # systemctl status vboxdrv
vboxdrv.service - LSB: VirtualBox Linux module
   Loaded: loaded (/etc/init.d/vboxdrv)
   Active: failed (Result: exit-code) since Ter 2017-08-29 13:25:33 BRT; 1h 41min ago
  Process: 1630 ExecStart=/etc/init.d/vboxdrv start (code=exited, status=1/FAILURE)

Ago 29 13:25:33 bruno-03 systemd[1]: Starting LSB: VirtualBox Linux module...
Ago 29 13:25:33 bruno-03 vboxdrv[1630]: vboxdrv.sh: Starting VirtualBox services.
Ago 29 13:25:33 bruno-03 vboxdrv[1630]: vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
Ago 29 13:25:33 bruno-03 systemd[1]: vboxdrv.service: control process exited, code=exited status=1
Ago 29 13:25:33 bruno-03 systemd[1]: Failed to start LSB: VirtualBox Linux module.
Ago 29 13:25:33 bruno-03 systemd[1]: Unit vboxdrv.service entered failed state.
# systemctl start vboxdrv
Job for vboxdrv.service failed. See "systemctl status vboxdrv.service" and "journalctl -xn" for details.

# journalctl -xn
-- Logs begin at Ter 2017-08-29 13:25:27 BRT, end at Ter 2017-08-29 15:07:21 BRT. --
Ago 29 15:07:16 bruno-03 vboxdrv[4708]: vboxdrv.sh: Starting VirtualBox services.
Ago 29 15:07:16 bruno-03 vboxdrv.sh[4713]: Starting VirtualBox services.
Ago 29 15:07:16 bruno-03 vboxdrv.sh[4718]: Recompiling VirtualBox kernel module, NOT. It has been packaged..
Ago 29 15:07:16 bruno-03 vboxdrv.sh[4719]: .
Ago 29 15:07:16 bruno-03 vboxdrv[4708]: vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
Ago 29 15:07:16 bruno-03 vboxdrv.sh[4721]: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.
Ago 29 15:07:16 bruno-03 systemd[1]: vboxdrv.service: control process exited, code=exited status=1
Ago 29 15:07:16 bruno-03 systemd[1]: Failed to start LSB: VirtualBox Linux module.
-- Subject: Unit vboxdrv.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo /systemd-devel                                                                                                                                            
--                                                                                                                                                                                                                 
-- Unit vboxdrv.service has failed. --                                                                                                                                                                                                                 
-- The result is failed.                                                                                                                                                                              
Ago 29 15:07:16 bruno-03 systemd[1]: Unit vboxdrv.service entered failed state.

I’ve never been good at compiling more complex stuff, but I’m willing to try. Is it possible to compile just the kernel modules and drop them in the pertinent directories or would it change other installed vbox components?

I do have a vague recollection of seeing compiler warnings about these four vbox modules in one of my failed attempts to install G04, possibly like failed to compile or such. The last, successful G04 install with Yast SM, however, did not give any error or warning messages at all, so I (naively) assumed all was well…

You have tried to use modules built agains a different kernel build ( the …42… kernel ). Since this is a 64bit system, why not use Leap?. That would at least avoid repo issues etc .

Hi
Under repository overview, select expert mode and start typing openSUSE, or older ones start Discontinued :wink:

Actually I got around this by just editing the metadata and adding <path project=“openSUSE:13.2” repository=“standard”/>

Thanks for the hint!

Op; I’m trying to build 5.1.6 in OBS for you - it should be the “least destructive” method of fixing your system and it (should) compile straight against the last kernel update released for 13.2.

That would be great, Miuku. Thank you!
(and you, Malcolm, helpful as always :))

If all else fails, my second-to-last resort could be to remove vbox with yast and go with the Oracle rpm. If it still compiles.

@Knurpht:
My last resort would be switching to Leap, but I’m doing this now with on W10/Leap dual-boot secondary work machine and want to avoid upgrading both boxes at the same time. The idea is to test my most used software first, as something always go wrong/take some time to fix, then upgrade the main box.

That’s what puzzling me. IINM, from the file dates these …42 kernel modules were compiled after the last kernel update. Also some newer kernel modules appear to be dumped on the original kernel folder, and simlinked elsewhere. For example, the nvidia modules there are dated four days ago, and sinlinked in the weak-updates folder in the current-kernel directory.

Looks like it has something to do with update-alternatives, but I haven’t looked into it.

Funny, just got a scare in the Leap machine after starting VBox (from the repo, with extensions installed): exactly the same error dialog.

Usually I restart after adding my user to vboxgrp, but this time I just logged out/in.
After rebooting the VM started normally, what a relief!

OK, installed vbox, vbox-host-kmp and vbox-qt 5.1.6-250.2 from Miuku’s repo and… SUCCESS! :smiley:

Many, many thanks to Muiku for helping. It was brilliant!

For the record, on first run after install got the same error dialog to run the nonexistent /sbin/vboxconfig. But:

# ./vboxdrv setup
vboxdrv.sh: Starting VirtualBox services.

# lsmod | grep vbox
vboxpci                27245  0 
vboxnetadp             25813  0 
vboxnetflt             31976  0 
vboxdrv               479599  3 vboxnetadp,vboxnetflt,vboxpci
#

And the new modules are at:

#ls -lsh /lib/modules/3.16.7-53-desktop/misc
total 14M
7,9M -rw-r--r-- 1 root root 7,9M Ago 29 17:29 vboxdrv.ko
372K -rw-r--r-- 1 root root 371K Ago 29 17:29 vboxnetadp.ko
612K -rw-r--r-- 1 root root 612K Ago 29 17:29 vboxnetflt.ko
552K -rw-r--r-- 1 root root 552K Ago 29 17:29 vboxpci.ko
1,8M -rw-r--r-- 1 root root 1,8M Dez 21  2016 vmmon.ko
2,4M -rw-r--r-- 1 root root 2,4M Dez 21  2016 vmnet.ko

FWIW, their sizes are all much larger than the previous 3.16.7-42 modules.

You’re welcome, send thanks to the original packagers the OBS :stuck_out_tongue:

This is because the modules still have symbols in them, if you wish you can go to the directory where the .ko’s are located and run (as root or with sudo); strip vbox* and they should return to their normal sizes.

For example in my vm;

linux-vbo9:/lib/modules/3.16.7-53-desktop/misc # ll 
total 9540
-rw-r--r-- 1 root root 8195883 Aug 29 23:29 vboxdrv.ko
-rw-r--r-- 1 root root  379035 Aug 29 23:29 vboxnetadp.ko
-rw-r--r-- 1 root root  626015 Aug 29 23:29 vboxnetflt.ko
-rw-r--r-- 1 root root  564431 Aug 29 23:29 vboxpci.ko

linux-vbo9:/lib/modules/3.16.7-53-desktop/misc # strip vbox*

linux-vbo9:/lib/modules/3.16.7-53-desktop/misc # ll
total 368
-rw-r--r-- 1 root root 311128 Aug 30 07:52 vboxdrv.ko
-rw-r--r-- 1 root root   9464 Aug 30 07:52 vboxnetadp.ko
-rw-r--r-- 1 root root  25536 Aug 30 07:52 vboxnetflt.ko
-rw-r--r-- 1 root root  22240 Aug 30 07:52 vboxpci.ko