Page 1 of 1

Can't install VB, seems like it needs kernel headers?

Posted: 6. Apr 2009, 15:35
by lugoteehalt
Don't have much idea what I'm doing.

Got the source code for kernel.2.6.29.1 and compiled it using the .config file from Debian Lenny 5, AMD64. It seems to work allright. Installed nVidia's drivers, mention this because the installer made the kernel module alright.

Tried to install virtualbox from a *.deb file, but it wouldn't work:

Code: Select all

fido:~/Packages/VirtualBox# /usr/share/mc/extfs/deb run /root/Packages/VirtualBox/virtualbox-2.1_2.1.0-41146_Debian_lenny_amd64.deb INSTALL
Installing /root/Packages/VirtualBox/virtualbox-2.1_2.1.0-41146_Debian_lenny_amd64.deb
(Reading database ... 207386 files and directories currently installed.)
Preparing to replace virtualbox-2.1 2.1.0-41146_Debian_lenny (using .../virtualbox-2.1_2.1.0-41146_Debian_lenny_amd64.deb) ...
Stopping VirtualBox kernel module:done..
Unpacking replacement virtualbox-2.1 ...
Setting up virtualbox-2.1 (2.1.0-41146_Debian_lenny) ...
addgroup: The group `vboxusers' already exists and is not a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Starting VirtualBox kernel module:
No suitable module for running kernel found failed!
Here is vbox-install.log:

Code: Select all

** Compiling vboxdrv
make KBUILD_VERBOSE= -C /lib/modules/2.6.29.1/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
  CC [M]  /tmp/vbox.0/linux/SUPDrv-linux.o
/tmp/vbox.0/linux/SUPDrv-linux.c: In function <E2><80><98>VBoxDrvLinuxCreate<E2><80><99>:
/tmp/vbox.0/linux/SUPDrv-linux.c:706: error: <E2><80><98>struct task_struct<E2><80><99> has no member named <E2><80><98>euid<E2><80><99>
/tmp/vbox.0/linux/SUPDrv-linux.c:719: error: <E2><80><98>struct task_struct<E2><80><99> has no member named <E2><80><98>uid<E2><80><99>
/tmp/vbox.0/linux/SUPDrv-linux.c:720: error: <E2><80><98>struct task_struct<E2><80><99> has no member named <E2><80><98>gid<E2><80><99>
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2
Since the thing suggests that it is probably failing because the linux-headers package is not installed, I made a fake linux headers package file in /usr/src that symbolically linked to the headers in /lib/include or whereever. Above is the output after I had done that.

Tried putting the drivers from kernel.2.6.26 into the 29's modules and they would not load into the kernel - modconf said they were the wrong format or something.

How do I fix this? Is there a headers package for the latest stable kernel,29? Why does it need the headers package it should be able to use the configured source shouldn't it?

Re: Can't install VB, seems like it needs kernel headers?

Posted: 6. Apr 2009, 15:41
by Perryg
lugoteehalt wrote:Don't have much idea what I'm doing.

Got the source code for kernel.2.6.29.1 and compiled it using the .config file from Debian Lenny 5, AMD64. It seems to work allright. Installed nVidia's drivers, mention this because the installer made the kernel module alright.

Tried to install virtualbox from a *.deb file, but it wouldn't work:

Code: Select all

fido:~/Packages/VirtualBox# /usr/share/mc/extfs/deb run /root/Packages/VirtualBox/virtualbox-2.1_2.1.0-41146_Debian_lenny_amd64.deb INSTALL
Installing /root/Packages/VirtualBox/virtualbox-2.1_2.1.0-41146_Debian_lenny_amd64.deb
(Reading database ... 207386 files and directories currently installed.)
Preparing to replace virtualbox-2.1 2.1.0-41146_Debian_lenny (using .../virtualbox-2.1_2.1.0-41146_Debian_lenny_amd64.deb) ...
Stopping VirtualBox kernel module:done..
Unpacking replacement virtualbox-2.1 ...
Setting up virtualbox-2.1 (2.1.0-41146_Debian_lenny) ...
addgroup: The group `vboxusers' already exists and is not a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Starting VirtualBox kernel module:
No suitable module for running kernel found failed!
Here is vbox-install.log:

Code: Select all

** Compiling vboxdrv
make KBUILD_VERBOSE= -C /lib/modules/2.6.29.1/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
  CC [M]  /tmp/vbox.0/linux/SUPDrv-linux.o
/tmp/vbox.0/linux/SUPDrv-linux.c: In function <E2><80><98>VBoxDrvLinuxCreate<E2><80><99>:
/tmp/vbox.0/linux/SUPDrv-linux.c:706: error: <E2><80><98>struct task_struct<E2><80><99> has no member named <E2><80><98>euid<E2><80><99>
/tmp/vbox.0/linux/SUPDrv-linux.c:719: error: <E2><80><98>struct task_struct<E2><80><99> has no member named <E2><80><98>uid<E2><80><99>
/tmp/vbox.0/linux/SUPDrv-linux.c:720: error: <E2><80><98>struct task_struct<E2><80><99> has no member named <E2><80><98>gid<E2><80><99>
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2
Since the thing suggests that it is probably failing because the linux-headers package is not installed, I made a fake linux headers package file in /usr/src that symbolically linked to the headers in /lib/include or whereever. Above is the output after I had done that.

Tried putting the drivers from kernel.2.6.26 into the 29's modules and they would not load into the kernel - modconf said they were the wrong format or something.

How do I fix this? Is there a headers package for the latest stable kernel,29? Why does it need the headers package it should be able to use the configured source shouldn't it?

Users guide section 4.3.1

It's a must read to accomplish what you need to do. No need for anything fancy just install the proper additions and it will work.

Re: Can't install VB, seems like it needs kernel headers?

Posted: 6. Apr 2009, 15:54
by lugoteehalt
Great thanks.

Seems like I need my ears and gonads shringing: http://forums.virtualbox.org/viewtopic.php?f=7&t=15895
Re: Virtualbox 2.1.4 module compilation fails for Kernel 2.6.29

Postby hildebrand_us ยป 31. Mar 2009, 11:44
I filed a bug. It turned out to be a recurrent bug.
Package maintainer has suggested the following fix to rebuild the kernel package headers from source:-
> # apt-get install linux-source-2.6.29
> # cd /usr/src
> # tar jxf linux-source-2.6.29.tar.bz2
> # cd linux-source-2.6.29
> # make-kpkg build kernel_headers
> ##long long time
>
> # dpkg -i linux-header*.deb
> # cd /usr/src/linux-headers-2.6.29/include/
> # rm asm && ln -s asm-x86 asm
>
> Then you can rebuild you modules.
Last edited by hildebrand_us on 3. Apr 2009, 16:09, edited 1 time in total.
So hope that works. :)

Re: Can't install VB, seems like it needs kernel headers?

Posted: 6. Apr 2009, 18:15
by Perryg
I hope it fixes it for you too.
I did not need to do any of this on my copy of Lenny, but that is not the issue for you.
It just worked. Steps I took were to install Lenny, update everything, install the necessary preparation files and then reboot. Install VBox additions and reboot.
Let us know how it goes for you.

Re: Can't install VB, seems like it needs kernel headers?

Posted: 7. Apr 2009, 19:01
by lugoteehalt
It did not work.

re: > # rm asm && ln -s asm-x86 asm - the symbolic link already points to asm-x86. Thought of making the link point to asm-something-to-do-with-AMD64, but there did not seem to be anything like that.

So I take it, very possibly wrongly, that this is a psuedo-bug (virtualbox.deb will not work for 2.6.29.1 on architecture AMD 64 even with the workarround).

I also tried this, but there is no /linux-headers-2.6.29-1-common/ directory with my thing so was a little unsure where to put the file, and may have chosen wrongly.
It was talking about the missing file: /usr/src//arch/x86/Makefile_32.cpu
On going through the header code for an older kernel 2.6.26 I found that file contains the CPU tuning section. I copied this file from 2.6.26 headers to that of 2.6.29 header and I have been able to compile the driver now.
Do I file a bug report? No idea how to do this.

Re: Can't install VB, seems like it needs kernel headers?

Posted: 7. Apr 2009, 19:12
by Sasquatch
If anyone with debian is tired of compiling it manually, and you are daring enough, get the Ubuntu build (vanilla, no patches) from http://kernel.ubuntu.com/~kernel-ppa/ma ... v2.6.29.1/. VB is not the issue here, 'cause I run this kernel without issues.

Re: Can't install VB, seems like it needs kernel headers?

Posted: 8. Apr 2009, 17:12
by lugoteehalt
Sasquatch wrote:If anyone with debian is tired of compiling it manually, and you are daring enough, get the Ubuntu build (vanilla, no patches) from http://kernel.ubuntu.com/~kernel-ppa/ma ... v2.6.29.1/. VB is not the issue here, 'cause I run this kernel without issues.
Fixed problem. Embarassingly obvious perhaps. Used the most up to date virtualbox.deb package - it's the most up to date kernel - and it worked.

An instant qualification is necessary: Had tried to install Sasquatch's kernel - it was in but remained unconfigured due to a missing dependency. However it is difficult to see how this could make any difference since it was not the running kernel.