LinuxQuestions.org
Support LQ: Use code LQCO20 and save 20% on CrossOver Office
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Tags used in this thread
Popular LQ Tags , , , , , ,

Reply
 
Thread Tools
Old 05-31-2008, 12:55 AM   #1
Doctorzongo
Member
 
Registered: Mar 2008
Distribution: Fedora 11
Posts: 72
Thanked: 0
Latest Version of VirtualBox Kernel Errors on CentOS 5, i386


[Log in to get rid of this advertisement]
Hello everyone. I installed VirtualBox on my CentOS system as an alternative to Xen.

However, when I tried to run it from the .run file it got an error. I got the .rpm file, thinking maybe there was an error with the .run file on my system. The RPM installed fine. I made a 10 GB Virtual Hard Drive and targeted my image: ~/iso/dfly-1.8.1.iso

When I tried to run the machine, however, I got a message that the VirtualBox Kernel had not been setup.

I ran:
Code:
/etc/init.d/vboxdrv setup
It failed, saying that kernel files were not found.
Code:
Stopping VirtualBox kernel module                          [  OK  ]
Recompiling VirtualBox kernel module                       [FAILED]
  (Look at /var/log/vbox-install.log to find out what went wrong)
The logfile printed out the following:
Code:
which: no dkms in (/sbin:/usr/sbin:/bin:/usr/bin)
Makefile:127: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
I am not sure how to fix this.
Doctorzongo is offline  
Tag This Post ,
Reply With Quote
Old 06-01-2008, 07:33 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 16,716
Blog Entries: 30
Thanked: 283
Install the kernel-devel package for your currently running kernel?
unSpawn is offline     Reply With Quote
Old 06-01-2008, 08:34 AM   #3
syg00
Guru
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 6,908
Thanked: 165
Maybe read the user manual that came with the package ???.
Particularly chapter 2, Installation - covers what unSpawn mentioned, plus more.
syg00 is offline     Reply With Quote
Old 06-04-2008, 12:42 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 3,597
Blog Entries: 9
Thanked: 45
In the Debian/Ubuntu/MEPIS repos, there is a pkg. called "linux-headers-<kernel_name>".
Don't know if RH/FC/CentOS pkgs. are named the same way.
archtoad6 is offline     Reply With Quote
Old 06-14-2008, 02:53 PM   #5
kdingo
LQ Newbie
 
Registered: Jun 2005
Location: WA
Distribution: openSUSE 10.3, CentOS 5
Posts: 7
Thanked: 0
Getting CentOS kernel sources to build VirtualBox kernel module

Hi. You're in luck because I'm doing the same exact thing (except my server is x86_64.)

You will need the kernel sources. Downloading kernel-devel or kernel-headers does not work. CentOS kernel sources aren't available through yum, so I used these steps from the CentOS wiki. http://wiki.centos.org/HowTos/I_need_the_Kernel_Source

Getting CentOS kernel sources to build VirtualBox kernel module
of course, you may not run some of these commands if you already have the packages installed.

as root:
Code:
# yum groupinstall "Development Tools"
# yum groupinstall "Development Libraries"
# yum install unifdef rpm-build
as non-root:
Code:
# su local
$ cd
$ mkdir -p rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
$ echo "%_topdir %(echo $HOME)/rpmbuild" > .rpmmacros
$ rpm -i http://mirror.centos.org/centos/5/os/SRPMS/kernel-2.6.18-53.el5.src.rpm
$ cd ~/rpmbuild/SPECS
$ rpmbuild -bp --target=`uname -m` kernel-2.6.spec
Now to make old config and modules because vboxdrv complains about it

Code:
$ cd ~/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64
$ make oldconfig
$ make prepare
$ make
vboxdrv failed during module compilation, so I decided to build the entire kernel just to make sure. Do not run 'make install' since we don't need it.

as root:
Code:
# export KERN_DIR=/home/local/rpmbuild/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/
# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module                          [  OK  ]
Recompiling VirtualBox kernel module                       [  OK  ]
Starting VirtualBox kernel module                          [  OK  ]
You should now be able to start VirtualBox. Hopefully I didn't forget anything; it took me the whole morning to sort this out.

Last edited by kdingo; 06-14-2008 at 03:26 PM.. Reason: i did forget something.
kdingo is offline     Reply With Quote
Old 06-11-2009, 05:46 AM   #6
YouNix
LQ Newbie
 
Registered: Jun 2009
Posts: 3
Thanked: 1
Centos 5.3 Xen and PAE Kernels

Hi,
A few notes that may save someone somewhere a little bit of time.
I could not get VirtualBox to run on a Xen kernel which I had installed on a clean Poweredge 1900, 4Gb RAM, 2xQuad core Xeon. The final straw was my inability to get the actual Xen headers. Any builds I did complete complained about structs.
There were several people on different forums having lots of difficulty trying to get that configuration to work. Then I researched and found that there were issues over the future of Xen anyway so I made an executive decision to abandon it. (yes I got lazy and fustrated) So after hours of fustration I installed a PAE kernel.
YouNix is offline  
Tag This Post , , ,
Reply With Quote
Old 06-11-2009, 05:50 AM   #7
YouNix
LQ Newbie
 
Registered: Jun 2009
Posts: 3
Thanked: 1
Installing VirtualBox on Centos 5.3 PAE Kernel

So here is how I installed VirtualBox on a PAE kernel

uname-a
Linux xxxxxx 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST 2009 i686 i686 i386 GNU/Linux


On initial install of Virtual Box I had the following error:

VirtualBox-2.2.4_47978_rhel5-1.i386

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute

/etc/init.d/vboxdrv setup

as root.


After hours messing with Xen kernel I was expecting as much!
So as recommended I carried out the setup

/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)



Darn, here we go again..
So I updated headers for PAE kernel.

yum install kernel-PAE-devel
export KERN_DIR=/usr/src/kernels/2.6.18-128.1.10.el5-PAE-i686/


Tried the setup again but forgot that I had a clean install of centos so had to install gcc!

yum install gcc

and redid the setup

I still had errors as the compilers could not find the headers.

** Compiling vboxdrv
Makefile:145: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.


The following declaration stating where the correct headers were did the trick.
(Note that this directory depends on the kernel version!)

export KERN_DIR=/usr/src/kernels/2.6.18-128.1.10.el5-PAE-i686/
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [ OK ]


Yay.#
Tony
YouNix is offline  
Tag This Post , ,
Reply With Quote
Thanked by:
Old 06-27-2009, 12:20 PM   #8
ThinkFree
Member
 
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 99
Thanked: 10
Quote:
Originally Posted by YouNix View Post
So here is how I installed VirtualBox on a PAE kernel

uname-a
Linux xxxxxx 2.6.18-128.el5PAE #1 SMP Wed Jan 21 11:19:46 EST 2009 i686 i686 i386 GNU/Linux


On initial install of Virtual Box I had the following error:

VirtualBox-2.2.4_47978_rhel5-1.i386

Creating group 'vboxusers'. VM users must be member of that group!

No precompiled module for this kernel found -- trying to build one. Messages
emitted during module compilation will be logged to /var/log/vbox-install.log.

Compilation of the kernel module FAILED! VirtualBox will not start until this
problem is fixed. Please consult /var/log/vbox-install.log to find out why the
kernel module does not compile. Most probably the kernel sources are not found.
Install them and execute

/etc/init.d/vboxdrv setup

as root.


After hours messing with Xen kernel I was expecting as much!
So as recommended I carried out the setup

/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)



Darn, here we go again..
So I updated headers for PAE kernel.

yum install kernel-PAE-devel
export KERN_DIR=/usr/src/kernels/2.6.18-128.1.10.el5-PAE-i686/


Tried the setup again but forgot that I had a clean install of centos so had to install gcc!

yum install gcc

and redid the setup

I still had errors as the compilers could not find the headers.

** Compiling vboxdrv
Makefile:145: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.


The following declaration stating where the correct headers were did the trick.
(Note that this directory depends on the kernel version!)

export KERN_DIR=/usr/src/kernels/2.6.18-128.1.10.el5-PAE-i686/
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [ OK ]


Yay.#
Tony

After doing this I see the following message
Quote:
/etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module [ OK ]
Removing old VirtualBox netflt kernel module [ OK ]
Removing old VirtualBox kernel module [ OK ]
Recompiling VirtualBox kernel module [ OK ]
Starting VirtualBox kernel module [FAILED]
(modprobe vboxdrv failed. Please use 'dmesg' to find out why)
Quote:
vboxdrv: version magic '2.6.29.5-191.fc11.i686.PAE SMP mod_unload 686 ' should be '2.6.29.4-167.fc11.i586 SMP mod_unload 586 '
ThinkFree is offline     Reply With Quote
Old 10-20-2009, 03:04 AM   #9
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: India
Distribution: Ubuntu 8.10, RHEL, Fedora DS, Xandros, Mandriva Linux, Sun Solaris
Posts: 1,008
Blog Entries: 6
Thanked: 10
I am facing same issue?
linuxfedora your_shadow03 is offline     Reply With Quote
Old 10-21-2009, 07:25 AM   #10
ThinkFree
Member
 
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 99
Thanked: 10
^Give details about your system(OS, VBox version etc)
linuxfedora ThinkFree is offline     Reply With Quote
Old 10-22-2009, 05:23 AM   #11
YouNix
LQ Newbie
 
Registered: Jun 2009
Posts: 3
Thanked: 1
Latest rev of VirtualBox

Hi,
I freshly installed and updated my centos 5 2.6.18-164.elPAE (uname -r) with yum upgrade.
As a precaution I installed the kernel development headers in advance of previous issues but it was not needed.
I installed VirtualBox 3.0.8 r53138 and there has been no installation, configuration or running issues so far. (Why cant everything be like this?)
Happy days,
T
windows_xp_2003 YouNix is offline  
Tag This Post ,
Reply With Quote
Old 10-22-2009, 05:54 AM   #12
kirukan
Member
 
Registered: Jun 2008
Location: Srilanka
Distribution: Redhat, Solaris, Suse
Posts: 504
Thanked: 43
Did you install virtualbox using rpm?

Quote:
I installed VirtualBox 3.0.8 r53138 and there has been no installation, configuration or running issues so far.
how did you confirm that there are no installation?
check the following
Quote:
1. startup script
etc/init.d/vboxdrv
2. commands
VBox
VBoxHeadless
VBoxManage
VBoxSDL
VBoxTunctl
VBoxVRDP
VirtualBox
if all these exist just start the service
windows_xp_2003 kirukan is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS Latest Kernel upgrade Problem associatedappraisers Linux - Software 8 04-03-2008 02:02 PM
How to install latest version of Firefox on CentOS Dmjmusser Linux - Software 3 02-20-2007 01:02 PM
How do I upgrade to latest version of J2RE using YUM on CentOS 4.4? Dmjmusser Linux - Server 1 02-08-2007 02:06 PM
The latest kernel version? outshined Red Hat 3 07-17-2006 07:46 PM
What is the latest version of GenToo with the 2.4.x kernel? abefroman Linux - Distributions 4 11-23-2005 08:01 AM


All times are GMT -5. The time now is 11:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration