Bug 171872 - mkinitrd can produce broken linuxrc file
mkinitrd can produce broken linuxrc file
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: mkinitrd (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
:
Depends On:
Blocks: 181409
  Show dependency treegraph
 
Reported: 2005-10-27 06:41 EDT by Bastien Nocera
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2006-0315
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-10 17:10:17 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 Bastien Nocera 2005-10-27 06:41:03 EDT
+++ 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@redhat.com>

-- Additional comment from bnocera@redhat.com on 2005-10-27 06:39 EST --
Created an attachment (id=120458)
example-fstab
Comment 4 Bob Johnson 2006-04-11 11:49:21 EDT
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 17:10:18 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 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.