Page 1 of 1

Installation on CentOSv5

Posted: 1. Sep 2008, 17:02
by 5826_stephane
Hi,

Very very newbie on VirtualBox.

I tried to install the RPM package ( i386) for CentOSv5
I think that I have most of the compulsory packages ...

The installation is OK
When I start VirtualBox , I've got :

Makefile:127: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.
And the Kernel Source has been installed ( Kernel-Dev )


- OK.. where should I specify KERN_DIR ????

Thanks for your help

Posted: 1. Sep 2008, 21:24
by Sasquatch
KERN_DIR is where the kernel sources are. For Debian/Ubuntu, those are in /usr/src/<full kernel name>. This can be different for CentOS.

Posted: 1. Sep 2008, 21:47
by scottro
kernel-dev is installed--is it definitely for the version of the kernel that you're running?

I had no trouble installing it on CentOS 5.x. I always put in the following. See if you have them all.

gcc gcc-c++ kernel-devel (which you have) make (which you also probably have.)

That usually pulls in all the dependencies that I need.

Oh, did you run
/etc/init.d/vboxdrv setup

That also has to be done.

(It also usually gives relatively specific errors if there's a problem.)

Posted: 2. Sep 2008, 00:03
by 5826stephane
Hi,

I have already installed the kernel-dev.

When I do:

/etc/init.d/vboxdrv setup I have :

Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)

And Into var/log/vbox-install.log
Makefile:127: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

- Should I specifie this somewhere ??

I have into /usr/src/
2.6.18-92.1.10.el5-debug-i686
2.6.18-92.1.10.el5-i686
2.6.18-92.1.10.el5debug-i686 ->/usr/serc/kernels/2.6.18-92.1.10.el5-debug-i685

PS : This is fresh installation of CentOSv5 :-(

Thanks

Posted: 2. Sep 2008, 02:43
by scottro
Would you do the following

uname -r
(and post the output, it will be a kernel version).

Then

ls /lib/modules

You'll see the kernels you have installed, such as, for example

2.6.18-53.1.14.el5
2.6.18-53.1.14.el5.centos.plus

(that's a quick cut and paste, your output should be different.)

Find the number that matches the output of the earlier uname -r command, let's say it's 2.6.18.92.1

It should match exactly, that is, if the uname -r has centosplus, the /lib/module directory also has centosplus.
Then (using 2.6.18.92.1 and whatever else is in uname -r)

ls /lib/modules/2.6.18.92.1/build

You should get back things like

arch include lib scripts
block init Makefile security
crypto ipc mm sound

and other things.

If you don't, or if when you do your ls of that directory, you see something like build being white on a flashing red background, it means that something's missing.

At any rate, let's try that first. (I might not answer further till tomorrow though.)

Posted: 2. Sep 2008, 12:43
by 5826_stephane
Hi,


uname -r : 2.6.18-53.el5

ls /lib/modules
2.6.18-53.el5
2.6.18-8.el5
2.6.18-92.1.10.el5debug
( I don't have any ..'centos.plus..' ?!?

ls /lib/modules/2.6.18-53.el5/build
-> Nothing !!??!

ls /lib/modules/2.6.18.92.1
[user1@localhost ~]$ ls /lib/modules/2.6.18-53.el5/
build modules.dep modules.pcimap updates
extra modules.ieee1394map modules.seriomap weak-updates
kernel modules.inputmap modules.symbols
modules.alias modules.isapnpmap modules.usbmap
modules.ccwmap modules.ofmap source


Thanks !

Posted: 2. Sep 2008, 13:19
by scottro
Sorry I wasn't quite clear. You wouldn't necessarily have a kernel marked plus, I was using that for example.

Anyway, there's your problem. You don't have the sources for your running kernel.
Would you please try
yum -y upgrade kernel-devel gcc gcc-c++ make

It should pull in several other things such as kernel headers.

After doing that, check the build directory of the modules again. If it's populated this time, you should be able to run the vboxdrv setup.

Posted: 2. Sep 2008, 17:06
by 5826stephane
Hi,

So, I have something like this, but into :

/lib/modules/2.6.18-53.el5/kernel ( but not into ../build)
( Apparently, there is no 'build ' folder!? )

I have :

arch crypto drivers fs lib net sound

After doing / etc/init.d/vboxdrv setup
[root@localhost /]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [FAILED]
(Look at /var/log/vbox-install.log to find out what went wrong)
[root@localhost /]#

Into Vbox-install.log :
Makefile:127: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

thanks

Posted: 2. Sep 2008, 17:40
by frank
You must install the missing kernel-devel package. Do

Code: Select all

yum list kernel*
and install the proper package.

Posted: 3. Sep 2008, 12:15
by 5826stephane
Hi,

Thanks !! that works now !! :-)

It was effectively a kernel verison probelm I would say :

[root@localhost smagnier]# yum list kernel*
Loading "installonlyn" plugin
Setting up repositories
extras 100% |=========================| 1.1 kB 00:00
updates 100% |=========================| 951 B 00:00
base 100% |=========================| 1.1 kB 00:00
addons 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
Installed Packages
kernel.i686 2.6.18-53.el5 installed kernel-debug.i686 2.6.18-92.1.10.el5 installed kernel-debug-devel.i686 2.6.18-92.1.10.el5 installed kernel-devel.i686 2.6.18-92.1.10.el5 installed kernel-doc.noarch 2.6.18-92.1.10.el5 installed kernel-headers.i386 2.6.18-92.1.10.el5 installed Available Packages
kernel.i686 2.6.18-92.1.10.el5 updates kernel-PAE.i686 2.6.18-92.1.10.el5 updates kernel-PAE-devel.i686 2.6.18-92.1.10.el5 updates kernel-xen.i686 2.6.18-92.1.10.el5 updates kernel-xen-devel.i686 2.6.18-92.1.10.el5 updates [root@localhost smagnier]# yum upgrade kernel

As you can see, the kernel-devel, was not the same as the one installed - I don't know why ..
I started again : /etc/init.d/vboxdrv setup
chmod 777 /dev/vboxdrv ( after complaining about rights )
-> Seems to be OK !!

I wil play with it, and then, will have to install it on a 64bit CentOS
machine. I hope that that will be OK :-)


thanks for your help, all of you !

Stephane

PS : Just a precision, I saw RPM packages for i386 and AMD64.
- Is the 64bit optimised for AMD ? ( I've got Intel Xeon .. - Should be OK !? )

Posted: 3. Sep 2008, 13:12
by scottro
I use the AMD 64 on an Intel Quad Core and it's fine. Use the 64 bit. However, I believe the guests still have to be 32 bit. (But 64 bit hosts are fine.)