LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 05-30-2008, 11:55 PM   #1
Doctorzongo
Member
 
Registered: Mar 2008
Distribution: Fedora 11
Posts: 72

Rep: Reputation: 15
Latest Version of VirtualBox Kernel Errors on CentOS 5, i386


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.
 
Old 06-01-2008, 06:33 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,458
Blog Entries: 54

Rep: Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897Reputation: 2897
Install the kernel-devel package for your currently running kernel?
 
Old 06-01-2008, 07:34 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
Maybe read the user manual that came with the package ???.
Particularly chapter 2, Installation - covers what unSpawn mentioned, plus more.
 
Old 06-04-2008, 11:42 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
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.
 
Old 06-14-2008, 01:53 PM   #5
kdingo
LQ Newbie
 
Registered: Jun 2005
Location: WA
Distribution: openSUSE 10.3, CentOS 5
Posts: 7

Rep: Reputation: 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 02:26 PM. Reason: i did forget something.
 
Old 06-11-2009, 04:46 AM   #6
YouNix
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Rep: Reputation: 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.
 
Old 06-11-2009, 04:50 AM   #7
YouNix
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Rep: Reputation: 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
 
Old 06-27-2009, 11:20 AM   #8
ThinkFree
Member
 
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 112

Rep: Reputation: 20
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 '
 
Old 10-20-2009, 02:04 AM   #9
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,443
Blog Entries: 6

Rep: Reputation: 51
I am facing same issue?
 
Old 10-21-2009, 06:25 AM   #10
ThinkFree
Member
 
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 112

Rep: Reputation: 20
^Give details about your system(OS, VBox version etc)
 
Old 10-22-2009, 04:23 AM   #11
YouNix
LQ Newbie
 
Registered: Jun 2009
Posts: 9

Rep: Reputation: 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
 
Old 10-22-2009, 04:54 AM   #12
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,232

Rep: Reputation: 132Reputation: 132
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
 
Old 12-14-2009, 12:00 PM   #13
sumasage
LQ Newbie
 
Registered: Dec 2009
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by kdingo View Post

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.
My machine was compiling the kernel and my machine crashed. My computer just restart. Now when boot up it get to where it said starting Virtual Box kernel module (something like that, i dont remember the message correctly) then the machine just restart again.

How do i fix it? Anyway to restore the previous kernel?

Thanks for any helps.
 
Old 10-30-2010, 03:04 PM   #14
bigstack
LQ Newbie
 
Registered: Oct 2010
Distribution: CentOS 6.2
Posts: 25

Rep: Reputation: 0
I get this when i run

Code:
/etc/init.d/vboxdrv setup
this come up

Code:
[root@191474 yum.repos.d]# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules                         [  OK  ]
Uninstalling old VirtualBox DKMS kernel modules            [  OK  ]
Trying to register the VirtualBox kernel modules using DKMS
Error! Your kernel headers for kernel 2.6.35.4-grsec-hostnoc-4.3.0-x86_64-libata cannot be found at
/lib/modules/2.6.35.4-grsec-hostnoc-4.3.0-x86_64-libata/build or /lib/modules/2.6.35.4-grsec-hostnoc-4.3.0-x86_64-libata/source.
                                                           [FAILED]
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules                      [FAILED]
  (Look at /var/log/vbox-install.log to find out what went wrong)
[root@191474 yum.repos.d]#
[root@191474 yum.repos.d]#          You will not be able to start VMs until this problem is fixed.
I have searched all over the place i have tried everything that people have posted. I think there might be something wrong with my Kernel i am new to Linux idk how to update that and also i notice that my repos are looking at my data-center idk how to make them look at the CentOS ones or how to tell it to look there first. I played around with Priority for a bit and fixed a few problems.

Please Help
AIM: Bigstack14
Skype: Bigstack14
 
Old 01-18-2011, 07:04 AM   #15
kbensch
LQ Newbie
 
Registered: Oct 2004
Posts: 5

Rep: Reputation: 0
This fixed it for me:

sudo yum -y install kernel-PAE-devel.i686

Kobus
 
  


Reply

Tags
centos, centos5, pae, recompilation, virtualbox, xen


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:02 PM
How to install latest version of Firefox on CentOS Dmjmusser Linux - Software 3 02-20-2007 12:02 PM
How do I upgrade to latest version of J2RE using YUM on CentOS 4.4? Dmjmusser Linux - Server 1 02-08-2007 01:06 PM
The latest kernel version? outshined Red Hat 3 07-17-2006 06:46 PM
What is the latest version of GenToo with the 2.4.x kernel? abefroman Linux - Distributions 4 11-23-2005 07:01 AM


All times are GMT -5. The time now is 11:32 AM.

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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration