LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-11-2016, 09:24 AM   #1
nasirjavaid
LQ Newbie
 
Registered: Nov 2015
Posts: 15

Rep: Reputation: Disabled
Different version of kernel and kernel headers shown by uname -r and rpm query


Hi,

OS: CentOS 6.8

I am preparing system for freepbx installation and package dahdi needs kernel headers and devel packages. But when I try to install kernel-headers and devel packages then system says they are already installed and latest. Upon checking I found that kernel version and headers version is different

[root@voip ~]# rpm -qa | grep -i kernel
abrt-addon-kerneloops-2.0.8-40.el6.centos.x86_64
kernel-firmware-2.6.32-642.6.1.el6.noarch
kernel-2.6.32-642.6.1.el6.x86_64
libreport-plugin-kerneloops-2.0.9-32.el6.centos.x86_64
dracut-kernel-004-409.el6_8.2.noarch
kernel-headers-2.6.32-642.6.1.el6.x86_64

[root@voip ~]# uname -a
Linux voip.secureserver.net 2.6.32-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@voip ~]#

[root@voip ~]# yum install kernel-headers
Package kernel-headers-2.6.32-642.6.1.el6.x86_64 already installed and latest version
(same is with kernel-devel.)

[root@voip ~]# ls -l /boot/
total 31752
-rw-r--r-- 1 root root 108107 Oct 4 17:41 config-2.6.32-642.6.1.el6.x86_64
drwxr-xr-x 3 root root 4096 Oct 11 00:36 efi
drwxr-xr-x 2 root root 4096 Mar 22 2016 grub
-rw------- 1 root root 25282851 Oct 11 00:40 initramfs-2.6.32-642.6.1.el6.x86_64.img
-rw-r--r-- 1 root root 215530 Oct 4 17:41 symvers-2.6.32-642.6.1.el6.x86_64.gz
-rw-r--r-- 1 root root 2618532 Oct 4 17:41 System.map-2.6.32-642.6.1.el6.x86_64
-rwxr-xr-x 1 root root 4269008 Oct 4 17:41 vmlinuz-2.6.32-642.6.1.el6.x86_64

System has cpanel and related libraries also installed . Can someone please shed some light on it that why its like this? I have googled around but haven't found a solution.

Many Thanks.
 
Old 10-11-2016, 10:15 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You're not running a CentOS kernel, and you appear to be running on an OpenVZ VM. Contact your VPS provider.
 
Old 10-11-2016, 11:01 AM   #3
nasirjavaid
LQ Newbie
 
Registered: Nov 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Yes I also suspect its openvz but running "cat /etc/redhat-release" shows it as Centos 6.8. Please see below.

[root@voip ~]# cat /etc/redhat-release
CentOS release 6.8 (Final)

Why is there difference in kernel versions shown by both commands.. what kind of support to be expected from provider?
Thanks.
 
Old 10-11-2016, 07:34 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
You may be running CentOS, but you're not running a CentOS kernel, so of course the headers won't match. You're running a kernel provided by your VPS provider. Figure out how to run a CentOS kernel and/or ask your provider for help.
 
Old 10-11-2016, 08:25 PM   #5
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
What makes you think not matching the version is a bad thing?
 
Old 10-11-2016, 09:11 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Why not just update your machine to the current kernel, and re-boot?

https://www.liquidweb.com/kb/how-to-...entos-red-hat/

https://www.unixmen.com/install-late...el-centos-6-7/

Last edited by Ztcoracat; 10-11-2016 at 09:23 PM.
 
Old 10-12-2016, 02:31 AM   #7
nasirjavaid
LQ Newbie
 
Registered: Nov 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
@AluCardZero: I don't think not matching kernel is a bad thing but when I install kernel-headers, it always installs for kernel-2.6.32-642.6.1.el6.x86_64 while it is expected to be installed for 2.6.32-042stab092.3. Now that is the only issue I have with mismatching kernels.

@Ztcoracat: I have already tried first link and tried updating kernel with yum update kernel but its not working. However I will try your second link and get back to you incase of any query.

Thank you guys for helping me out here.
 
Old 10-12-2016, 03:12 AM   #8
nasirjavaid
LQ Newbie
 
Registered: Nov 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
Tried the second link but still same issue. Imported and installed key and repo fine but when I issue the command to install kernel, it says

Package kernel-2.6.32-642.6.1.el6.x86_64 already installed and latest version while uname shows kernel as
[root@voip ~]# uname -a
Linux voip 2.6.32-042stab092.3 #1 SMP Sun Jul 20 13:27:24 MSK 2014 x86_64 x86_64 x86_64 GNU/Linux


I want to update this kernel 2.6.32-042stab092.3....

I have downloaded required kernel headers and devel packages from http://opennodecloud.com/CentOS/6/opennode/

but when I install them they give warning warning: vzkernel-devel-2.6.32-042stab092.3.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID a7a1d4b6: NOKEY .. It looks like they are no longer compatible with CentOS 6 and I have to update kernel and its headers+devel packages.

strange thing is that both devel and headers are shown as installed but still not listed by yum.

[root@voip src]# rpm -qa | grep -i kernel
abrt-addon-kerneloops-2.0.8-40.el6.centos.x86_64
vzkernel-devel-2.6.32-042stab092.3.x86_64
kernel-firmware-2.6.32-642.6.1.el6.noarch
kernel-2.6.32-642.6.1.el6.x86_64
libreport-plugin-kerneloops-2.0.9-32.el6.centos.x86_64
vzkernel-headers-2.6.32-042stab092.3.x86_64
dracut-kernel-004-409.el6_8.2.noarch


[root@voip src]# yum list kernel-headers
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: centos.mirrors.hoobly.com
* elrepo: mirrors.evowise.com
* epel: mirror.prgmr.com
* extras: mirror.supremebytes.com
* ius: mirrors.kernel.org
* updates: mirrors.evowise.com
Available Packages
kernel-headers.x86_64 2.6.32-642.6.1.el6 updates

Any thoughts?
 
Old 10-12-2016, 03:38 AM   #9
nasirjavaid
LQ Newbie
 
Registered: Nov 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
I have added vzkernel repo and installed latest stable kernel

---> Package vzkernel.x86_64 0:2.6.32-042stab117.16 will be installed


strangly I have only splash.xpm.gz in /boot/grub folder
 
Old 10-14-2016, 09:47 AM   #10
nasirjavaid
LQ Newbie
 
Registered: Nov 2015
Posts: 15

Original Poster
Rep: Reputation: Disabled
I have skipped DAHDI installation as it was the one who needed sources.
 
Old 10-14-2016, 03:16 PM   #11
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Look in /boot and see if the matching kernel is there. If it is, then update the grub files to include it in the grub menu. Then, when you boot, use the matching kernel. Or you might need to manually configure grub if centos still uses grub1.

Last edited by AwesomeMachine; 10-14-2016 at 03:19 PM.
 
Old 10-14-2016, 10:17 PM   #12
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Depending on how many partitions you set up ie /root, /boot, /home and /swap......
Check that /etc/fstab/ is using the right partition.
 
Old 10-14-2016, 10:34 PM   #13
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
OpenVZ host provides/shares the kernel with its guest VMs. Any kernel you installed will be comletely ignored by your VM.
 
  


Reply

Tags
devel, headers, kernel, rpm, uname



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
kernel headers & /lib/modules/uname -r/build fof3 Linux - Newbie 4 12-16-2008 02:58 PM
uname returns incorrect kernel version mszenher Slackware - Installation 4 12-22-2005 05:23 AM
uname -r reports wrong kernel version branque Fedora 5 09-16-2005 10:26 AM
'uname -a' gives old kernel version j91935 Debian 7 04-12-2004 03:10 PM
uname kernel version sk8ercool2001 Linux - Software 1 04-07-2004 10:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration