Bug 110063

Summary: /sbin/new-kernel-pkg has awk error and creates bad grub entry
Product: [Fedora] Fedora Reporter: Thomas J. Baker <tjb>
Component: mkinitrdAssignee: Jeremy Katz <katzj>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-14 19:31:14 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:

Description Thomas J. Baker 2003-11-14 16:40:26 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031030 Galeon/1.3.10

Description of problem:
Ever since I upgraded to fedora-core-1 from the beta, I've been unable
to run any new 2.6 test kernels. They were always crashing during boot
complaining about a missing device. I also noticed an awk error
message during the rpm install. I tracked it down to this:

[root@katratzi tjb]#  /sbin/new-kernel-pkg --mkinitrd --depmod
--install 2.6.0-0.test9.1.87smp
awk: cmd. line:1: $2 == "/
awk: cmd. line:1:       ^ unterminated string
[root@katratzi tjb]#

The line in questions seems to be this:

    rootdevice=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1;
}}' /etc/fstab)



Version-Release number of selected component (if applicable):
mkinitrd-3.5.14-1, kernel-smp-2.6.0-0.test9.1.87

How reproducible:
Always

Steps to Reproduce:
1. install fedora core
2. try to install a 2.6.0 test kernel
3.
    

Actual Results:  the post install script complains with the awk error
message above and the kernel crashes at boot because of a missing device

Expected Results:  the new kernel boots and speeds up the system ten fold.

Additional info:

Comment 1 Jeremy Katz 2003-11-14 17:54:59 UTC
What does your /etc/fstab look like?

Comment 2 Thomas J. Baker 2003-11-14 19:31:14 UTC
The fstab was broken in that it had duplicate entries for most of the
disks. I was merging and old and new fstab and must have been
interrupted, leaving both complete fstabs in one file. Sorry...