modprobe vboxdrv failed. Please use ‘dmesg’ to find out why failed!

If you attempt to (re)?install Virtualbox OSE 3.2.8 from the official Oracle package, you may encounter the following errrors within the installation log file /var/log/vbox-install.log :

root@localhost:~# dpkg-reconfigure virtualbox-3.2
Stopping VirtualBox kernel module:done..
addgroup: The group `vboxusers’ already exists as a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Starting VirtualBox kernel module:
modprobe vboxdrv failed. Please use ‘dmesg’ to find out why failed!

cat /var/log/vbox-install.log
** Compiling vboxdrv
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxdrv/3.2.8/source ->
/usr/src/vboxdrv-3.2.8

DKMS: add Completed.

Error! Your kernel headers for kernel 2.6.32-bpo.2-686 cannot be found at
/lib/modules/2.6.32-bpo.2-686/build or /lib/modules/2.6.32-bpo.2-686/source.
You can use the –kernelsourcedir option to tell DKMS where it’s located, or you could install the linux-headers-2.6.32-bpo.2-686 package.
Failed to install using DKMS, attempting to install without
Makefile:162: 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.
Makefile:170: *** Error: /usr/src/linux (version 2.6.30-bpo.2-686) does not match the current kernel (version 2.6.32-bpo.2-686).  Stop.

What do the errors above mean? The installation has been tested on a Debian lenny machine with the backports activated in /etc/apt/sources.list.

The running kernel version : 2.6.32-bpo.5-686

To compile a module with DKMS , you need to install the following (and probably missing ones for those who got the errors displayed above ) Debian packages :

root@localhost:~# apt-get install linux-image-2.6.32-bpo.5-686 linux-headers-2.6.32-bpo.5-686

These packages contains the source code and the corresponding headers files for the current running kernel. Once installed, relaunch your installation :

root@localhost:~# dpkg-reconfigure virtualbox-3.2

Stopping VirtualBox kernel module:done..
addgroup: The group `vboxusers’ already exists as a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
Starting VirtualBox kernel module:done..

The freshly compiled modules should have been loaded :

root@localhost:~# lsmod | grep vbox
vboxnetadp              5126  0
vboxnetflt             12641  0
vboxdrv               126550  2 vboxnetadp,vboxnetflt

Even if the compilation process has been a success, do not forget to check /var/log/vbox-install.log

Advertisements

One thought on “modprobe vboxdrv failed. Please use ‘dmesg’ to find out why failed!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s