Trying 3.0.0-rc7+ vanilla kernel in Debian 6 Squeeze 64-bit and VirtualBox issues

I’ve decided to try the vanilla kernel from kernel.org, and I’ve noticed that the VirtualBox vboxdrv driver did not compile after I installed the new kernel. Here is my kernel:

volodymyr@sv1:~$ uname -a
Linux sv1 3.0.0-rc7+ #3 SMP Tue Jul 12 19:47:41 CEST 2011 x86_64 GNU/Linux

Well, I guess the easiest way to solve virtualbox problem is to try to reinstall virtualbox-ose-dkms package in this way:

sudo apt-get –reinstall install virtualbox-ose-dkms

But it fails for me:

volodymyr@sv1:/var/lib/dkms$ sudo apt-get –reinstall install virtualbox-ose-dkms
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/550 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database … 133879 files and directories currently installed.)
Preparing to replace virtualbox-ose-dkms 3.2.10-dfsg-1 (using …/virtualbox-ose-dkms_3.2.10-dfsg-1_all.deb) …
——————————
Deleting module version: 3.2.10
completely from the DKMS tree.
——————————
Done.
Unpacking replacement virtualbox-ose-dkms …
Setting up virtualbox-ose-dkms (3.2.10-dfsg-1) …
Loading new virtualbox-ose-3.2.10 DKMS files…
Building only for 3.0.0-rc7+
Building initial module for 3.0.0-rc7+
Error! Bad return status for module build on kernel: 3.0.0-rc7+ (x86_64)
Consult the make.log in the build directory
/var/lib/dkms/virtualbox-ose/3.2.10/build/ for more information.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modulesNo suitable module for running kernel found … failed!
failed!
invoke-rc.d: initscript virtualbox-ose, action “restart” failed.

If I take a look at make.log file:

volodymyr@sv1:/var/lib/dkms$ more /var/lib/dkms/virtualbox-ose/3.2.10/build/make.log
DKMS make.log for virtualbox-ose-3.2.10 for kernel 3.0.0-rc7+ (x86_64)
Tue Jul 12 16:14:57 CEST 2011
make: Entering directory `/home/volodymyr/Kernel/linux-2.6′
LD /var/lib/dkms/virtualbox-ose/3.2.10/build/built-in.o
LD /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/built-in.o
CC [M] /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.o
In file included from /var/lib/dkms/virtualbox-ose/3.2.10/build/include/VBox/types.h:30,
from /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/../SUPDrvInternal.h:35,
from /var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:33:
/var/lib/dkms/virtualbox-ose/3.2.10/build/include/iprt/types.h:97:31: error: linux/autoconf.h: No such file or directory
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c: In function ‘VBoxDrvLinuxInit’:
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: ‘nmi_watchdog’ undeclared (first use in this function)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: (Each undeclared identifier is reported only once
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: for each function it appears in.)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:451: error: ‘NMI_IO_APIC’ undeclared (first use in this function)
/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.c:465: error: ‘nmi_active’ undeclared (first use in this function)
make[2]: *** [/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv/linux/SUPDrv-linux.o] Error 1
make[1]: *** [/var/lib/dkms/virtualbox-ose/3.2.10/build/vboxdrv] Error 2
make: *** [_module_/var/lib/dkms/virtualbox-ose/3.2.10/build] Error 2
make: Leaving directory `/home/volodymyr/Kernel/linux-2.6′

There are basically two problems here. First, it tries to include linux/autoconf.h which changed location since 2.6.33 kernel. Second, by some reason it uses location of my home path for kernel sources, i.e.: /home/volodymyr/Kernel/linux-2.6

It seems like my /usr/src/linux points to my home build directory:

volodymyr@sv1:/var/lib/dkms$ ls -la /usr/src/linux
lrwxrwxrwx 1 root root 32 Jul 12 15:04 /usr/src/linux -> /home/volodymyr/Kernel/linux-2.6

Now, I can make symbolic link to avoid problem with autoconf:

ln -s /home/volodymyr/Kernel/linux-2.6/include/generated/autoconf.h /home/volodymyr/Kernel/linux-2.6/include/linux/autoconf.h

And .. it still does not work. It seems like the only way is to install VirtualBox from sid. OK, let’s remove virtualbox-ose from system and add

deb http://ftp.de.debian.org/debian sid main

To your your /etc/apt/sources.list file and do “sudo apt-get update”.

Install again virtualbox-ose (this time it is taking the sid version):

Processing triggers for python-central …
Setting up virtualbox-ose (4.0.10-dfsg-1) …
Setting up virtualbox-qt (4.0.10-dfsg-1) …
Setting up virtualbox-dkms (4.0.10-dfsg-1) …
Loading new virtualbox-4.0.10 DKMS files…
First Installation: checking all kernels…
Building only for 3.0.0-rc7+
Building initial module for 3.0.0-rc7+
Done.
vboxdrv.ko:
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/3.0.0-rc7+/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/3.0.0-rc7+/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
– Original module
– No original module exists within this kernel
– Installation
– Installing to /lib/modules/3.0.0-rc7+/updates/dkms/
depmod……………….
DKMS: install Completed.
Stopping VirtualBox kernel modules.
Starting VirtualBox kernel modules.
Setting up virtualbox-ose-dkms (4.0.10-dfsg-1) …
Processing triggers for menu …

And see that everything works okay this time.

Leave a Reply

Your email address will not be published. Required fields are marked *

Identify yourself * Time limit is exhausted. Please reload CAPTCHA.