Bug 509568 - /sbin/weak-modules erroneously creates a multiboot grub entry for domU
Summary: /sbin/weak-modules erroneously creates a multiboot grub entry for domU
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: module-init-tools
Version: 5.4
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Jon Masters
QA Contact: BaseOS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-03 16:38 UTC by john.haxby@oracle.com
Modified: 2010-03-30 08:25 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 08:25:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
A patch to fix this problem. (515 bytes, patch)
2009-07-03 16:38 UTC, john.haxby@oracle.com
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0242 0 normal SHIPPED_LIVE module-init-tools bug fix update 2010-03-29 12:43:04 UTC

Description john.haxby@oracle.com 2009-07-03 16:38:54 UTC
Created attachment 350445 [details]
A patch to fix this problem.

Description of problem:


Version-Release number of selected component (if applicable): 3.3-0.pre3.1.53.el5


How reproducible: every time


Steps to Reproduce:
1. either create a kmod rpm that will install modules that belong in the initrd
   or arrange for /sbin/weak-modules to believe that it needs to update the
   initrd by removing it (for example).
2. When /sbin/weak-modules is run from the post-install kmod rpm script it will
   correctly decide that the initrd needs to be rebuilt but will incorrectly
   detect a xen domU as needing a multiboot grub entry
  
Actual results: As above


Expected results: A domU that will boot :-)


Additional info:

The problem is that the "kernel_is_xen" test in /sbin/weak-modules assumes that if the kernel version ends with "xen" this this is a xen kernel and needs a multiboot grub entry.  The inference is wrong: the same xen kernel is used for both dom0 and domU.  The fix (attached) augments the kernel_is_xen test with the same test that kernel-xen's post install script uses.

Of course, you don't need a kmod rpm to trigger this problem -- any out of date or missing initrd will cause the initrd to be re-created and a new grub entry written.  I originally reproduced the problem by installing a kmod for fuse having deliberately made the current initrd out of date by changing modprobe.conf.

The same patch will also fix the same bug in RHEL 5.3.

Comment 1 john.haxby@oracle.com 2009-08-24 17:36:13 UTC
I've changed the priority to "high" -- it occurs to me that a machine suddenly becoming unbootable is pretty serious to some people.

It would be nice if this relatively simple fix made it into 5.4.

Comment 8 errata-xmlrpc 2010-03-30 08:25:06 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2010-0242.html


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