[Solved] vboxdrv.ko): Invalid module format
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
[Solved] vboxdrv.ko): Invalid module format
I can't get Virtualbox to work on any built kernels from kernel.org.
I get error statement telling me to /etc/init.d/vboxdrv setup
I run it and get error from DKMS stating that an error occurs when running modprobe vboxdrv.
So I run modprobe vboxdrv
and get FATAL: Error inserting vboxdrv (/lib/modules/3.2.7/misc/vboxdrv.ko): Invalid module format
What am I missing?
Wayne Sallee
Wayne@WayneSallee.com
I get error statement telling me to /etc/init.d/vboxdrv setup
I run it and get error from DKMS stating that an error occurs when running modprobe vboxdrv.
So I run modprobe vboxdrv
and get FATAL: Error inserting vboxdrv (/lib/modules/3.2.7/misc/vboxdrv.ko): Invalid module format
What am I missing?
Wayne Sallee
Wayne@WayneSallee.com
Last edited by Wayne Sallee on 24. Feb 2012, 01:48, edited 1 time in total.
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
Without some real information all that anyone can do is guess. Do you have the appropriate headers, and other required packages to be able to install and run VirtualBox?
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
I think I do have the headers, but how can I make sure that I do have the headers?Perryg wrote:Without some real information all that anyone can do is guess. Do you have the appropriate headers, and other required packages to be able to install and run VirtualBox?
Here's the method I use to build the kernel:
and yes I use root(considered dangerous); no comments needed on that.
Wayne SalleeCompiling A Linux Kernel
use make -j4 for dual core to speed it up; use a number that's 2 times the numer of cores.
extract kernel tar file
copy extracted kernel to /usr/src
su -
# cd /usr/src
# chown -R root:root linux-2.6.39.99
# cd linux-2.6.39.99
# make mrproper,,,,, while this is running ,,,,,
copy the .config file of the previouse kernel from /boot into /usr/src/linux-2.6.39.99 and rename it to .config or don't bother if you want to start with the new kernel's defaults.
# make menuconfig
This will automaticaly load up the .config file you copied over and will update new options, and allow you to make changes.
# make v=2 2>&1 | tee log.build.log
or # make -j4 v=2 2>&1 | tee log.build.log
This will take about 1.5 hours or so; without the -j4.
# make modules_install 2>&1 | tee log.install_modules.log
or # make -j4 modules_install 2>&1 | tee log.install_modules.log
# make v=2 install 2>&1 | tee log.install.log
This will also add it to /boot/grub/menu.lst , but if you want it to default to boot, edit menulist to set default boot.
Where it says "default " "default 0" boots the first one on the list, and "default 13" boots the 14th one on the list.
Wayne@WayneSallee.com
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
Code: Select all
dpkg -l | grep linux-headers
But this is just the beginning. You need to make sure that you have the additional packages to build external modules like VirtualBox.
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
.
.
Edit: My distro uses rpms, not deb packages so this code won't work for my distro. That's why the following won't work.
.
I was surprised to see that response, now to figure out why I get that response.
Checking the file system I see that
"/var/lib/dpkg/"
is there, but "status" is not in that directory.
Wayne Sallee
Wayne@WayneSallee.com
.
Edit: My distro uses rpms, not deb packages so this code won't work for my distro. That's why the following won't work.
.
Well this is interesting:Perryg wrote:Code: Select all
dpkg -l | grep linux-headers
Code: Select all
dpkg -l | grep linux-headers
dpkg-query: failed to open package info file `/var/lib/dpkg/status' for reading: No such file or directory
Checking the file system I see that
"/var/lib/dpkg/"
is there, but "status" is not in that directory.
Wayne Sallee
Wayne@WayneSallee.com
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
Looks like the equvilency is
But since I'm referring to a kernel built from kernel.org, and not a packaged kernel this is not the right direction.
Wayne Sallee
Wayne@WayneSallee.com
Code: Select all
rpm -qa | grep kernel | grep devel
Code: Select all
rpm -qa | grep kernel | grep devel
kernel-desktop586-devel-2.6.33.7-2mnb-1-1mnb2
kernel-server-devel-2.6.36.2-2mnb-1-1mnb2
kernel-desktop586-devel-2.6.31.12-3mnb-1-1mnb2
kernel-server-devel-latest-2.6.33.7-2mnb2
kernel-desktop586-devel-2.6.31.13-1mnb-1-1mnb2
kernel-desktop586-devel-2.6.33.7-1mnb-1-1mnb2
kernel-server-devel-2.6.38.7-1mnb2-1-1
kernel-desktop586-devel-2.6.33.5-2mnb-1-1mnb2
kernel-desktop-devel-2.6.33.7-2mnb-1-1mnb2
kernel-desktop-devel-2.6.31.13-1mnb-1-1mnb2
kernel-desktop-devel-2.6.31.12-3mnb-1-1mnb2
kernel-desktop-devel-2.6.38.7-1mnb2-1-1
kernel-server-devel-2.6.33.7-2mnb-1-1mnb2
kernel-desktop-devel-latest-2.6.33.7-2mnb2
kernel-desktop-devel-2.6.33.7-1mnb-1-1mnb2
kernel-server-devel-2.6.33.5-2mnb-1-1mnb2
kernel-desktop-devel-2.6.33.5-2mnb-1-1mnb2
kernel-desktop-devel-2.6.36.2-2mnb-1-1mnb2
kernel-desktop586-devel-latest-2.6.33.7-2mnb2
kernel-linus-devel-3.0.0-3mdv-1-1mdv2010.2
Wayne Sallee
Wayne@WayneSallee.com
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
Of course if you are using an rpm base it will be different. Since you did not state that fact before it is up to you to determine which command to run.
Now for what direction you need to take, and since you don't think that you need the proper headers to match you *running* kernel and additional packages to install VirtualBox I don't know what else I can tell you.
Now for what direction you need to take, and since you don't think that you need the proper headers to match you *running* kernel and additional packages to install VirtualBox I don't know what else I can tell you.
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
Yes, rpm is different from deb, and I came up with the equivalent, but none of this is of any value anyway, since I'm building the kernel from kernel.org, not using a package.Perryg wrote:Of course if you are using an rpm base it will be different. Since you did not state that fact before it is up to you to determine which command to run.
That's ridiculous. I never said any such thing.Perryg wrote: Now for what direction you need to take, and since you don't think that you need the proper headers to match you *running* kernel and additional packages to install VirtualBox I don't know what else I can tell you.
Wayne Sallee
Wayne@WayneSallee.com
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
Maybe I did not understand your quote
I am not talking about how you build the kernel that does not matter to me at all. I am talking about the error you are getting which I assume is from trying to install VirtualBox.
So I am back to my original statement. The headers must match the kernel and the proper packages for your build must be installed in order to install VirtualBox.But since I'm referring to a kernel built from kernel.org, and not a packaged kernel this is not the right direction.
I am not talking about how you build the kernel that does not matter to me at all. I am talking about the error you are getting which I assume is from trying to install VirtualBox.
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
Which brings me back to my previous question , "I think I do have the headers, but how can I make sure that I do have the headers?"Perryg wrote:Maybe I did not understand your quoteSo I am back to my original statement. The headers must match the kernel and the proper packages for your build must be installed in order to install VirtualBox.But since I'm referring to a kernel built from kernel.org, and not a packaged kernel this is not the right direction.
I am not talking about how you build the kernel that does not matter to me at all. I am talking about the error you are getting which I assume is from trying to install VirtualBox.
Wayne Sallee
Wayne@WayneSallee.com
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
while running and in a terminal run uname -r to see the running kernel and then look at the list you posted.
If you have the headers you will still need the devel package to match the kernel in an rpm based distro plus a few other packages that match your running kernel.
dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel (64-bit)
Or
dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-pae-devel (32-bit)
If you have the headers you will still need the devel package to match the kernel in an rpm based distro plus a few other packages that match your running kernel.
dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel (64-bit)
Or
dkms binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-pae-devel (32-bit)
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
Code: Select all
uname -r
3.2.7
dkms I have.
binutils I have.
gcc I have.
make I have.
patch I have.
libgomp I have.
glibc-headers not showing as available, probably in some other package.
glibc-devel I have.
kernel-headers We are already discussing this.
kernel-pae-devel Irrelevant
So how can I check to make sure that I do have the headers?
Wayne Sallee
Wayne@WayneSallee.com
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
see what uname -a tells you then
-
- Posts: 14
- Joined: 30. May 2009, 20:50
- Primary OS: Linux other
- VBox Version: OSE other
- Guest OSses: Win 3.1, Win 8, and many more
- Location: Florida
- Contact:
Re: vboxdrv.ko): Invalid module format
Perryg wrote:see what uname -a tells you then
Code: Select all
uname -a
Linux waynesalleecom 3.2.7 #1 SMP Tue Feb 21 18:25:21 EST 2012 i686 i686 i386 GNU/Linux
Wayne@WayneSallee.com
-
- Site Moderator
- Posts: 34369
- Joined: 6. Sep 2008, 22:55
- Primary OS: Linux other
- VBox Version: OSE self-compiled
- Guest OSses: *NIX
Re: vboxdrv.ko): Invalid module format
Now looking at your list above, do you see anything that resembles this in the form of a header?