Bug 515555 - F-12-Alpha-TC - mkofboot doesn't return the proper exit code
Summary: F-12-Alpha-TC - mkofboot doesn't return the proper exit code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: yaboot
Version: rawhide
Hardware: ppc64
OS: Linux
low
high
Target Milestone: ---
Assignee: David Woodhouse
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F12Alpha, F12AlphaBlocker
TreeView+ depends on / blocked
 
Reported: 2009-08-04 18:13 UTC by James Laska
Modified: 2013-09-02 06:37 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-08-11 19:27:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
anaconda.log (65.92 KB, text/plain)
2009-08-04 18:13 UTC, James Laska
no flags Details
bash -x mkofboot -f -C /boot/etc/yaboot.conf (7.92 KB, text/plain)
2009-08-04 18:14 UTC, James Laska
no flags Details
program.log (74.85 KB, text/plain)
2009-08-04 18:15 UTC, James Laska
no flags Details
storage.log (106.80 KB, text/plain)
2009-08-04 18:15 UTC, James Laska
no flags Details
syslog (29.42 KB, text/plain)
2009-08-04 18:16 UTC, James Laska
no flags Details
Test patch to fix the return value of raw_install() in mkofboot (335 bytes, patch)
2009-08-07 01:10 UTC, Tony Breeds
no flags Details | Diff

Description James Laska 2009-08-04 18:13:47 UTC
Created attachment 356219 [details]
anaconda.log

Description of problem:

 * Installation on an IBM Power5 ppc64 system fails at the bootloader step.

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

 * anaconda-12.7

How reproducible:


Steps to Reproduce:

 * https://fedoraproject.org/wiki/QA/TestCases/UserInterfaceText
  
Actual results:

              ┌───────────────────┤ Warning ├───────────────────┐
              │                                                 │
              │ There was an error installing the bootloader.   │
              │ The system may not be bootable.                 │
              │                                                 │
              │                     ┌────┐                      │
              │                     │ OK │                      │
              │                     └────┘                      │
              │                                                 │
              │                                                 │
              └─────────────────────────────────────────────────┘

Expected results:

 * Bootloader installs correctly

Additional info:

 * Running mkofboot by hand from the chroot yields:

sh-4.0# /sbin/mkofboot -f -C /boot/etc/yaboot.conf         
sh-4.0# echo $?
1

Comment 1 James Laska 2009-08-04 18:14:33 UTC
Created attachment 356220 [details]
bash -x mkofboot -f -C /boot/etc/yaboot.conf

Comment 2 James Laska 2009-08-04 18:15:27 UTC
Created attachment 356221 [details]
program.log

Comment 3 James Laska 2009-08-04 18:15:46 UTC
Created attachment 356222 [details]
storage.log

Comment 4 James Laska 2009-08-04 18:16:05 UTC
Created attachment 356223 [details]
syslog

Comment 5 James Laska 2009-08-04 18:24:02 UTC
Adding for review during Fedora Alpha blocker bug meeting.

Comment 6 James Laska 2009-08-04 18:45:43 UTC
This defect appears to block all installations of F-12-Alpha on ppc64.

Comment 7 James Laska 2009-08-07 00:37:15 UTC
Further investigation with Chris Lumens highlights that the mkofboot command
is not returning a proper exit code.  The command returns '1' (fail) when
called with the default expected arguments.  The command returns '0' (pass)
when running with a -v|--verbose parameter.  This is similar to the ybin issue discovered by koan (see https://bugzilla.redhat.com/show_bug.cgi?id=508969#c5).  Reassigning to yaboot.

sh-4.0# chroot /mnt/sysimage /bin/sh
sh-4.0# /sbin/mkofboot  -v -f -C /boot/etc/yaboot.conf 
mkofboot: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/sda1...
mkofboot: Installation successful
mkofboot: Installation complete.
sh-4.0# echo $?
0

sh-4.0# /sbin/mkofboot  -f -C /boot/etc/yaboot.conf 
sh-4.0# echo $?
1

sh-4.0# /sbin/mkofboot  -v -f -C /boot/etc/yaboot.conf 
mkofboot: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/sda1...
mkofboot: Installation successful
mkofboot: Installation complete.
sh-4.0# echo $?
0

Comment 8 Tony Breeds 2009-08-07 01:10:50 UTC
Created attachment 356605 [details]
Test patch to fix the return value of raw_install() in mkofboot

Please test this patch.

Comment 9 Jesse Keating 2009-08-07 02:23:45 UTC
This definitely seems to be a ppc64 only thing.  a ppc32 install on a macmini works just fine.

Comment 10 James Laska 2009-08-07 14:16:05 UTC
Testing the suggested patch yields the expected result:

# /sbin/mkofboot -f -C /boot/etc/yaboot.conf  ; echo $?
0

# /sbin/mkofboot -v -f -C /boot/etc/yaboot.conf  ; echo $?
mkofboot: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/sda1...
mkofboot: Installation successful
mkofboot: Installation complete.
0

Comment 11 Roman Rakus 2009-08-07 17:05:41 UTC
Fixed in yaboot-1.3.14-15.fc12

Comment 12 Jesse Keating 2009-08-07 17:24:11 UTC
re-opening until it is actually tagged for the Alpha.

Comment 13 James Laska 2009-08-07 19:47:12 UTC
Did this patch apply correctly?  I'm not seeing the change in the new package when I install it on my ppc64 system, or inspect it manually with rpm2cpio?

Did this not apply correctly during build?

Comment 14 James Laska 2009-08-07 19:48:46 UTC
# rpm -q yaboot
yaboot-1.3.14-15.fc12.ppc

# /sbin/mkofboot -f -C /boot/etc/yaboot.conf ; echo $?
1

Comment 15 James Laska 2009-08-07 20:25:47 UTC
Updated ...

According to notting, /sbin/mkofboot is a symlink to /sbin/ybin which caused the patch to not apply during build.

Tested a scratch build from notting and confirmed the fix (see http://koji.fedoraproject.org/koji/taskinfo?taskID=1589941).

Comment 16 Bill Nottingham 2009-08-07 20:59:14 UTC
Fixed in -16.fc12.

Comment 17 James Laska 2009-08-11 19:27:57 UTC
VERIFIED in rawhide-20090811

sh-4.0# grep anaconda.version /tmp/anaconda.log
18:54:18 INFO    : anaconda version 12.13 on ppc starting

sh-4.0# rpm -q yaboot
yaboot-1.3.14-16.fc12.ppc


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