Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 90155 - mkinitrd fails mysteriously when fstab has multiple entries for /
mkinitrd fails mysteriously when fstab has multiple entries for /
Product: Red Hat Linux
Classification: Retired
Component: mkinitrd (Show other bugs)
athlon Linux
medium Severity medium
: ---
: ---
Assigned To: Jeremy Katz
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2003-05-03 14:12 EDT by D. Hugh Redelmeier
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-05-16 18:04:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description D. Hugh Redelmeier 2003-05-03 14:12:25 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
I mistakenly had two entries for / in /etc/fstab.  As a result, when I installed
an updated kernel RPM, I got the following mysterious message:
# rpm -iv redhat-9up/athlon/kernel-2.4.20-9.athlon.rpm
Preparing packages for installation...
awk: cmd. line:1: $2 == "rhl9
awk: cmd. line:1:       ^ unterminated string

I tracked this down to the script /sbin/new-kernel-pkg:
71          label=$(echo $rootdevice | cut -d= -f2)
72          device=$(echo "showlabels" | /sbin/nash  --force --quiet |
73                          awk '$2 == "'$label'" {print $1}')

This last line becomes malformed after the substitution of $label because $label
contains multiple tokens.  To make the code more robust, enclose the variable
reference in double quotes:
73                          awk '$2 == "'"$label"'" {print $1}')
This should prevent the very obscure message but does nothing to properly report
the problem.

Version-Release number of selected component (if applicable):

How reproducible:
Didn't try but should happen every time.

Steps to Reproduce:
1.have two entries in /etc/fstab for /
2.directly or indirectly run mkinitrd

Additional info:
Comment 1 Jeremy Katz 2003-05-16 18:04:41 EDT
Made it so that we only look at the first entry for / in /etc/fstab, even though
I consider it to be a broken setup.

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