Brunner, Brian T. wrote:
[mailto:centos-bounces@centos.org] On Behalf Of Aleksey Tsalolikhin
Hi. I just noticed I had a CentOS 5.3 system that I updated to CentOS 5.5 a few days ago, and I just ran "yum -y update" again to get the latest kernel, and I just noticed it still has the old 2.6.18-128 kernel instead of the new 2.6.18-194.17. What gives?
/etc/grub.conf points at 2.6.18-194.17, but when I reboot, 2.6.18-128 comes up.
myserver# yum -y update ... myserver# reboot .....
myserver# uname -a Linux hwd-ddc-sonydb-prod 2.6.18-128.4.1.el5 #1 SMP Tue Aug 4 20:19:25 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux myserver# cat /etc/grub.conf # 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/md1 # initrd /initrd-version.img #boot=/dev/md0 default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title CentOS (2.6.18-194.17.1.el5)
Caveat: I am not a grub guru, and don't play one on TV. This is the only "title" line in your grub.conf, so it's the only entry in your grub.conf as far as grub cares.
root (hd0,0) kernel /vmlinuz-2.6.18-194.17.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.17.1.el5.img title CentOS
(2.6.18-194.11.4.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.11.4.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.11.4.el5.img title CentOS (2.6.18-128.4.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-128.4.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-128.4.1.el5.img myserver# rpm -q kernel
This is the last kernel line, so it's the one that grub acts on. Result: You boot 2.6.18-128.4.1.el5
<snip> Huh? default is 0, so it will go against the first title, not the last. Wait - I haven't been following this over the weekend, so I can't tell if someone's email has run the lines together. The first entry has to be
title CentOS (2.6.18-194.17.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.17.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.17.1.el5.img
with the next "title" on the next line.
mark
I can't tell if someone's email has run the lines together. The first entry has to be
title CentOS (2.6.18-194.17.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.17.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.17.1.el5.img
with the next "title" on the next line.
BINGO! Only one time did the word 'title' appear in his grub.conf.
So I looked at the LAST not FIRST 'kernel' line after 'title' and noted that the 'kernel' info there matched what actually booted.
I surmise that grub reads the title-to-title section top-to-bottom discarding any earlier 'kernel' line if it hits a subsequent 'kernel' line. ******************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. www.Hubbell.com - Hubbell Incorporated**
From: "Brunner, Brian T." BBrunner@gai-tronics.com
I can't tell if someone's email has run the lines together. The first entry has to be
title CentOS (2.6.18-194.17.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.17.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.17.1.el5.img
with the next "title" on the next line.
BINGO! Only one time did the word 'title' appear in his grub.conf. So I looked at the LAST not FIRST 'kernel' line after 'title' and noted that the 'kernel' info there matched what actually booted. I surmise that grub reads the title-to-title section top-to-bottom discarding any earlier 'kernel' line if it hits a subsequent 'kernel' line.
From his original post:
default=0 ... title CentOS (2.6.18-194.17.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.17.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.17.1.el5.img
title CentOS (2.6.18-194.11.4.el5) root (hd0,0) kernel /vmlinuz-2.6.18-194.11.4.el5 ro root=/dev/md1 initrd /initrd-2.6.18-194.11.4.el5.img
title CentOS (2.6.18-128.4.1.el5) root (hd0,0) kernel /vmlinuz-2.6.18-128.4.1.el5 ro root=/dev/md1 initrd /initrd-2.6.18-128.4.1.el5.img
JD
On Mon, Oct 4, 2010 at 8:27 AM, Brunner, Brian T. BBrunner@gai-tronics.com wrote:
BINGO! Only one time did the word 'title' appear in his grub.conf.
So I looked at the LAST not FIRST 'kernel' line after 'title' and noted that the 'kernel' info there matched what actually booted.
I surmise that grub reads the title-to-title section top-to-bottom discarding any earlier 'kernel' line if it hits a subsequent 'kernel' line.
NOT.
The "boot=/dev/xxx" and "default=0" lines tell grub which kernel to boot from which device, and it looks for the title with that reference, 0-origin. Only if that boot fails does grub look elsewhere for what to do. This is fairly well documented in 'info grub.'
The (far) more likely explanation is either that the md raid is messed up or there are multiple possible boot partitions that do not match what the machine sees and what the user is looking at.
Mark
BINGO! Only one time did the word 'title' appear in his grub.conf.
Well ... Only once did it appear on the left margin as the start-of-line. Thanks, M$ Outlook, for deciding how to format the message.
So the rest of the surmising was based on a false reading. Sorry folks.
grub look elsewhere for what to do. This is fairly well documented in 'info grub.'
That's part of why. 'info' has never been my friend, and probably never will. 1: man 2: google (the campus<->Internet link is broken today) 3: Forgetit. Info is too 'emacs-like' and to 'vi-addict-indifferent' as I've experienced it to be worth the time and frustration to find things. HTML docs (a la ntp/Wikipedia) are far more readable/searchable. That's my weakness, YMMV.
******************************************************************* This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept for the presence of computer viruses. www.Hubbell.com - Hubbell Incorporated**
Mark wrote:
On Mon, Oct 4, 2010 at 8:27 AM, Brunner, Brian T. BBrunner@gai-tronics.com wrote:
BINGO! Only one time did the word 'title' appear in his grub.conf.
So I looked at the LAST not FIRST 'kernel' line after 'title' and noted that the 'kernel' info there matched what actually booted.
I surmise that grub reads the title-to-title section top-to-bottom discarding any earlier 'kernel' line if it hits a subsequent 'kernel' line.
NOT.
The "boot=/dev/xxx" and "default=0" lines tell grub which kernel to boot from which device, and it looks for the title with that reference, 0-origin. Only if that boot fails does grub look elsewhere for what to do. This is fairly well documented in 'info grub.'
The (far) more likely explanation is either that the md raid is messed up or there are multiple possible boot partitions that do not match what the machine sees and what the user is looking at.
I was sorta considering suggesting he run grub-install, and see if that fixed it.
mark