This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 180372 - new-kernel-pkg trips during FC-4 yum update with awk error
new-kernel-pkg trips during FC-4 yum update with awk error
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-02-07 13:39 EST by Andrew Cagney
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 5.0.29-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-27 11:35:17 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Andrew Cagney 2006-02-07 13:39:45 EST
Description of problem:

During yum update of the kernel, this is error appears:

  Installing: kernel                       ####################### [18/42]
awk: $2 == "/
awk:       ^ unterminated string


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

cagney@localhost$ rpm -q kernel mkinitrd
kernel-2.6.11-1.1369_FC4.i686
kernel-2.6.14-1.1656_FC4.i686
kernel-2.6.15-1.1830_FC4.i686
mkinitrd-4.2.15-1.i386

How reproducible:

always


Steps to Reproduce:
1.yum update with a new kernel, such as:
 kernel                  i686       2.6.15-1.1830_FC4  updates-released   15 M
 kernel-devel            i686       2.6.15-1.1830_FC4  updates-released  4.3 M

Actual results:

resultant kernel doesn't boot, suspect this is reason

Expected results:

able to boot kernel

Additional info:

cagney@localhost$ cat /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
/dev/hda8               /                       ext3    defaults        1 1
#LABEL=/boot             /boot                   ext3    defaults        1 2
/dev/hda3               /boot                   ext3    defaults        1 2
/dev/devpts             /dev/pts                devpts  gid=5,mode=620  0 0
/dev/shm                /dev/shm                tmpfs   defaults        0 0
#LABEL=/home             /home                   ext3    defaults        1 2
/dev/hda9               /home                   ext3    defaults        1 3
/dev/proc               /proc                   proc    defaults        0 0
/dev/sys                /sys                    sysfs   defaults        0 0
#LABEL=/usr              /usr                    ext3    defaults        1 2
/dev/hda5               /usr                    ext3    defaults        1 3
#LABEL=/var              /var                    ext3    defaults        1 2
/dev/hda7               /var                    ext3    defaults        1 3
#LABEL=\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff\uffff
  swap                    swap    defaults        0 0
/dev/hda6               swap                    swap    defaults        0 0
none                    /tmp                    tmpfs   defaults        0 0
[internal nfs mounts chopped :-)]

# sh -x /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install
2.6.15-1.1830_FC4
+
PATH=/sbin:/bin:/usr/kerberos/sbin:/home/scratch/gcc/install/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/cagney/bin:/sbin:/usr/sbin:/usr/kerberos/bin
+ lilo=/sbin/lilo
+ kernelName=vmlinuz
+ '[' -x ./grubby ']'
+ grubby=/sbin/grubby
+ '[' -f /etc/sysconfig/kernel ']'
+ . /etc/sysconfig/kernel
++ UPDATEDEFAULT=yes
++ DEFAULTKERNEL=kernel
+ cfgGrub=
+ cfgLilo=
+ runLilo=
+ grubConfig=
++ uname -m
+ ARCH=i686
+ '[' i686 = ia64 ']'
+ '[' i686 = ppc64 -o i686 = ppc ']'
+ '[' i686 = sparc -o i686 = sparc64 ']'
+ '[' i686 = s390 -o i686 = s390x ']'
+ liloConfig=/etc/lilo.conf
+ grubConfig=/boot/grub/grub.conf
+ bootPrefix=/boot
+ liloFlag=lilo
+ isx86=yes
+ mode=
+ version=
+ initrd=
+ initrdfile=
+ moddep=
+ verbose=
+ makedefault=
+ package=
+ mbkernel=
+ mbargs=
+ '[' 6 -gt 0 ']'
+ case $1 in
+ echo --package
+ grep =
+ package=kernel
+ shift
+ shift
+ '[' 4 -gt 0 ']'
+ case $1 in
+ initrd=make
+ shift
+ '[' 3 -gt 0 ']'
+ case $1 in
+ moddep=make
+ shift
+ '[' 2 -gt 0 ']'
+ case $1 in
+ '[' -z '' ']'
+ mode=--install
+ shift
+ '[' 1 -gt 0 ']'
+ case $1 in
+ '[' -z --install ']'
+ '[' -z '' ']'
+ version=2.6.15-1.1830_FC4
+ shift
+ '[' 0 -gt 0 ']'
+ '[' --install '!=' --install -a --install '!=' --remove ']'
+ '[' -z 2.6.15-1.1830_FC4 ']'
+ '[' --install '!=' --install -a '' ']'
++ echo
++ cut -d . -f 1,2
+ kernelmajor=
+ '[' i686 = ppc64 -o i686 = ppc ']'
+ '[' -z '' ']'
++ uname -m
+ '[' i686 = ia64 ']'
+ initrdfile=/boot/initrd-2.6.15-1.1830_FC4.img
+ '[' -n '' ']'
+ '[' --install == --install -a yes == yes -a -n kernel -a -n kernel -a kernel
== kernel ']'
+ makedefault=--make-default
+ '[' -n '' ']'
+ '[' make == make ']'
+ doDepmod
+ '[' -n '' ']'
+ depmod -ae -F /boot/System.map-2.6.15-1.1830_FC4 2.6.15-1.1830_FC4
+ '[' make == make ']'
+ mkinitrd
+ '[' -n '' ']'
+ /sbin/mkinitrd --allow-missing -f /boot/initrd-2.6.15-1.1830_FC4.img
2.6.15-1.1830_FC4
+ rc=0
+ '[' 0 '!=' 0 ']'
+ '[' '!' -x /sbin/grubby ']'
+ '[' -n /boot/grub/grub.conf ']'
+ '[' -f /boot/grub/grub.conf ']'
+ cfgGrub=1
+ '[' -n /etc/lilo.conf ']'
+ '[' -f /etc/lilo.conf ']'
+ '[' -n '' -a -n yes ']'
+ '[' --install == --install ']'
+ install
+ '[' '!' -f /boot/vmlinuz-2.6.15-1.1830_FC4 ']'
+ INITRD=
+ '[' -f /boot/initrd-2.6.15-1.1830_FC4.img ']'
+ '[' -n '' ']'
+ INITRD='--initrd /boot/initrd-2.6.15-1.1830_FC4.img'
+ '[' -d /proc/iSeries ']'
++ awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/fstab
+ rootdevice='LABEL=/
/dev/hda8'
++ echo LABEL=/ /dev/hda8
++ cut -d= -f1
+ short=LABEL
+ '[' LABEL == LABEL ']'
++ echo LABEL=/ /dev/hda8
++ cut -d= -f2
++ head -n 1
+ label='/ /dev/hda8'
++ echo showlabels
++ /sbin/nash --force --quiet
++ awk '$2 == "/' '/dev/hda8" {print $1}'
awk: $2 == "/
awk:       ^ unterminated string
+ device=
+ '[' -z '' ']'
++ mount
++ awk '$3 == "/" { print $1 }'
+ rootdevice=/dev/hda8
+ '[' -n '' ']'
+ '[' -n 1 ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -f /etc/redhat-release ']'
++ sed 's/ release.*$//'
+ title='Fedora Core (2.6.15-1.1830_FC4)'
+ /sbin/grubby --add-kernel=/boot/vmlinuz-2.6.15-1.1830_FC4 --initrd
/boot/initrd-2.6.15-1.1830_FC4.img --copy-default --make-default --title 'Fedora
Core (2.6.15-1.1830_FC4)' '--args=root=/dev/hda8 ' '--remove-kernel=TITLE=Fedora
Core (2.6.15-1.1830_FC4)'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ exit 0

notting's pointed out that, in above, notice how, label is:

label='/ /dev/hda8'

and that is fed into awk vis:

 awk '$2 == "'$label'" {print $1}'
Comment 1 Andrew Cagney 2006-02-07 13:42:02 EST
Commenting out the LABEL= line appears to make the problem go vis:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
#LABEL=/                 /                       ext3    defaults        1 1
/dev/hda8               /                       ext3    defaults        1 1

wonder if that boots ...
Comment 2 Andrew Cagney 2006-02-07 15:01:09 EST
(In reply to comment #1)
> Commenting out the LABEL= line appears to make the problem go vis:
> 
> # This file is edited by fstab-sync - see 'man fstab-sync' for details
> #LABEL=/                 /                       ext3    defaults        1 1
> /dev/hda8               /                       ext3    defaults        1 1
> 
> wonder if that boots ...

finally and successfully running new kernel, just leaves above problem
Comment 3 Peter Jones 2006-02-27 11:35:17 EST
Should be fixed in 5.0.29-1

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