Bug 509918 - grubby copies the wrong grub.conf stanza
grubby copies the wrong grub.conf stanza
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mkinitrd (Show other bugs)
5.4
All Linux
low Severity medium
: rc
: ---
Assigned To: Peter Jones
Release Test Team
hp:dl785solblk
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-06 16:38 EDT by Aron Griffis
Modified: 2010-07-01 23:25 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-07-01 23:25:04 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aron Griffis 2009-07-06 16:38:44 EDT
Description of problem:
Updated from RHEL5.4 alpha to beta using yum.  Yes I realize this isn't supported but it serves to demonstrate a bug in grubby.

I originally had two config stanzas in grub.conf:

title Red Hat Enterprise Linux Server (2.6.18-152.el5xen)
	root (hd0,1)
	kernel /xen.gz-2.6.18-152.el5 com2=115200 console=com2
	module /vmlinuz-2.6.18-152.el5xen ro root=/dev/vg0/rhel5.4 console=ttyS0,115200
	module /initrd-2.6.18-152.el5xen.img
	savedefault
title Red Hat Enterprise Linux Server-base (2.6.18-152.el5)
	root (hd0,1)
	kernel /vmlinuz-2.6.18-152.el5 ro root=/dev/vg0/rhel5.4 console=ttyS1,115200
	initrd /initrd-2.6.18-152.el5.img
	savedefault

The yum upgrade prepended the following two, which is correct:

title Red Hat Enterprise Linux Server (2.6.18-155.el5xen)
    root (hd0,1)
    kernel /xen.gz-2.6.18-155.el5 com2=115200 console=com2
    module /vmlinuz-2.6.18-155.el5xen ro root=/dev/vg0/rhel5.4 console=ttyS0,115200
    module /initrd-2.6.18-155.el5xen.img
    savedefault
title Red Hat Enterprise Linux Server (2.6.18-155.el5)
    root (hd0,1)
    kernel /vmlinuz-2.6.18-155.el5 ro root=/dev/vg0/rhel5.4 console=ttyS0,115200
    initrd /initrd-2.6.18-155.el5.img
    savedefault

The problem here is the difference in the serial console lines:

    module /vmlinuz-2.6.18-152.el5xen ro root=/dev/vg0/rhel5.4 console=ttyS0,115200
    kernel /vmlinuz-2.6.18-152.el5 ro root=/dev/vg0/rhel5.4 console=ttyS1,115200
    module /vmlinuz-2.6.18-155.el5xen ro root=/dev/vg0/rhel5.4 console=ttyS0,115200
    kernel /vmlinuz-2.6.18-155.el5 ro root=/dev/vg0/rhel5.4 console=ttyS0,115200

Note that in the non-Xen case, the 152.el5 kernel has console=ttyS1,115200 and the 155.el5 kernel has console=ttyS0,115200.  Grubby seems to have copied the config from 152.el5xen to 155.el5, which leaves the serial console inoperable.  This results in extra reboots and manual edits to get things working right.

Version-Release number of selected component (if applicable):
RHEL 5.4 beta
mkinitrd-5.1.19.6-54.x86_64
kernel-2.6.18-152.el5.x86_64
kernel-2.6.18-155.el5.x86_64

Expected results:
-    kernel /vmlinuz-2.6.18-155.el5 ro root=/dev/vg0/rhel5.4 console=ttyS0,115200
+    kernel /vmlinuz-2.6.18-155.el5 ro root=/dev/vg0/rhel5.4 console=ttyS1,115200

Additional info:
(confession) I (re)wrote the grubby code related to this a couple releases ago, so I'm somewhat responsible.  If I can find time to look into the bug, I will.
Comment 1 Denise Dumas 2009-07-06 17:02:48 EDT
Hi Aron, 
Given the 5.4 schedule and resource constraints here, and since this doesn't appear to be a regression, I'm going to propose this for 5.5. If you come up with a patch in the next week, we could maybe squeak it in, but unlikely. Thanks for the good description. 
Denise
Comment 2 RHEL Product and Program Management 2010-07-01 23:25:04 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.