Error recompiling vboxdrv kernel module

Discussions related to using VirtualBox on Linux hosts.
Post Reply
riva.dani
Posts: 3
Joined: 22. Aug 2008, 14:00

Error recompiling vboxdrv kernel module

Post 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?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
riva.dani
Posts: 3
Joined: 22. Aug 2008, 14:00

Post 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?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
riva.dani
Posts: 3
Joined: 22. Aug 2008, 14:00

Post 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.
Post Reply