ofpath handles SATA disks incorrectly

Bug #18474 reported by Colin Hayes
32
Affects Status Importance Assigned to Milestone
yaboot (Ubuntu)
Fix Released
Medium
Colin Watson

Bug Description

I am running a dual 2GHz model G5 from mid 2004 with 2 SATA hard drives. The install of Ubuntu went fine until the
reboot, yaboot simply wouldn't go over into Linux. After a few days of newbie tinkering, I finally realised that
Yaboot has set its yaboot.conf file with the incorrect OpenFirmware path to the drive containing Linux.

It had "k2-sata@0/disk@0:" whereas it should have had "k2-sata@1/@0:".

Also, in OSX, the correct O.F. path is shown in Disk Utility, however I do not know what path ofpath would yield as
I never got that utility to work.

Revision history for this message
Colin Hayes (colinhayes) wrote :

okay, perhaps this is a problem with the ofpath utility.

I was just screwing around with yaboot.conf again while booted into Ubuntu, ran ybin, and now it's back to the problem it had earlier.
I'm fairly sure ybin just uses ofpath to create the Openfirmware paths to the drives (I remember getting some error while trying to run
ybin before I could boot into Ubuntu).

When I ran ofpath, I believe it yielded "k2-sata@1/disk@0:" which is somewhat of a hybrid of the correct path and the original one in
yaboot.conf.

Revision history for this message
Colin Watson (cjwatson) wrote :

Yes, ofpath needs to be fixed. Please attach a tarball of /proc/device-tree/ to
this bug.

Revision history for this message
Eirik Fuller (eirik-hackrat) wrote :

http://bugs.debian.org/294081 has a patch for ofboot, with an explanation. I'll attempt an attachment shortly.

Revision history for this message
Eirik Fuller (eirik-hackrat) wrote : The SATA subdirectory of /proc/device-tree

The attachment is a compressed tarball of the k2-sata-root@c subdirectory of /proc/device-tree (the leading /proc is omitted from the names in the archive). It came from my Mac G5 with two SATA disks.

If I guessed wrong about the rest of /proc/device-tree being irrelevant to this bug, I can attach a more complete tarball. But this attachment has enough information to show the organization of multiple SATA disks in /proc/device-tree and demonstrate the incorrect assumption in the scsi_ofpath function of the ofpath script.

Revision history for this message
Colin Watson (cjwatson) wrote : Re: yaboot configuration during install problem

Eirik, it would help to have the whole /proc/device-tree tarball, in order to be able to properly test your fix. However, I may be able to put something together by guesswork.

Revision history for this message
Colin Watson (cjwatson) wrote :

Your patch does make sense to me, though. Thanks! I've applied it to my local tree, and will upload once the archive is un-frozen after Flight CD 6.

Changed in yaboot:
status: Needs Info → In Progress
Revision history for this message
Colin Watson (cjwatson) wrote :

yaboot (1.3.13-4.1ubuntu4) dapper; urgency=low

  * Fix ofpath's handling of disks on k2-sata controllers (thanks, Eirik
    Fuller; closes: #294081, Malone #18474).
  * Attempt to support FireWire-connected disks (closes: Malone #7939).

 -- Colin Watson <email address hidden> Sat, 1 Apr 2006 09:54:10 +0100

Changed in yaboot:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.