LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with kernel sources (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-kernel-sources-791438/)

jonaskellens 02-25-2010 02:49 AM

Problem with kernel sources
 
When compiling software I get the following notice :
Quote:

You do not appear to have the sources for the 2.6.31.5xls-domU kernel installed
.

Yum says :

Quote:

Package kernel-headers-2.6.18-164.11.1.el5.x86_64 already installed and latest version
Package kernel-devel-2.6.18-164.11.1.el5.x86_64 already installed and latest version
But uname says :
Code:

-bash-3.2# ls /usr/src/kernels/
2.6.18-164.11.1.el5-x86_64
-bash-3.2# uname -a
Linux vds.hosting.net 2.6.31.5xls-domU #4 SMP Fri Dec 4 12:17:04 CET 2009 x86_64 x86_64 x86_64 GNU/Linux

Extra info :
Quote:

title CentOS (2.6.18-164.11.1.el5xen)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-164.11.1.el5xen ro root=/dev/xvda1 console=xvc0
initrd /boot/initrd-2.6.18-164.11.1.el5xen.img
This is a VDS I'm renting from my Hosting company.

How can I get the right sources ?? RPMforge repo ??

zhjim 02-25-2010 04:04 AM

Your mixing up the kernel version. The one that the software ones has a "domU" inside its name. The source you have installed does not.

Take a close look at the uname -a output of yours and you'll see

Code:

uname -a | awk '{print $3}'

jonaskellens 02-25-2010 04:45 AM

Quote:

Originally Posted by zhjim (Post 3876119)
Your mixing up the kernel version. The one that the software ones has a "domU" inside its name. The source you have installed does not.

Take a close look at the uname -a output of yours and you'll see

Code:

uname -a | awk '{print $3}'

Yes the kernel sources are not the same as the kernel version that is running.

My question : Where do I get the right sources ??

knudfl 02-25-2010 04:58 AM

Quote:

Where do I get the right sources ??
Where did you get the 2.6.31.5xls-domU kernel ? ?

Obviously not a CentOS kernel ....
.. and Googling .. 2.6.31.5xls-domU ..
Or .. linux-2.6.31.5xls-domU ..
.. kernel-2.6.31.5xls-domU ..

provides zero hits !
.....

i92guboj 02-25-2010 05:12 AM

You can do either of these:
  • Install the sources from the same place you installed the binary kernel, same exact version, and I mean "exact".
  • Install a new kernel and a new source package using the CentOS official package manager and repositories. Probably the easiest and sanest solution unless you are using a custom kernel for a real reason.
  • Compile your own. That way you ensure that your sources and your kernel binary image are in sync.

jonaskellens 02-25-2010 05:35 AM

Quote:

Originally Posted by knudfl (Post 3876151)
Where did you get the 2.6.31.5xls-domU kernel ? ?
.....

Like I said in my first post : this is a VDS that I'm renting with a hosting company.

I have contacted my hosting company and asked for another kernel to run or to install the sources of the current running kernel version.

jonaskellens 02-25-2010 07:30 AM

This is the file /boot/grub/menu.lst :

Quote:

title CentOS (2.6.18-164.11.1.el5xen)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-164.11.1.el5xen ro root=/dev/xvda1 console=xvc0
initrd /boot/initrd-2.6.18-164.11.1.el5xen.img
This is /boot :

Code:

-bash-3.2# ls
> config-2.6.18-128.1.6.el5      initrd-2.6.18-164.11.1.el5xen.img  symvers-2.6.18-92.1.18.el5.gz      vmlinuz-2.6.18-164.11.1.el5
> config-2.6.18-164.11.1.el5      initrd-2.6.18-164.el5.img          symvers-2.6.18-92.1.22.el5.gz      vmlinuz-2.6.18-164.11.1.el5xen
> config-2.6.18-164.11.1.el5xen  initrd-2.6.18-92.1.18.el5.img      System.map-2.6.18-128.1.6.el5      vmlinuz-2.6.18-164.el5
> config-2.6.18-164.el5          initrd-2.6.18-92.1.22.el5.img      System.map-2.6.18-164.11.1.el5    vmlinuz-2.6.18-92.1.18.el5
> config-2.6.18-92.1.18.el5      message                            System.map-2.6.18-164.11.1.el5xen  vmlinuz-2.6.18-92.1.22.el5
> config-2.6.18-92.1.22.el5      symvers-2.6.18-128.1.6.el5.gz      System.map-2.6.18-164.el5          xen.gz-2.6.18-164.11.1.el5
> grub                            symvers-2.6.18-164.11.1.el5.gz    System.map-2.6.18-92.1.18.el5      xen-syms-2.6.18-164.11.1.el5
> initrd-2.6.18-128.1.6.el5.img  symvers-2.6.18-164.11.1.el5xen.gz  System.map-2.6.18-92.1.22.el5
> initrd-2.6.18-164.11.1.el5.img  symvers-2.6.18-164.el5.gz          vmlinuz-2.6.18-128.1.6.el5

Code:

-bash-3.2# uname -a
Linux vds.hosting.net 2.6.31.5xls-domU #4 SMP Fri Dec 4 12:17:04 CET 2009 x86_64 x86_64 x86_64 GNU/Linux

Where is this 2.6.31.5xls-domU coming from ???

jonaskellens 02-25-2010 09:24 AM

How do you explain this :

Code:

You do not appear to have the sources for the 2.6.18-164.11.1.el5xen kernel installed.
make[1]: *** [modules] Error 1
-bash-3.2# uname -a
Linux vds.hosting.net 2.6.18-164.11.1.el5xen #1 SMP Wed Jan 20 08:06:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
-bash-3.2# ls /usr/src/kernels/
2.6.18-164.11.1.el5-x86_64

Isn't the kernel the same this time ???

Code:

Package kernel-devel-2.6.18-164.11.1.el5.x86_64 already installed and latest version
Package kernel-headers-2.6.18-164.11.1.el5.x86_64 already installed and latest version


TB0ne 02-25-2010 10:11 AM

Quote:

Originally Posted by jonaskellens (Post 3876405)
How do you explain this :

Code:

You do not appear to have the sources for the 2.6.18-164.11.1.el5xen kernel installed.
make[1]: *** [modules] Error 1
-bash-3.2# uname -a
Linux vds.hosting.net 2.6.18-164.11.1.el5xen #1 SMP Wed Jan 20 08:06:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
-bash-3.2# ls /usr/src/kernels/
2.6.18-164.11.1.el5-x86_64

Isn't the kernel the same this time ???

Code:

Package kernel-devel-2.6.18-164.11.1.el5.x86_64 already installed and latest version
Package kernel-headers-2.6.18-164.11.1.el5.x86_64 already installed and latest version


This:
Quote:

2.6.18-164.11.1.el5xen
isn't the same as this:
Quote:

kernel-devel-2.6.18-164.11.1.el5
Notice the missing "xen" at the end??? And if this is a hosted server, tell the hosting company to install the missing source. You're paying them for support.

zhjim 02-26-2010 04:28 AM

dunno if you know but a Xen domU does not need to have the kernel inside it's own realm. It only is needed for the dom0 to start it up..

I doubt in this case that you could easily create your own kernel and start it up.

Like TBone sad get the hosting company to provide you the source. Or check out your yum repository. (also i dunno how to query yum for available packages)

jonaskellens 02-26-2010 04:53 AM

Quote:

Originally Posted by TB0ne (Post 3876436)
Notice the missing "xen" at the end???

The 2.6.31.5xls-domU seems to be coming from a central server. It is setup that way that there is always a kernel to boot, even if I install my own and mess up.

Got my custom kernel now.

Got the right sources by doing "yum install kernel-xen-devel".

All works ok. Thanks for the reply.


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