LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   grub entry after new kernel installation (https://www.linuxquestions.org/questions/centos-111/grub-entry-after-new-kernel-installation-4175527713/)

circus78 12-08-2014 02:07 PM

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

Ztcoracat 12-08-2014 05:07 PM

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/

circus78 12-09-2014 06:03 AM

Quote:

Originally Posted by Ztcoracat (Post 5281576)
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.

Head_on_a_Stick 12-09-2014 10:07 AM

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.

John VV 12-09-2014 12:58 PM

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" )

circus78 12-09-2014 03:46 PM

Quote:

Originally Posted by Head_on_a_Stick (Post 5281976)
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 (Post 5281976)
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 (Post 5281976)
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 (Post 5282063)
A question?
What was the exact command you used?

yum update, as usual!

circus78 12-09-2014 04:02 PM

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?


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