OVH Community, your new community space.

VirtualBox 2.2 - Kernel Module Not Found (Log file included)


jacks
10-05-2011, 17:12
Copied from another thread.

First you need to change the kernel, forget all that compile stuff. Here is what i did..

Might not be the best approach but it works

Make sure and backup all config files edited during this tutorial just in case you screw up.

First run this command to install new kernel, it will ask you if you want to keep your local grub config file i just said yeah..

Code:

sudo apt-get install linux-image-server

then edit your grub.cfg to boot from new kernel. What i did was just comment all the lines that where the OVH kernel and made sure the new kernel was set to boot first

Code:

sudo nano /boot/grub/grub.cfg

then reboot

Code:

sudo reboot

type uname -r and you should see you new kernel

Code:

uname -r

if you screw anything up just reboot into rescue mount your file system and replace original files you have edited.

Now install linux headers for your new kernel.

Code:

sudo apt-get install linux-headers-`uname -r`


That is it now just install Virtualbox and everything should go smoothly.

Iray
08-05-2011, 23:52
Quote Originally Posted by Berilac
You need to point virtualbox to the directory where your kernel is stored for it to compile the necessary files. Hence the command KERN_DIR= ??????

run "uname -r" to see what your current kernel version is. And find where it is stored. Normally in /usr/src/ if you have compiled your own and have downloaded the relevent kernel headers.
looks like virtualbox does not work with ovh 'stock' kernel.. i've had no luck getting virtualbox working with ovh kernel.

if anyone has had any success with this method please let me know.. i'd appreciate it.

I have yet to compile my own kernel - im in fear ill blow up something

Berilac
08-05-2011, 21:38
You need to point virtualbox to the directory where your kernel is stored for it to compile the necessary files. Hence the command KERN_DIR= ??????

run "uname -r" to see what your current kernel version is. And find where it is stored. Normally in /usr/src/ if you have compiled your own and have downloaded the relevent kernel headers.

Iray
04-04-2011, 18:52
MUST I compile my own kernal to install VirtualBox??

I've just spent the last hour trying to install VirtualBox with no avail.

I have got til this part but cannot go any further. I've read up on alot of threads and it looks like I can either compile my own kernel (Which I have no idea about) or use my current kernel ?


ks356580:/usr/src# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules:Opening /proc/modules: No such file or directory
Opening /proc/modules: No such file or directory
.
Uninstalling old VirtualBox DKMS kernel modules:.
Removing old VirtualBox netadp kernel module:.
Removing old VirtualBox netflt kernel module:.
Removing old VirtualBox kernel module:.
Trying to register the VirtualBox kernel modules using DKMS:
Failed, trying without DKMS failed!
Recompiling VirtualBox kernel modules:
Look at /var/log/vbox-install.log to find out what went wrong failed!
vbox-install.log
Makefile:167: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and$

ks356580:/usr/src# dir
linux-headers-2.6.26-2-486 linux-headers-2.6.26-2-common linux-kbuild-2.6.26 vboxhost-4.0.4

Apologies for resurrecting such an old thread btw!

Berilac
03-04-2010, 23:30
A big thanks to extremed for the command:

KERN_DIR=/usr/src/your kernel version/ /etc/init.d/vboxdrv setup

been pulling my hair out trying to get this to work.
Stumbled apon this post and with-in a couple of clicks its all go

extremed
24-06-2009, 21:31
nice

makno
24-06-2009, 20:24
Quote Originally Posted by extremed
first get rid of that kernel and compile your own latest kernel. then re run

Code:
KERN_DIR=/usr/src/your kernel version/ /etc/init.d/vboxdrv setup
this sorted my problem!

extremed
22-06-2009, 08:34
first get rid of that kernel and compile your own latest kernel. then re run .

Code:
KERN_DIR=/usr/src/your kernel version/ /etc/init.d/vboxdrv setup

freshwire
27-04-2009, 15:26
With me I got rid of the custom OVH kernel. It can be a pain. But it will probably be similar to vmware install. Search this ere forum for vmware install. You will see people saying about getting the kernel compiled from the ovh ftp.

n0an
26-04-2009, 04:10
Hello,

I am trying to setup Windows XP using Sun Virtual Box on my Kimsufi 3XL - Ubuntu Desktop 8.04 Hardy Heron. I am getting the "Kernel Module is either not loaded or their is a permission problem".



Here's the command line on trying the setup:

Code:
root@ks302332:/home/admin# /etc/init.d/vboxdrv setup
 * Stopping VirtualBox kernel module                                            
Opening /proc/modules: No such file or directory
 *  done.
 * Recompiling VirtualBox kernel module                                         
 * Look at /var/log/vbox-install.log to find out what went wrong

That command doesn't return anything. I just checked the proc folder and it doesn't have any /modules dir in it. How to get one now?

The Kernel is a custom one by OVH, I believe.

Code:
root@ks302332:/home/admin# uname -a
Linux ks302332.kimsufi.com 2.6.28.1-xxxx-std-ipv4-32 #2 SMP Fri Jan 30 09:55:02 UTC 2009 i686 GNU/Linux
Log file:

Attempting to install using DKMS
removing old DKMS module vboxdrv version 2.2.0

------------------------------
Deleting module version: 2.2.0
completely from the DKMS tree.
------------------------------
Done.

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

DKMS: add Completed.

Error! Your kernel source for kernel 2.6.28.1-xxxx-std-ipv4-32 cannot be found at
/lib/modules/2.6.28.1-xxxx-std-ipv4-32/build or /lib/modules/2.6.28.1-xxxx-std-ipv4-32/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
Makefile:143: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR= and run Make again.
Makefile:178: *** Unable to find the folder to install the support driver to. Stop.
Here's the Ubuntuforums thread where I fixed the permission error:

Code:
http://ubuntuforums.org/showthread.php?t=1136829