Page 1 of 1

Error recompiling vboxdrv kernel module

Posted: 22. Aug 2008, 14:10
by riva.dani
Hi there!

I used kmk to compile SVN version of VirtualBox-OSE. I'm having a problem in recompiling the VirtualBox kernel module:

Code: Select all

$ sudo /etc/init.d/vboxdrv setup

 * Stopping VirtualBox kernel module *  done.
 * Recompiling VirtualBox kernel module
 * Look at /var/log/vbox-install.log to find out what went wrong
In the log file I read the following:

Code: Select all

/etc/init.d/vboxdrv: 311: /usr/share/virtualbox/src/build_in_tmp: not found
It doesn't exist a directory called /usr/share/virtualbox !! :o

Where is the problem?

Posted: 22. Aug 2008, 15:23
by Sasquatch
Do you have the folder /usr/src/virtualbox? Then you might want to symlink to that folder.
Did you also read the Wiki about compiling?

Posted: 22. Aug 2008, 16:41
by riva.dani
Thank you for your reply! :D

No, I don't have the folder /usr/src/virtualbox. And yes, I followed this wiki: http://www.virtualbox.org/wiki/Linux%20 ... structions

I believe that something went wrong while compiling the kernel module. Maybe I found the problem: I didn't notice before the output of make command:

Code: Select all

[16:34][daniele] ~/.vbox/out/linux.x86/release/bin/src > make

make KBUILD_VERBOSE=1 -C /lib/modules/2.6.24-21-generic/build SUBDIRS=/home/daniele/.vbox/out/linux.x86/release/bin/src SRCROOT=/home/daniele/.vbox/out/linux.x86/release/bin/src modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-21-generic'
test -e include/linux/autoconf.h -a -e include/config/auto.conf || (            \
        echo;                                                           \
        echo "  ERROR: Kernel configuration is invalid.";               \
        echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";        \
        echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";    \
        echo;                                                           \
        /bin/false)
mkdir -p /home/daniele/.vbox/out/linux.x86/release/bin/src/.tmp_versions ; rm -f /home/daniele/.vbox/out/linux.x86/release/bin/src/.tmp_versions/*
make -f scripts/Makefile.build obj=/home/daniele/.vbox/out/linux.x86/release/bin/src
  Building modules, stage 2.
make -f /usr/src/linux-headers-2.6.24-21-generic/scripts/Makefile.modpost
  scripts/mod/modpost -m -a -i /usr/src/linux-headers-2.6.24-21-generic/Module.symvers -I /home/daniele/.vbox/out/linux.x86/release/bin/src/Module.symvers -o /home/daniele/.vbox/out/linux.x86/release/bin/src/Module.symvers -w -s
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-21-generic'
So, do I have to compile a new kernel or should the "make oldconfig && make prepare" command fix the problem?

Posted: 22. Aug 2008, 18:32
by Sasquatch
Try the things that will take the least amount of effort first, then the bit more effort and so on. I have no experience with compiling programs and kernels, so I can't help you with this.

Posted: 22. Aug 2008, 20:10
by riva.dani
The fix for me was to compile the latest kernel (2.6.26.3).
Now it works perfectly. Thanks again for your support.