On 05/05/2015 07:07 PM, Asumu Takikawa wrote:
>
> ofpath returns the wrong result, causing the /etc/yaboot.conf file to have an
> unbootable device path. I encountered this while trying to install Jessie on
> a Powermac G5.
>
> Here is the wrong output (from my now-booting system):
>
> $ /usr/sbin/ofpath /dev/sda2
> /ht@0,f2000000/pci@9/k2-sata-root@c/@ffffffffffffffff/@0:2
Could you try if the attached patch fixes this issue?
Milan
--- a/ybin/ofpath
+++ b/ybin/ofpath
@@ -220,7 +220,10 @@
IEEE1394_ID=`cat /sys/block/$DEVNODE/device/ieee1394_id 2>/dev/null`
IEEE1394_ID=${IEEE1394_ID%%:*}
- PLUG_ID=$(ls -dv $SYS_PATH/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+ PLUG_ID=$(ls -dv $SYS_PATH/*/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+ [ -z "$PLUG_ID" ] && {
+ PLUG_ID=$(ls -dv $SYS_PATH/host* 2>/dev/null | grep -n "/host$HOST_ID$")
+ }
PLUG_ID=$((${PLUG_ID%%:*}-1))
PART=${PARTITION:+:$PARTITION}