VirtualBox

Ticket #9456 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

FATAL ERROR - instering vboxguest on 2.6.38.8 kernel

Reported by: samiux Owned by:
Priority: major Component: guest additions
Version: VirtualBox 4.1.2 Keywords: vboxguest
Cc: Guest type: Linux
Host type: Linux

Description

I am using Version 4.1.2 and 4.1.0. When the kernel is upgraded to 2.6.38.8, I reinstalled the guest addition and the vboxguest cannot be loaded and produced the following error :

FATAL: Error inserting vboxguest (/lib/modules/2.6.38.8/misc/vboxguest.ko): Invalid module format

Attachments

vboxadd-install.log Download (150.7 KB) - added by samiux 3 years ago.
/etc/init.d/vboxadd setup

Change History

comment:1 Changed 3 years ago by frank

That sounds more like a mismatch between the C compiler used for compiling the modules and the C compiler used for compiling the kernel. Which Linux distribution is that and which kernel package are you using?

comment:2 Changed 3 years ago by samiux

I am using BackTrack 5 with the current kernel 2.6.39.4.

I just upgraded to 2.6.39.4 and the vboxguest also cannot be loaded :

FATAL: Error inserting vboxguest (/lib/modules/2.6.39.4/misc/vboxguest.ko): Invalid module format

And the version of the gcc is :

gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)

The kernel is :

Linux bt 2.6.39.4 #1 SMP Wed Aug 17 21:42:30 EDT 2011 x86_64 GNU/Linux

comment:3 Changed 3 years ago by frank

What is the output of cat /proc/version?

comment:4 Changed 3 years ago by samiux

root@bt:/tmp# cat /proc/version Linux version 2.6.39.4 (root@builder64) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #1 SMP Wed Aug 17 21:42:30 EDT 2011

comment:5 Changed 3 years ago by frank

So the gcc compiler seems to be the same. But it sill looks like the sources are different from the Linux kernel. Please attach /var/log/vboxadd-install.log after your forced recompilation of your guest kernel modules (/etc/init.d/vboxadd setup).

Changed 3 years ago by samiux

/etc/init.d/vboxadd setup

comment:6 Changed 3 years ago by samiux

root@bt:~# /etc/init.d/vboxadd setup
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...done.
Building the shared folder support module ...done.
Building the OpenGL support module ...done.
Doing non-kernel setup of the Guest Additions ...done.
Starting the VirtualBox Guest Additions ...fail!
(modprobe vboxguest failed)

comment:7 Changed 3 years ago by frank

The error message says it all. The source tree does not match the currently running kernel. The log file clearly shows that the current modules were compiled against a kernel /usr/src/linux-2.6.38 which is different from 2.6.39.4.

Just make sure that you installed the correct kernel headers. The following link must exist:

/lib/modules/$(uname -r)/build

Do NOT create this link manually but install the proper which provides this link. Then recompile your guest kernel modules.

comment:8 Changed 3 years ago by jabberd

This is how I solved the problem:

  1. apt-get install linux-headers-2.6.39.4
  2. cd /lib/modules/2.6.39.4; ln -s /usr/src/linux-headers-2.6.39.4 build
  3. /etc/init.d/vboxadd setup

comment:9 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to worksforme

The ln -s shouldn't be necessary.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use