LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (http://www.linuxquestions.org/questions/red-hat-31/)
-   -   Uname shows wrong kernel (http://www.linuxquestions.org/questions/red-hat-31/uname-shows-wrong-kernel-4175444814/)

dewanggaba 01-09-2013 07:55 AM

Uname shows wrong kernel
 
Hello there,

I've installed new centos 6.2 box minimal. Then, upgrade to centos 6.3 via yum update. The default kernel is .220 and after upgrade, my box are updated to 2.6.32-279.19.1.el6.x86_64.

After yum update finished, I reboot the box and shock, this is the value.

Code:

$ uname -ar
Linux localhost 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I switch to default kernel .220 shows normal like this

Code:

Linux localhost 2.6.32-220.el6.x86_64
Code:

[root@localhost ~]# rpm -qa | grep kernel
dracut-kernel-004-284.el6_3.1.noarch
kernel-devel-2.6.32-279.19.1.el6.x86_64
kernel-2.6.32-279.19.1.el6.x86_64
kernel-headers-2.6.32-279.19.1.el6.x86_64
kernel-2.6.32-220.el6.x86_64
kernel-firmware-2.6.32-279.19.1.el6.noarch

I start to remove stock kernel and only the new kernel installed.

Code:

[root@localhost ~]# rpm -qa | grep kernel
dracut-kernel-004-284.el6_3.1.noarch
kernel-firmware-2.6.32-279.19.1.el6.noarch
kernel-2.6.32-279.19.1.el6.x86_64

Code:

$ uname -ar
Linux localhost 2.6.32-279.14.1.el6.x86_64 #1 SMP Tue Nov 6 23:43:09 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

So what should I do if I want to load the right kernel-2.6.32-279.19.1.el6.x86_64 ?

dewanggaba 01-09-2013 08:02 AM

Here is the grub menu.lst configuration :

Code:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_localhost-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/sdc
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-279.19.1.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-279.19.1.el6.x86_64 ro root=/dev/mapper/vg_localhost-lv_root rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD quiet SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_LVM_LV=vg_localhost/lv_swap rd_LVM_LV=vg_localhost/lv_root rd_NO_DM
        initrd /initramfs-2.6.32-279.19.1.el6.x86_64.img


wstewart 01-18-2013 01:01 AM

Sounds like something went wrong with the upgrade. I have yet to see one of those go smoothly. Maybe it's using the repo from an older version of CentOS but that's just speculation. What does "cat /etc/centos-release" read?

Edit: Also what do you get with "rpm -qi centos-release"?

If that shows an older version then try "yum update centos-release" then uninstall and reinstall the kernel. You'll need a backup kernel so you may need to get an older kernel from an rpm.

Also run "ls -al /boot/" to see if your kernel is a symbolic link pointing somewhere else. I've hear that sometimes the symbolic link doesn't get updated with an upgrade.

chrism01 01-20-2013 08:14 PM

Well, you've only got the latest kernel-2.6.32-279.19.1.el6.x86_64 in grub (and rpm), so just reboot.

BTW, updating minor versions eg 6.2 => 6.3 is no problem.
Its upgrades across major versions eg 5.x -> 6.x that are contra-indicated eg
https://access.redhat.com/knowledge/...ted_Notes.html

John VV 01-20-2013 08:51 PM

I have never had an issue upgrading from one minor to the next

Now , if you have 6.2 AS the repo folder in the repo file and NOT 6
then there might be problems
something like this will cause some problems
-----------
http://ftp.scientificlinux.org/linux/scientific/6.2/$basearch/os/
---------

part of my SL 6.3 sl.repo
baseurl=http://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/os/

export "releasever"

Code:

yum --releasever=6.3 upgrade

wstewart 01-21-2013 05:17 AM

Quote:

Originally Posted by John VV (Post 4874388)
I have never had an issue upgrading from one minor to the next

Now , if you have 6.2 AS the repo folder in the repo file and NOT 6
then there might be problems
something like this will cause some problems
-----------
http://ftp.scientificlinux.org/linux/scientific/6.2/$basearch/os/
---------

part of my SL 6.3 sl.repo
baseurl=http://ftp.scientificlinux.org/linux/scientific/$releasever/$basearch/os/

export "releasever"

Code:

yum --releasever=6.3 upgrade

That's what I was suspecting may have been the problem. I was thinking maybe the centos-release package may need to be updated as I believe that's what controls the $releasever variable.


All times are GMT -5. The time now is 07:24 PM.