Description of problem: If a user attempts to kickstart a PPC box via Koan, koan will successfully initiate the kickstart (downloading the initrd/vmlinuz, placing the appropriate entries into yaboot, etc.), but when it calls /sbin/ybin, ybin returns with an return code of 1, causing Koan to report failure. Version-Release number of selected component (if applicable): 530, 6/25 build How reproducible: Always Steps to Reproduce: 1. Register a PPC box to a Satellite with PPC content synced 2. Initiate a kickstart and run it via rhn_check -vvv 3. View results Actual results: As in attached rhn_check output Expected results: Successful initialization Additional info:
Hopefully we can figure this out.
Steve, is this a ppc or ppc64 system?
Ok, so, the last command that failed was /sbin/ybin. Steve/Wes, can we get the output from /sbin/ybin --verbose --debug? James thinks this command might not be needed on non-Apple hardware and from looking at http://git.fedorahosted.org/git/?p=spacewalk.git;a=tree;f=client/tools/rhn-kickstart/rhnkickstart;h=ff31cb8fc3afb10b4dfae851b795ec37e82572d5;hb=HEAD it looks like Satellite did not call it before so that may be true. However, in the event that this command is important (I am not sure) I do not want to simply remove it. Let's see the about from above and then I can (if needed) supply a patch (and new build if needed) that removes the check for the return code from "ybin". Either way I do not think the fix is complicated, but want to have a bit more data before proceeding so we understand what we're doing. Thanks!
Additionally, I think it's ok to just run that command after it fails on the system it failed on -- no need to test a patch or anything yet. If you don't want to run the above, a SSH session is all I'll need to check.
This is interesting, return codes differ based on flags: - applying ybin changes - ['/sbin/ybin'] rc=1 - ['/sbin/ybin', '--verbose', '--debug'] ybin: Embedding CHRP note section in temp yaboot... ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda1... ybin: Installation successful rc=0 So, it's a ybin bug. This can be fixed by telling koan to use those flags but IMHO is not the best fix. I'm happy to do it through we should also see that there is a bug filed against ybin (probably part of the yaboot package)
Adding rrakus. (Hi!) Basically we have a problem with ybin's return code and want to know more about what it does and... (A) Should we only be calling ybin in certain conditions? (B) Why would ybin be returning non-zero, but zero with --verbose and --debug added, and does this indicate a problem in yaboot? (C) What should our workaround be to avoid this problem... for even if we make changes in the bootloader (if required), we have to have this working in current versions? Ignoring the return code seems easy but might cause other problems so we want to understand more. James Laska thinks that it is possible ybin only needs to be called on Apple hardware, though the manpage does not seem to indicate this. Further the output from --debug and --verbose seems to show success even when run on non-Apple hardware, so it seems to be doing things. The previous version of Satellite did not call ybin, so I'm uncertain when it should be run and when it should not. You can see where it is being called by searching for ybin in http://git.fedorahosted.org/git/cobbler?p=cobbler;a=blob_plain;f=koan/app.py;hb=c44d5c3c794857bbf7ad2f84154250f9f35717d6
Adding upstream yaboot maintainer Tony Breeds. Tony, not sure what your thoughts are on the previous comment (https://bugzilla.redhat.com/show_bug.cgi?id=508969#c9).
(B) Maybe it is really bug in ybin. ybin is shell script. Can you provide output of `bash -x "/sbin/ybin"? This would be more helpful to locate when ybin is returning non-zero status even if successfully installed. (C) If it will not be bug yaboot package, workaround can be to check output (look for `ybin: Installation successful') (A) ybin should tell if you are doing anything bad. So if you don't met any condition, ybin should tell you. trust this helps you. Also output from command in (B) will be helpful.
btw, forgot to say Hi! :)
Maybe better try this: 1) /bin/sh -x "/sbin/ybin" 2) echo $? ad 1) And check which shell is /bin/sh. Maybe ybin is called from shell other than bash ad 2) And this check return code. I hope that these two lines >cmd = [ "/sbin/ybin" ] >utils.subprocess_call(cmd) means that yaboot just call `/sbin/ybin' And one final idea - any selinux alert?
If we have the code call bash -x /sbin/ybin we get: [root@ibm-js20-5 ~]# koan --replace-self --server=fjs-0-04.rhndev.redhat.com --profile=myppcgoodness:2:Phil-Collins - looking for Cobbler at http://fjs-0-04.rhndev.redhat.com/cobbler_api - reading URL: http://fjs-0-04.rhndev.redhat.com/cblr/svc/op/ks/profile/myppcgoodness:2:Phil-Collins install_tree: http://fjs-0-04.rhndev.redhat.com/ks/dist/ks-rhel-ppc-server-5-u2 downloading initrd ramdisk.image.gz to /boot/ramdisk.image.gz url=http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/ramdisk.image.gz - reading URL: http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/ramdisk.image.gz downloading kernel vmlinuz to /boot/vmlinuz url=http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/vmlinuz - reading URL: http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/vmlinuz grubby: bad argument --bootloader-probe: unknown option - ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz', '--initrd', '/boot/ramdisk.image.gz', '--args', '"ks=http://fjs-0-04.rhndev.redhat.com/cblr/svc/op/ks/profile/myppcgoodness:2:Phil-Collins ksdevice=link kssendmac lang= text "', '--copy-default', '--make-default', '--title=kick1246483582', '--yaboot'] rc=0 - applying ybin changes - ['bash', '-x', '/sbin/ybin'] + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin + '[' -n '' ']' + PRG=ybin + ABSPRG=/sbin/ybin + SIGINT='ybin: Interrupt caught ... exiting' + VERSION=1.3.13 + DEBUG=0 + VERBOSE=0 + TMP=/tmp + export LC_COLLATE=C + LC_COLLATE=C + '[' -x /usr/sbin/ofpath ']' + OFPATH=ofpath + trap cleanup 0 + trap 'exit 129' 1 + trap 'echo 1>&2 ybin: Interrupt caught ... exiting ; exit 130' 2 + trap 'exit 131' 3 + trap 'exit 143' 15 + '[' -f /etc/yaboot.conf ']' + CONF=/etc/yaboot.conf + bootconf=/etc/yaboot.conf + ERR=' Error in /etc/yaboot.conf:' + boot=unconfigured + '[' -f /usr/local/lib/yaboot/yaboot ']' + '[' -f /usr/lib/yaboot/yaboot ']' + install=/usr/lib/yaboot/yaboot + usemount=no + cat /proc/cpuinfo + grep '^machine' + grep -q 'CHRP IBM' + fstype=raw + hfstype=tbxi + hfscreator=UNIX + bless=yes + protect=no + hide=no + nonvram=0 + defaultos=linux + brokenosx=no + cdrom=no + network=no + of=no + fgcolor=white + bgcolor=black + label=Linux + timeout=40 + image=/vmlinux + partition=3 + root=/dev/hda3 + device=hd: + case "$PRG" in ++ printf printf_test + '[' printf_test = printf_test ']' + PRINTF=printf + command -v id + true + command -v readlink + true + '[' 0 '!=' 0 ']' + '[' /etc/yaboot.conf = /dev/null ']' + confexist + '[' '!' -e /etc/yaboot.conf ']' + '[' '!' -f /etc/yaboot.conf ']' + '[' '!' -r /etc/yaboot.conf ']' + return 0 + '[' /etc/yaboot.conf = /dev/null ']' ++ parseconf ck boot ++ case "$1" in ++ grep '^boot[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' ++ parseconf str boot ++ case "$1" in +++ grep '^boot[\ ,=]' /etc/yaboot.conf ++ v=boot=/dev/hda1 ++ echo /dev/hda1 + boot=/dev/hda1 ++ parseconf ck ofboot ++ case "$1" in ++ grep '^ofboot[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf ck install ++ case "$1" in ++ grep '^install[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' ++ parseconf str install ++ case "$1" in +++ grep '^install[\ ,=]' /etc/yaboot.conf ++ v=install=/usr/lib/yaboot/yaboot ++ echo /usr/lib/yaboot/yaboot + install=/usr/lib/yaboot/yaboot ++ parseconf ck magicboot ++ case "$1" in ++ grep '^magicboot[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag usemount ++ case "$1" in ++ grep '^usemount\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf ck fstype ++ case "$1" in ++ grep '^fstype[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' ++ parseconf str fstype ++ case "$1" in +++ grep '^fstype[\ ,=]' /etc/yaboot.conf ++ v=fstype=raw ++ echo raw + fstype=raw ++ parseconf flag nobless ++ case "$1" in ++ grep '^nobless\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag protect ++ case "$1" in ++ grep '^protect\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag hide ++ case "$1" in ++ grep '^hide\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag nonvram ++ case "$1" in ++ grep '^nonvram\>' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' + nonvram=1 ++ parseconf ck hfstype ++ case "$1" in ++ grep '^hfstype[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck hfscreator ++ case "$1" in ++ grep '^hfscreator[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck mntpoint ++ case "$1" in ++ grep '^mntpoint[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck delay ++ case "$1" in ++ grep '^delay[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' ++ parseconf str delay ++ case "$1" in +++ grep '^delay[\ ,=]' /etc/yaboot.conf ++ v=delay=5 ++ echo 5 + delay=5 ++ parseconf ck timeout ++ case "$1" in ++ grep '^timeout[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' ++ parseconf str timeout ++ case "$1" in +++ grep '^timeout[\ ,=]' /etc/yaboot.conf ++ v=timeout=80 ++ echo 80 + timeout=80 ++ parseconf ck bsd ++ case "$1" in ++ grep '^bsd[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck macos ++ case "$1" in ++ grep '^macos[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck macosx ++ case "$1" in ++ grep '^macosx[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck darwin ++ case "$1" in ++ grep '^darwin[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck defaultos ++ case "$1" in ++ grep '^defaultos[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck fgcolor ++ case "$1" in ++ grep '^fgcolor[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck bgcolor ++ case "$1" in ++ grep '^bgcolor[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck icon ++ case "$1" in ++ grep '^icon[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf flag enablecdboot ++ case "$1" in ++ grep '^enablecdboot\>' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' + cdrom=yes ++ parseconf flag enablenetboot ++ case "$1" in ++ grep '^enablenetboot\>' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' + network=yes ++ parseconf flag enableofboot ++ case "$1" in ++ grep '^enableofboot\>' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' + of=yes ++ parseconf flag brokenosx ++ case "$1" in ++ grep '^brokenosx\>' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' + bootparts=0 + for i in '$boot' + bootparts=1 + '[' 1 -gt 1 ']' + '[' /dev/hda1 = unconfigured ']' + '[' /etc/yaboot.conf = /dev/null ']' + '[' ybin = mkofboot -a -n '' ']' + checkconf + '[' '!' -e /dev/hda1 ']' + '[' '!' -b /dev/hda1 -a '!' -f /dev/hda1 ']' + '[' '!' -w /dev/hda1 -o '!' -r /dev/hda1 ']' + '[' '!' -e /usr/lib/yaboot/yaboot ']' + '[' '!' -f /usr/lib/yaboot/yaboot ']' + '[' '!' -r /usr/lib/yaboot/yaboot ']' + '[' /etc/yaboot.conf = auto ']' + '[' '!' -e /etc/yaboot.conf ']' + '[' '!' -f /etc/yaboot.conf ']' + '[' '!' -r /etc/yaboot.conf ']' + '[' -n '' ']' + case "$fstype" in + '[' raw = hfs ']' + '[' raw = raw ']' + '[' -n '' ']' + '[' no = yes ']' + '[' -n '' ']' + '[' -n '' ']' + '[' -n '' ']' + '[' '!' -f /proc/uptime -a 1 = 0 ']' + '[' 1 = 0 ']' +++ cat /proc/cpuinfo +++ grep pmac-generation ++ v= ++ echo + '[' '' = NewWorld ']' +++ cat /proc/cpuinfo +++ grep pmac-generation ++ v= ++ echo + '[' '' = OldWorld ']' + cat /proc/cpuinfo + grep '^motherboard' + grep -q AAPL + cat /proc/cpuinfo + grep '^machine' + grep -q 'CHRP IBM' + nonvram=1 + ADDNOTE=yes + case "$fgcolor" in + fgc=f + case "$bgcolor" in + bgc=0 + '[' -z 5 ']' + '[' '' = 1 ']' + return 0 + '[' -n '' -o 1 = 0 ']' + grep -q '^[[:space:]]*password[[:space:]]*=' /etc/yaboot.conf + '[' no = yes -a -z '' ']' + '[' raw = hfs ']' + '[' -n '' -o 1 = 0 ']' + '[' /etc/yaboot.conf = auto ']' + '[' -n '' ']' + case "$PRG" in + case "$usemount" in + '[' raw = raw ']' + luserck ++ dd if=/dev/hda1 bs=1 skip=1 count=3 + '[' ELF = ELF ']' + return 0 + raw_install + mount + grep '^/dev/hda1\>' + '[' 1 = 0 ']' + local 'INSTALLPRIMARY=ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda1...' + '[' yes = yes ']' + hack_yaboot + local YBDIR=/usr/lib/yaboot + '[' -x /usr/lib/yaboot/addnote ']' ++ mktemp -q /tmp/yaboot.XXXXXX + TMPYABOOT=/tmp/yaboot.Z25722 + '[' 0 '!=' 0 ']' + cat /usr/lib/yaboot/yaboot + install=/tmp/yaboot.Z25722 + '[' 0 = 1 ']' + /usr/lib/yaboot/addnote /tmp/yaboot.Z25722 + '[' 0 '!=' 0 ']' + return 0 + '[' 0 = 1 ']' + dd if=/dev/zero of=/dev/hda1 bs=512 count=1600 + dd if=/tmp/yaboot.Z25722 of=/dev/hda1 bs=512 + '[' 0 '!=' 0 ']' + sync + sync + '[' 0 = 1 ']' + exit 1 + cleanup + '[' -n '' ']' + '[' -n '' ']' + '[' -n /tmp/yaboot.Z25722 ']' + rm -f /tmp/yaboot.Z25722 + '[' -d /tmp/bootstrap.25624 -a no = yes ']' + return 0 rc=1 - reboot to apply changes The "rc=1" line is printed by Cobbler. If we change that to add "/sbin/ybin --verbose --debug" we get: - looking for Cobbler at http://fjs-0-04.rhndev.redhat.com/cobbler_api - reading URL: http://fjs-0-04.rhndev.redhat.com/cblr/svc/op/ks/profile/myppcgoodness:2:Phil-Collins install_tree: http://fjs-0-04.rhndev.redhat.com/ks/dist/ks-rhel-ppc-server-5-u2 downloading initrd ramdisk.image.gz to /boot/ramdisk.image.gz url=http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/ramdisk.image.gz - reading URL: http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/ramdisk.image.gz downloading kernel vmlinuz to /boot/vmlinuz url=http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/vmlinuz - reading URL: http://fjs-0-04.rhndev.redhat.com/cobbler/images/ks-rhel-ppc-server-5-u2/vmlinuz grubby: bad argument --bootloader-probe: unknown option - ['/sbin/grubby', '--add-kernel', '/boot/vmlinuz', '--initrd', '/boot/ramdisk.image.gz', '--args', '"ks=http://fjs-0-04.rhndev.redhat.com/cblr/svc/op/ks/profile/myppcgoodness:2:Phil-Collins ksdevice=link kssendmac lang= text "', '--copy-default', '--make-default', '--title=kick1246483763', '--yaboot'] rc=0 - applying ybin changes - ['bash', '-x', '/sbin/ybin', '--debug', '--verbose'] + PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin + '[' -n '' ']' + PRG=ybin + ABSPRG=/sbin/ybin + SIGINT='ybin: Interrupt caught ... exiting' + VERSION=1.3.13 + DEBUG=0 + VERBOSE=0 + TMP=/tmp + export LC_COLLATE=C + LC_COLLATE=C + '[' -x /usr/sbin/ofpath ']' + OFPATH=ofpath + trap cleanup 0 + trap 'exit 129' 1 + trap 'echo 1>&2 ybin: Interrupt caught ... exiting ; exit 130' 2 + trap 'exit 131' 3 + trap 'exit 143' 15 + '[' -f /etc/yaboot.conf ']' + CONF=/etc/yaboot.conf + bootconf=/etc/yaboot.conf + ERR=' Error in /etc/yaboot.conf:' + boot=unconfigured + '[' -f /usr/local/lib/yaboot/yaboot ']' + '[' -f /usr/lib/yaboot/yaboot ']' + install=/usr/lib/yaboot/yaboot + usemount=no + cat /proc/cpuinfo + grep '^machine' + grep -q 'CHRP IBM' + fstype=raw + hfstype=tbxi + hfscreator=UNIX + bless=yes + protect=no + hide=no + nonvram=0 + defaultos=linux + brokenosx=no + cdrom=no + network=no + of=no + fgcolor=white + bgcolor=black + label=Linux + timeout=40 + image=/vmlinux + partition=3 + root=/dev/hda3 + device=hd: + case "$PRG" in ++ printf printf_test + '[' printf_test = printf_test ']' + PRINTF=printf + command -v id + true + command -v readlink + true + '[' 2 '!=' 0 ']' + true + case "$1" in + DEBUG=1 + ARGS=' --debug' + shift + true + case "$1" in + VERBOSE=1 + ARGS=' --debug --verbose' + shift + true + case "$1" in + break + '[' /etc/yaboot.conf = /dev/null ']' + confexist + '[' '!' -e /etc/yaboot.conf ']' + '[' '!' -f /etc/yaboot.conf ']' + '[' '!' -r /etc/yaboot.conf ']' + return 0 + '[' /etc/yaboot.conf = /dev/null ']' ++ parseconf ck boot ++ case "$1" in ++ grep '^boot[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' ++ parseconf str boot ++ case "$1" in +++ grep '^boot[\ ,=]' /etc/yaboot.conf ++ v=boot=/dev/hda1 ++ echo /dev/hda1 + boot=/dev/hda1 ++ parseconf ck ofboot ++ case "$1" in ++ grep '^ofboot[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf ck install ++ case "$1" in ++ grep '^install[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' ++ parseconf str install ++ case "$1" in +++ grep '^install[\ ,=]' /etc/yaboot.conf ++ v=install=/usr/lib/yaboot/yaboot ++ echo /usr/lib/yaboot/yaboot + install=/usr/lib/yaboot/yaboot ++ parseconf ck magicboot ++ case "$1" in ++ grep '^magicboot[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag usemount ++ case "$1" in ++ grep '^usemount\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf ck fstype ++ case "$1" in ++ grep '^fstype[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' ++ parseconf str fstype ++ case "$1" in +++ grep '^fstype[\ ,=]' /etc/yaboot.conf ++ v=fstype=raw ++ echo raw + fstype=raw ++ parseconf flag nobless ++ case "$1" in ++ grep '^nobless\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag protect ++ case "$1" in ++ grep '^protect\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag hide ++ case "$1" in ++ grep '^hide\>' /etc/yaboot.conf ++ echo 1 + '[' '' '!=' 1 -a 1 = 0 ']' ++ parseconf flag nonvram ++ case "$1" in ++ grep '^nonvram\>' /etc/yaboot.conf ++ echo 0 + '[' '' '!=' 1 -a 0 = 0 ']' + nonvram=1 ++ parseconf ck hfstype ++ case "$1" in ++ grep '^hfstype[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck hfscreator ++ case "$1" in ++ grep '^hfscreator[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck mntpoint ++ case "$1" in ++ grep '^mntpoint[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck delay ++ case "$1" in ++ grep '^delay[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' ++ parseconf str delay ++ case "$1" in +++ grep '^delay[\ ,=]' /etc/yaboot.conf ++ v=delay=5 ++ echo 5 + delay=5 ++ parseconf ck timeout ++ case "$1" in ++ grep '^timeout[\ ,=]' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' ++ parseconf str timeout ++ case "$1" in +++ grep '^timeout[\ ,=]' /etc/yaboot.conf ++ v=timeout=80 ++ echo 80 + timeout=80 ++ parseconf ck bsd ++ case "$1" in ++ grep '^bsd[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck macos ++ case "$1" in ++ grep '^macos[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck macosx ++ case "$1" in ++ grep '^macosx[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck darwin ++ case "$1" in ++ grep '^darwin[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck defaultos ++ case "$1" in ++ grep '^defaultos[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck fgcolor ++ case "$1" in ++ grep '^fgcolor[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck bgcolor ++ case "$1" in ++ grep '^bgcolor[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf ck icon ++ case "$1" in ++ grep '^icon[\ ,=]' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' ++ parseconf flag enablecdboot ++ case "$1" in ++ grep '^enablecdboot\>' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' + cdrom=yes ++ parseconf flag enablenetboot ++ case "$1" in ++ grep '^enablenetboot\>' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' + network=yes ++ parseconf flag enableofboot ++ case "$1" in ++ grep '^enableofboot\>' /etc/yaboot.conf ++ echo 0 + '[' 0 = 0 ']' + of=yes ++ parseconf flag brokenosx ++ case "$1" in ++ grep '^brokenosx\>' /etc/yaboot.conf ++ echo 1 + '[' 1 = 0 ']' + bootparts=0 + for i in '$boot' + bootparts=1 + '[' 1 -gt 1 ']' + '[' /dev/hda1 = unconfigured ']' + '[' /etc/yaboot.conf = /dev/null ']' + '[' ybin = mkofboot -a -n '' ']' + checkconf + '[' '!' -e /dev/hda1 ']' + '[' '!' -b /dev/hda1 -a '!' -f /dev/hda1 ']' + '[' '!' -w /dev/hda1 -o '!' -r /dev/hda1 ']' + '[' '!' -e /usr/lib/yaboot/yaboot ']' + '[' '!' -f /usr/lib/yaboot/yaboot ']' + '[' '!' -r /usr/lib/yaboot/yaboot ']' + '[' /etc/yaboot.conf = auto ']' + '[' '!' -e /etc/yaboot.conf ']' + '[' '!' -f /etc/yaboot.conf ']' + '[' '!' -r /etc/yaboot.conf ']' + '[' -n '' ']' + case "$fstype" in + '[' raw = hfs ']' + '[' raw = raw ']' + '[' -n '' ']' + '[' no = yes ']' + '[' -n '' ']' + '[' -n '' ']' + '[' -n '' ']' + '[' '!' -f /proc/uptime -a 1 = 0 ']' + '[' 1 = 0 ']' +++ cat /proc/cpuinfo +++ grep pmac-generation ++ v= ++ echo + '[' '' = NewWorld ']' +++ cat /proc/cpuinfo +++ grep pmac-generation ++ v= ++ echo + '[' '' = OldWorld ']' + cat /proc/cpuinfo + grep '^motherboard' + grep -q AAPL + cat /proc/cpuinfo + grep '^machine' + grep -q 'CHRP IBM' + nonvram=1 + ADDNOTE=yes + case "$fgcolor" in + fgc=f + case "$bgcolor" in + bgc=0 + '[' -z 5 ']' + '[' '' = 1 ']' + return 0 + '[' -n '' -o 1 = 0 ']' + grep -q '^[[:space:]]*password[[:space:]]*=' /etc/yaboot.conf + '[' no = yes -a -z '' ']' + '[' raw = hfs ']' + '[' -n '' -o 1 = 0 ']' + '[' /etc/yaboot.conf = auto ']' + '[' -n '' ']' + case "$PRG" in + case "$usemount" in + '[' raw = raw ']' + luserck ++ dd if=/dev/hda1 bs=1 skip=1 count=3 + '[' ELF = ELF ']' + return 0 + raw_install + mount + grep '^/dev/hda1\>' + '[' 1 = 0 ']' + local 'INSTALLPRIMARY=ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda1...' + '[' yes = yes ']' + hack_yaboot + local YBDIR=/usr/lib/yaboot + '[' -x /usr/lib/yaboot/addnote ']' ++ mktemp -q /tmp/yaboot.XXXXXX + TMPYABOOT=/tmp/yaboot.K25953 + '[' 0 '!=' 0 ']' + cat /usr/lib/yaboot/yaboot + install=/tmp/yaboot.K25953 + '[' 1 = 1 ']' + echo 'ybin: Embedding CHRP note section in temp yaboot...' ybin: Embedding CHRP note section in temp yaboot... + /usr/lib/yaboot/addnote /tmp/yaboot.K25953 + '[' 0 '!=' 0 ']' + return 0 + '[' 1 = 1 ']' + echo 'ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda1...' ybin: Installing primary bootstrap /usr/lib/yaboot/yaboot onto /dev/hda1... + dd if=/dev/zero of=/dev/hda1 bs=512 count=1600 + dd if=/tmp/yaboot.K25953 of=/dev/hda1 bs=512 + '[' 0 '!=' 0 ']' + sync + sync + '[' 1 = 1 ']' + echo 'ybin: Installation successful' ybin: Installation successful + exit 0 + cleanup + '[' -n '' ']' + '[' -n '' ']'
Does that help? You can see it's hitting one of the "exit 1" conditions above. This may mean util_install (function in /sbin/ybin) is failing in the case where --debug and --verbose are not used. Could this perhaps be some sort of timing issue where the prints help? Also, do we need to call ybin at all? Can you help us understand when it should and should not be used? Previous Satellite software versions did not use it... though I don't know if we need to or not and in what cases. Thanks!
When running manually I get the same thing -- though in my case I'm executing it /without/ the shell (via the OS) -- doesn't make a difference. /sbin/ybin of course has !/bin/sh at the top. So it /seems/ that --debug and --verbose affect behavior. If you can tell me that the output above looks ok and I don't need to care, I need to implement a workaround, either adding those flags or ignoring the RC. Which is safe?
Created attachment 350244 [details] Make raw_install() correctly return 0 Looking at the 2 traces, it's clear that we're getting to the end of the raw_install() function, which looks like: --- sync ; sync [ "$VERBOSE" = 1 ] && echo "$PRG: Installation successful" --- In an ideal world '[' /shouldn't/ set $? (but I bet in this case it is), so that basically means when were *NOT* in --verbose raw_install() will always fail. This patch should correct that. (and matches current upstream)
Ok, so it seems like the workaround for present versions is to add --verbose to the options. I will make it so for our app. Thanks! (And also thanks for fixing upstream!)
imported koan 1.6.8 and in process of being pushed to webqa.
ON_QA
VERIFIED on 7/14 build.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1434.html