Bug 509918 - grubby copies the wrong grub.conf stanza
Summary: grubby copies the wrong grub.conf stanza
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: mkinitrd
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Peter Jones
QA Contact: Release Test Team
URL:
Whiteboard: hp:dl785solblk
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-06 20:38 UTC by Aron Griffis
Modified: 2010-07-02 03:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-07-02 03:25:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Aron Griffis 2009-07-06 20:38:44 UTC
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 21:02:48 UTC
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 Program Management 2010-07-02 03:25:04 UTC
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.