Bug 90155
| Summary: | mkinitrd fails mysteriously when fstab has multiple entries for / | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | D. Hugh Redelmeier <hugh> |
| Component: | mkinitrd | Assignee: | Jeremy Katz <katzj> |
| Status: | CLOSED RAWHIDE | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 9 | CC: | hugh |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | athlon | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2003-05-16 22:04:41 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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. |
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... kernel-2.4.20-9 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): mkinitrd-3.4.42-1 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 3. Additional info: