Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-30-2008, 11:55 PM
|
#1
|
Member
Registered: Mar 2008
Distribution: Fedora 11
Posts: 72
Rep:
|
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.
|
|
|
06-01-2008, 06:33 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,417
|
Install the kernel-devel package for your currently running kernel?
|
|
|
06-01-2008, 07:34 AM
|
#3
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,414
|
Maybe read the user manual that came with the package ???.
Particularly chapter 2, Installation - covers what unSpawn mentioned, plus more.
|
|
|
06-04-2008, 11:42 AM
|
#4
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
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.
|
|
|
06-14-2008, 01:53 PM
|
#5
|
LQ Newbie
Registered: Jun 2005
Location: WA
Distribution: openSUSE 10.3, CentOS 5
Posts: 7
Rep:
|
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.
|
|
|
06-11-2009, 04:46 AM
|
#6
|
LQ Newbie
Registered: Jun 2009
Posts: 9
Rep:
|
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.
|
|
|
06-11-2009, 04:50 AM
|
#7
|
LQ Newbie
Registered: Jun 2009
Posts: 9
Rep:
|
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
|
|
|
06-27-2009, 11:20 AM
|
#8
|
Member
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 112
Rep:
|
Quote:
Originally Posted by YouNix
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 '
|
|
|
|
10-20-2009, 02:04 AM
|
#9
|
Senior Member
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Rep:
|
I am facing same issue?
|
|
|
10-21-2009, 06:25 AM
|
#10
|
Member
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 112
Rep:
|
^Give details about your system(OS, VBox version etc)
|
|
|
10-22-2009, 04:23 AM
|
#11
|
LQ Newbie
Registered: Jun 2009
Posts: 9
Rep:
|
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
|
|
|
10-22-2009, 04:54 AM
|
#12
|
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,278
Rep: 
|
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
|
|
|
12-14-2009, 12:00 PM
|
#13
|
LQ Newbie
Registered: Dec 2009
Posts: 3
Rep:
|
Quote:
Originally Posted by kdingo
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.
|
|
|
10-30-2010, 03:04 PM
|
#14
|
LQ Newbie
Registered: Oct 2010
Distribution: CentOS 6.2
Posts: 25
Rep:
|
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
|
|
|
01-18-2011, 07:04 AM
|
#15
|
LQ Newbie
Registered: Oct 2004
Posts: 5
Rep:
|
This fixed it for me:
sudo yum -y install kernel-PAE-devel.i686
Kobus
|
|
|
All times are GMT -5. The time now is 05:25 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|