LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 12-08-2014, 02:07 PM   #1
circus78
Member
 
Registered: Dec 2011
Posts: 273

Rep: Reputation: Disabled
grub entry after new kernel installation


Hi,
few days ago I installed new kernel with yum (official CentOS repo):

Code:
grep kernel /var/log/yum.log

..
Nov 13 04:47:17 Installed: kernel-2.6.32-504.1.3.el6.x86_64
..
After reboot, I noticed that OLD kernel is still loaded:

Code:
# uname -r
2.6.32-71.el6.x86_64
This is my /boot/grub/grub.conf (only first lines)

Code:
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-504.1.3.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.1.3.el6.x86_64 ro root=/dev/mapper/vg_server-lv_root rd_DM_UUID=ddf1_4c53492020202020808627c3000000004711471100000a28 rd_LVM_LV=vg_server/lv_root rd_LVM_LV=vg_server/lv_swap rd_NO_LUKS rd_NO_MD LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=it crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-504.1.3.el6.x86_64.img
So, why is kernel 2.6.32-71 loaded, if the first one should be 2.6.32-504?
Thank you
 
Old 12-08-2014, 05:07 PM   #2
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
I don't know why the older kernel is loading and I find that odd becuase the output clearly shows you installed a new one.

At one point I had 5 kernels in my Grub Menu so I change the limit to =2 by editing the
/etc/yum.conf file.

If you set it to one I don't know which kernel Grub will list first.
When your system boots you should be able to choose which kernel you want to boot with your arrow keys-

This might help.
http://www.if-not-true-then-false.co...-red-hat-rhel/
 
Old 12-09-2014, 06:03 AM   #3
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
I don't know why the older kernel is loading and I find that odd becuase the output clearly shows you installed a new one.

At one point I had 5 kernels in my Grub Menu so I change the limit to =2 by editing the
/etc/yum.conf file.

If you set it to one I don't know which kernel Grub will list first.
When your system boots you should be able to choose which kernel you want to boot with your arrow keys-

This might help.
http://www.if-not-true-then-false.co...-red-hat-rhel/
Hi, it's a remote server, at this moment I have no way to use KVM or so.
Very strange. I manage several CentOS machines, it's the first time I have this kind of issue.
 
Old 12-09-2014, 10:07 AM   #4
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
Are you multi-booting?

It could be that another distro has "control" of the bootloader (ie the last system to `grub-install` will determine which distro's grub.cfg is parsed).

If you post the content of /boot/grub/grub.cfg (rather than grub.conf) we could be sure.

I don't use CentOS, however -- did you run `update-grub` (or `grub-mkconfig -o /boot/grub/grub.cfg`)?

From grub.conf:
Quote:
If you change this file, run 'update-grub' afterwards to update /boot/grub/grub.cfg.
 
Old 12-09-2014, 12:58 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
few days ago I installed new kernel with yum (official CentOS repo):
A question?
What was the exact command you used?

the normal command would not do that

Code:
su -
yum update

or
did you try REPLACING the default kernel with a different one ?
if you did that
you would need to also replace the headers and the source
then rebuild the bootimage ( cent6 uses "dracut" )
 
Old 12-09-2014, 03:46 PM   #6
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Head_on_a_Stick View Post
Are you multi-booting?

It could be that another distro has "control" of the bootloader (ie the last system to `grub-install` will determine which distro's grub.cfg is parsed).
Hi, it's a server, no multi-boot.

Quote:
Originally Posted by Head_on_a_Stick View Post
If you post the content of /boot/grub/grub.cfg (rather than grub.conf) we could be sure.
I have no such file:

Code:
# ls /boot/grub/
device.map     fat_stage1_5  grub.conf         jfs_stage1_5  minix_stage1_5     splash.xpm.gz  stage2         vstafs_stage1_5
e2fs_stage1_5  ffs_stage1_5  iso9660_stage1_5  menu.lst      reiserfs_stage1_5  stage1         ufs2_stage1_5  xfs_stage1_5
Quote:
Originally Posted by Head_on_a_Stick View Post
From grub.conf:

I don't use CentOS, however -- did you run `update-grub` (or `grub-mkconfig -o /boot/grub/grub.cfg`)?
Yeah, but on other CentOS machine, this is done automatically.

---------- Post added 12-09-14 at 04:47 PM ----------

Quote:
Originally Posted by John VV View Post
A question?
What was the exact command you used?
yum update, as usual!
 
Old 12-09-2014, 04:02 PM   #7
circus78
Member
 
Registered: Dec 2011
Posts: 273

Original Poster
Rep: Reputation: Disabled
I noticed another strange thing.

I went to housing provider (luckily it is in the city where I live and rebooted the machine.
At grub prompt, I have JUST ONLY entry (2.6.32-71.el6.x86_64).

This is my complete grub.conf:
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_tokyo-lv_root
#          initrd /initrd-[generic-]version.img
#boot=/dev/ddf1_4c53492020202020808627c3000000004711471100000a28
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
#hiddenmenu
title CentOS (2.6.32-504.1.3.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.1.3.el6.x86_64 ro root=/dev/mapper/vg_tokyo-lv_root rd_DM_UUID=ddf1_4c53492020202020808627c3000000004711471100000a28 rd_LVM_LV=vg_tokyo/lv_root rd_LVM_LV=vg_tokyo/lv_swap rd_NO_LUKS rd_NO_MD LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=it crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-504.1.3.el6.x86_64.img
title CentOS (2.6.32-504.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/vg_tokyo-lv_root rd_DM_UUID=ddf1_4c53492020202020808627c3000000004711471100000a28 rd_LVM_LV=vg_tokyo/lv_root rd_LVM_LV=vg_tokyo/lv_swap rd_NO_LUKS rd_NO_MD LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=it crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-504.el6.x86_64.img
title CentOS (2.6.32-431.29.2.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-431.29.2.el6.x86_64 ro root=/dev/mapper/vg_tokyo-lv_root rd_DM_UUID=ddf1_4c53492020202020808627c3000000004711471100000a28 rd_LVM_LV=vg_tokyo/lv_root rd_LVM_LV=vg_tokyo/lv_swap rd_NO_LUKS rd_NO_MD LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=it crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-431.29.2.el6.x86_64.img
title CentOS (2.6.32-431.23.3.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-431.23.3.el6.x86_64 ro root=/dev/mapper/vg_tokyo-lv_root rd_DM_UUID=ddf1_4c53492020202020808627c3000000004711471100000a28 rd_LVM_LV=vg_tokyo/lv_root rd_LVM_LV=vg_tokyo/lv_swap rd_NO_LUKS rd_NO_MD LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=it crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-431.23.3.el6.x86_64.img
title CentOS (2.6.32-71.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/vg_tokyo-lv_root rd_DM_UUID=ddf1_4c53492020202020808627c3000000004711471100000a28 rd_LVM_LV=vg_tokyo/lv_root rd_LVM_LV=vg_tokyo/lv_swap rd_NO_LUKS rd_NO_MD LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=it crashkernel=auto rhgb quiet
        initrd /initramfs-2.6.32-71.el6.x86_64.img
This is the output of mount command:

Code:
# mount
/dev/mapper/vg_tokyo-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdb1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
I suspect that grub configuration is updated every time only on /dev/sda, not on /dev/sdb.
This server has "hardware" sata raid.
What do you think?
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Grub entry for multi-partition installation cu3ba11 Linux - General 8 11-03-2013 08:25 PM
How do I need to format grub entry to boot from grub2 into grub legacy? mitchell7man Linux - Software 6 04-03-2010 03:03 AM
add a entry for new kernel to grub theacerguy Linux - Kernel 4 08-09-2009 03:07 AM
how to find kernel for distro to create grub entry msc8127 Linux - Newbie 13 03-15-2009 05:00 AM
kernel 2.6 installation, lilo to grub? b0uncer Slackware 27 11-28-2006 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 11:34 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