Bug 509568 - /sbin/weak-modules erroneously creates a multiboot grub entry for domU
/sbin/weak-modules erroneously creates a multiboot grub entry for domU
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: module-init-tools (Show other bugs)
5.4
All Linux
low Severity high
: rc
: ---
Assigned To: Jon Masters
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-03 12:38 EDT by john.haxby@oracle.com
Modified: 2010-03-30 04:25 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-30 04:25:06 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)
A patch to fix this problem. (515 bytes, patch)
2009-07-03 12:38 EDT, john.haxby@oracle.com
no flags Details | Diff

  None (edit)
Description john.haxby@oracle.com 2009-07-03 12:38:54 EDT
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 13:36:13 EDT
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 04:25:06 EDT
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.