[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH v2 4/5] Patch the CHRP boot script



Hi Ben,

Sorry for the direct question, but I assumed you would know the
answer. We are currently trying to replace yaboot with grub-ieee1275
in debian-installer, but are facing a very small issue, namely with OF
path handling. It appears that on Apple hardware only `ofpath` from
Yaboot returns the correct path. Are you using grub on any of your
Apple hardware ? Thanks much for comments.

See below for full context.

On Tue, Nov 21, 2017 at 7:51 AM, Frank Scheiner <frank.scheiner@web.de> wrote:
> Hi Rick,
>
> On 11/21/2017 02:48 AM, Rick Thomas wrote:
>>
>> If you can tell me *exactly* what to do, and I don’t have to set up an
>> installation environment to do it, I’ll be happy to test ofpathname vs
>> ofpath vs devalias on my PowerPC test machine farm.
>
>
> Well, to be on the safe side, I think you need to use the latest versions of
> ofpath and ofpathname, hence running Debian Sid could be the easiest way to
> make sure this is the case.
>
> You need to have a disk installed, because ofpath and IIC also ofpathname do
> not or cannot translate non existing device aliases to OF paths.
>
> In general the commands I ran for the p5 520Q below should do. Assuming that
> the output of ofpathname will always be wrong for Power Macs, it should be
> sufficient to check only one partition.
>
> I think devalias does only save/return OF paths up to the disk level, but
> not up to the partition level. But the disk level should already be
> sufficient to detect differences to ofpath and/or ofpathname.
>
> You have to go to OF to run devalias, but with a glass console you won't be
> able to copy the output. There are ways to interact with the OF via telnet
> from another machine (see [1] and possibly [2]), but I haven't tried this
> yet.
>
> [1]:
> https://web.archive.org/web/20040202053614/http://developer.apple.com/technotes/tn/tn2004.html
>
> [2]:
> https://web.archive.org/web/20040202060137/http://developer.apple.com:80/technotes/tn/tn2023.html
>
>>
>> I have the following machines:
>>      Power Mac G5 11,2,
>>      Power Mac G5  7,2  (I think — it’s turned off right now)
>>      Mac mini G4 10,1
>
>
> I have these types available, too, "except" for the 7,3 which currently
> won't start up correctly.
>
> Here's the output of ofpath and ofpathname for /dev/sda2 on the my Mac mini
> (10,1):
> ```
> root@mac-mini:~# ofpath /dev/sda2
> /pci@f4000000/ata-6@d/@0:2
>
> root@mac-mini:~# ofpathname /dev/sda2
> /usr/sbin/ofpathname: line 812: warning: command substitution: ignored null
> byte in input
> /pci@f4000000/ata-6@d/scsi@0/sd@0,0
> ```
>
> Also interesting, it looks like ofpathname cannot even give a "correct"
> result for an IBM machine, at least not for my p5 520Q:
> ```
> root@p5-520q:~# lsblk
> NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
> sda      8:0    0 136.7G  0 disk
> ├─sda1   8:1    0     7M  0 part
> ├─sda2   8:2    0 131.1G  0 part
> ├─sda3   8:3    0     1K  0 part
> └─sda5   8:5    0   5.6G  0 part
> sr0     11:0    1  1024M  0 rom
>
> root@p5-520q:~# ofpath /dev/sda1
> /pci@800000020000003/pci@2,4/pci1069,b166@1/scsi@0/@3:1
>
> root@p5-520q:~# ofpathname /dev/sda1
> /pci@800000020000003/pci@2,4/pci1069,b166@1/scsi@0/sd@3,0
>
> root@p5-520q:~# ofpath /dev/sda2
> /pci@800000020000003/pci@2,4/pci1069,b166@1/scsi@0/@3:2
>
> root@p5-520q:~# ofpathname /dev/sda2
> /pci@800000020000003/pci@2,4/pci1069,b166@1/scsi@0/sd@3,0
> ```
>
> Please notice that ofpathname returns the same result for two different
> partitions. :-/
>
>>      Mac G4 3,4
>>      Mac G4 dual core 3,6
>
>
> Results for these machines would be helpful. It should work to
> install/upgrade to Debian Sid on one machine only and just move the disk to
> the other machine later on for testing.
>
> Cheers,
> Frank


Reply to: