Cannot initiate vboxdrv

H i’m trying to run this command to make VirtualBox OK with a new kernel:

....... # /etc/init.d/vboxdrv setup

It fails and here’s the log file:

opensuse131:/home/john # cat /var/log/vbox-install.log
Makefile:186: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.                                                                                                             
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /usr/src/linux modules                                                                                                                                                                     
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \                                                                                                                                                                                      
echo >&2;                                                       \                                                                                                                                                                                                              
echo >&2 "  ERROR: Kernel configuration is invalid.";           \                                                                                                                                                                                                              
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\                                                                                                                                                                                    
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \                                                                                                                                                                                      
echo >&2 ;                                                      \                                                                                                                                                                                                              
/bin/false)                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                               
  ERROR: Kernel configuration is invalid.                                                                                                                                                                                                                                      
         include/generated/autoconf.h or include/config/auto.conf are missing.                                                                                                                                                                                                 
         Run 'make oldconfig && make prepare' on kernel src to fix it.                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
  WARNING: Symbol version dump ./Module.symvers                                                                                                                                                                                                                                
           is missing; modules will have no dependencies and modversions.

I’ve installed a bunch of things to fix it: gcc, make, kernel-syms/source/devel

But this stuff is beyond me now. What’s missing, what to do?

Thanks

This is in your log: make oldconfig && make prepare

opensuse131:/home/john # cat /var/log/vbox-install.log
Makefile:186: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.                                                                                                             
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /usr/src/linux modules                                                                                                                                                                     
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \                                                                                                                                                                                      
echo >&2;                                                       \                                                                                                                                                                                                              
echo >&2 "  ERROR: Kernel configuration is invalid.";           \                                                                                                                                                                                                              
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\                                                                                                                                                                                    
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";      \                                                                                                                                                                                      
echo >&2 ;                                                      \                                                                                                                                                                                                              
/bin/false)                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                               
  ERROR: Kernel configuration is invalid.                                                                                                                                                                                                                                      
         include/generated/autoconf.h or include/config/auto.conf are missing.                                                                                                                                                                                                 
         Run 'make oldconfig && make prepare' on kernel src to fix it.                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                               
  WARNING: Symbol version dump ./Module.symvers                                                                                                                                                                                                                                
           is missing; modules will have no dependencies and modversions.

It was a long time ago when i did that though not sure if it still applies today.

AFAIK it should not be necessary if the necessary kernel devel packages are installed, i.e. kernel-syms and kernel-xxx-devel.
But probably they are not installed for the new kernel?

Please post the output of:

rpm -qa | grep kernel

I suppose with “new kernel” you mean a Tumbleweed update? Or did you install it manually somehow?

That fixed it for me, thanks.

Yes, I meant a TW update. Here’s the output:

john@opensuse131:~> rpm -qa | grep kernel
kernel-desktop-3.15.3-37.1.g42bf625.x86_64
kernel-desktop-3.15.2-36.1.gfb7c781.x86_64
kernel-desktop-3.15.1-34.1.gee8dd2b.x86_64
kernel-desktop-3.15.4-38.1.g2b59ae6.x86_64
kernel-desktop-3.15.0-33.2.g9194b64.x86_64
kernel-desktop-devel-3.16.3-49.1.gd2bbe7f.x86_64
kernel-desktop-3.15.5-39.1.g01d2774.x86_64
kernel-devel-3.16.3-49.1.gd2bbe7f.noarch
kernel-desktop-3.16.3-49.1.gd2bbe7f.x86_64
kernel-desktop-3.15.1-34.2.gee8dd2b.x86_64
kernel-default-devel-3.16.3-49.1.gd2bbe7f.x86_64
kernel-desktop-3.11.6-4.1.x86_64
kernel-desktop-3.15.8-43.1.g1bbc06d.x86_64
kernel-desktop-3.15.6-40.1.gfdb2dde.x86_64
kernel-xen-devel-3.16.3-49.1.gd2bbe7f.x86_64
kernel-desktop-3.15.6-41.1.gedc5ddf.x86_64
kernel-desktop-3.15.0-33.1.g9194b64.x86_64
kernel-syms-3.16.3-49.1.gd2bbe7f.x86_64
kernel-desktop-3.15.1-35.1.g3289da4.x86_64
kernel-macros-3.16.3-49.1.gd2bbe7f.noarch
kernel-desktop-3.16.1-46.1.g90bc0f1.x86_64
kernel-desktop-3.15.8-44.1.g258e3b0.x86_64
kernel-source-3.16.3-49.1.gd2bbe7f.noarch
kernel-desktop-3.11.10-11.1.x86_64

It’s getting a bit busy after all this time.

Looks ok provided you are indeed using kernel-desktop 3.16.3-49.1.gd2bbe7f.x86_64.

Hm, maybe the /usr/src/linux link is not set to the correct version then, or some other link?

I’m not 100% sure whether compiling the VirtualBox kernel module really works out-of-the-box though, as I always used/use the openSUSE packages.
At least the file include/generated/autoconf.h that the log file states as not being found is definitely contained in the package kernel-desktop-devel.

It’s getting a bit busy after all this time.

Yeah, that’s a bug regarding purge-kernels’ handling of the package versions that’s fixed in Factory already:
http://bugzilla.opensuse.org/show_bug.cgi?id=820367

I’ve requested an update for 13.1 (i.e. Tumbleweed) over a month ago, but still nothing happened unfortunately.
Looks like I have to submit it myself… :wink:

You can remove kernels manually though, via YaST’s “Versions” tab e.g.