Bug 171872 - mkinitrd can produce broken linuxrc file
Summary: mkinitrd can produce broken linuxrc file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Peter Jones
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks: 181409
TreeView+ depends on / blocked
 
Reported: 2005-10-27 10:41 UTC by Bastien Nocera
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2006-0315
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-10 21:10:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2006:0315 0 normal SHIPPED_LIVE mkinitrd bug fix update 2006-08-09 04:00:00 UTC

Description Bastien Nocera 2005-10-27 10:41:03 UTC
+++ This bug was initially created as a clone of Bug #171871 +++

Present in RHEL3 (mkinitrd-3.5.13-6.1) and RHEL4 (mkinitrd-4.2.1.6-1).

1. Run mkinitrd on the attached fstab
2. the linuxrc will contain a 3 line root mount command:
 mount -o defaults
 defaults --ro -t ext3
 ext3 /dev/root /sysroot
instead of:
 mount -o default --ro -t ext3 /dev/root /sysroot

The fix is to replace the following awk commands:
 rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; }}' $fstab)
 rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; }}' $fstab)
with:
 rootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $3; exit }}' $fstab)
 rootopts=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $4; exit }}' $fstab)

(Notice the exit after the print statement)

"Patch" by Martin Poole <mpoole>

-- Additional comment from bnocera on 2005-10-27 06:39 EST --
Created an attachment (id=120458)
example-fstab

Comment 4 Bob Johnson 2006-04-11 15:49:21 UTC
This issue is on Red Hat Engineering's list of planned work items 
for the upcoming Red Hat Enterprise Linux 4.4 release.  Engineering 
resources have been assigned and barring unforeseen circumstances, Red 
Hat intends to include this item in the 4.4 release.

Comment 7 Red Hat Bugzilla 2006-08-10 21:10:18 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 the 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-2006-0315.html



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