Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PLEASE TEST AND REPORT: New ofpath
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Sep 16, 2010 1:43 pm    Post subject: PLEASE TEST AND REPORT: New ofpath Reply with quote

Hi everyone!

The new scsi-pata drivers (replacing hda with sda is the most visible change) breaks ofpath, the utility yaboot uses to set up your bootloader. I've rewritten ofpath to work around the problem, please give it a try by simply passing it all of your devices (/dev/sda, /dev/hda, /dev/cdrom, etc.) and pasting the result here, along with grep machine /proc/cpuinfo.

You can get this new version of ofpath at:
http://dev.gentoo.org/~josejx/new-ofpath

Here's my output from my G4 Powerbook with the new pata drivers as an example:
Code:
Machine
=======
machine      : PowerBook5,9

Hard drive
==========
$ ./new-ofpath /dev/sda
/pci@f4000000/ata-6@d/disk@0:

DVD Drive
=========
$ ./new-ofpath /dev/cdrom
/pci@f4000000/ata-6@d/disk@1:

Thank you!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml


Last edited by JoseJX on Wed Nov 02, 2011 7:53 am; edited 1 time in total
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Thu Sep 16, 2010 4:58 pm    Post subject: Reply with quote

Code:
ssbook tmp # grep machine /proc/cpuinfo
machine         : PowerBook6,5

ssbook tmp # ./new-ofpath /dev/sda
/pci@f4000000/ata-6@d/disk@1:

ssbook tmp # ./new-ofpath /dev/sr0
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:

ssbook tmp # ./new-ofpath /dev/cdrom
ofpath: Invalid device: /dev/cdrom
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Sep 16, 2010 5:14 pm    Post subject: Reply with quote

Does /dev/cdrom exist? sr0 is probably your DVD Drive, is it linked to anything in /dev? If so, does using those produce a working OF path?

Thanks for testing!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Thu Sep 16, 2010 5:28 pm    Post subject: Reply with quote

Code:
ssbook ~ # ls -l /dev/cdr*
lrwxrwxrwx 1 root root 3 Jul 14 15:46 /dev/cdrom2 -> sr0
lrwxrwxrwx 1 root root 3 Jul 14 15:46 /dev/cdrw2 -> sr0

ssbook ~ # grep -R cdrom /etc/udev/*
/etc/udev/rules.d/70-persistent-cd.rules:ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0.00020000:ata-3-ide-0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
/etc/udev/rules.d/70-persistent-cd.rules:SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0001:10:17.0", SYMLINK+="cdrom1", ENV{GENERATED}="1"
/etc/udev/rules.d/70-persistent-cd.rules:SUBSYSTEM=="block", ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0001:10:17.0-scsi-0:0:0:0", SYMLINK+="cdrom2", ENV{GENERATED}="1"

i noticed that i lost cdrom some time ago and just started using /dev/sr0, is the udev rule messed up ?
Back to top
View user's profile Send private message
mattmatteh
Guru
Guru


Joined: 10 Mar 2004
Posts: 449
Location: near chicago

PostPosted: Thu Sep 16, 2010 5:31 pm    Post subject: Reply with quote

Code:
ssbook tmp # ./new-ofpath /dev/cdrom2
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:

ssbook tmp # ./new-ofpath /dev/cdrw2 
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:

ssbook tmp # ./new-ofpath /dev/sr0   
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Sep 16, 2010 5:40 pm    Post subject: Reply with quote

You probably have a consistent udev rule set up for hdb (or whatever it was before). Now that the CD drive has changed names, udev is assigning it cdrom2 instead. This keeps multiple devices from changing IDs. You can fix this by removing the 70-persistent-cd.rules file from /etc/udev/rules.d and let it regenerate.

In any case, things look good, thanks!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
bigboote
n00b
n00b


Joined: 27 May 2003
Posts: 14
Location: Chicago, IL USA

PostPosted: Tue Sep 21, 2010 11:21 pm    Post subject: Reply with quote

powerbook Downloads # grep machine /proc/cpuinfo
machine : PowerBook6,4

powerbook Downloads # ./new-ofpath /dev/sda
/pci@f4000000/ata-6@d/disk@0:

powerbook Downloads # ./new-ofpath /dev/sr0
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:

powerbook Downloads # ./new-ofpath /dev/cdrom
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:
_________________
rundll32.exe shell32.dll,SHExitWindowsEx 1
Back to top
View user's profile Send private message
lma1980
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2005
Posts: 78

PostPosted: Thu Sep 23, 2010 4:00 pm    Post subject: Reply with quote

Stopping by to express my joy of seeing the new-ofpath working perfectly with the new scsi-pata driver on a G4 (Sawtooth).
_________________
"... before that, there was amoebas..."
Back to top
View user's profile Send private message
atmosx
n00b
n00b


Joined: 17 Jul 2009
Posts: 42

PostPosted: Thu Sep 23, 2010 5:42 pm    Post subject: problem Reply with quote

Hello,

Apparently, I can't seem to bypass the 'ext2.fsck' issue on my Mac mini G4. I'm considering switching to Debian or *BSD if I can't deal with this issue by the end of the week. Here is my offpath from the liveCD:


Code:
livecd ~ #  grep machine /proc/cpuinfo
machine      : PowerMac10,1
livecd ~ # bash new-ofpath /dev/hda
/pci@f4000000/ata-6@d/disk@0:
livecd ~ # bash new-ofpath /dev/cdrom
/pci@f4000000/ata-6@d/disk@0:
livecd ~ #


This offpath code is going to yaboot.conf right?

regards
Back to top
View user's profile Send private message
TheLazy1
n00b
n00b


Joined: 02 Jul 2007
Posts: 51

PostPosted: Mon Sep 27, 2010 3:06 am    Post subject: Reply with quote

Machine:
PowerBook6,5

/dev/sda:
/pci@f4000000/ata-6@d/disk@0:

/dev/sr0:
/pci@f2000000/mac-io@17/ata-3@20000/disk@0:

Thanks for the new ofpath!
It fixed my issue where it would reboot in a loop after updating the kernel.

I've already forgotten, but I got out of this loop by going into openfirmware (cmd+option+o+f) and typing something similar to this:
boot hd:/yaboot

Then it will boot the kernel normally so you can update yaboot with the new ofpath.
Back to top
View user's profile Send private message
lma1980
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2005
Posts: 78

PostPosted: Wed Sep 29, 2010 1:19 pm    Post subject: Reply with quote

What is missing to see this fix inside the stable tree? I did a rebuild of my system last weekend and I nuke the bootloader as the ofpath add been change by the broken one. I'm just asking. I don't want to rush anyone.
_________________
"... before that, there was amoebas..."
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Sun Oct 03, 2010 7:29 pm    Post subject: Reply with quote

Thanks for the feedback! I've added the latest yaboot, 1.3.16, to the tree with this new ofpath. Please test the new Yaboot as well. :)

It's currently in unstable. After a month, I'll move it to stable.
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1759
Location: PB, Germany

PostPosted: Sat Oct 09, 2010 5:50 pm    Post subject: Reply with quote

Thanks for this bugfix solving my issue.
_________________
HP ZBook Power 15.6" G8 i7-11800H|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Back to top
View user's profile Send private message
Ato
n00b
n00b


Joined: 22 Dec 2007
Posts: 66
Location: Macclesfield, United Kingdom

PostPosted: Thu Oct 14, 2010 6:39 pm    Post subject: Reply with quote

This is a Mac Mini PPC with an internal ATA disk, an internal DVD-R drive and an external firewire disk:

Code:
mac ~ # grep machine /proc/cpuinfo
machine         : PowerMac10,1


# Internal ATA disk:
mac ~ # bash ./new-ofpath /dev/sda
/pci@f4000000/ata-6@d/disk@0:


# Internal DVD drive
mac ~ # bash ./new-ofpath /dev/dvd1
/pci@f4000000/ata-6@d/disk@1:


# External Firewire drive
mac ~ # bash ./new-ofpath /dev/sdb
cat: /sys/devices/pci0002:20/0002:20:0e.0/fw1/fw1.0/host2/target2:0:0/2:0:0:0/../../../devspec: No such file or directory
Unable to determine controller path!


Cheers,
Thomas
Back to top
View user's profile Send private message
leviathan4444
n00b
n00b


Joined: 08 Oct 2006
Posts: 13
Location: Champaign, IL

PostPosted: Fri Oct 29, 2010 3:51 am    Post subject: Test on a Blue & White G3 - a problem discovered? Reply with quote

JoseJX,

Thanks so much for updating ofpath. You rock! :) When I switched over to the SCSI drivers I thought that I was going to have to boot with the install CD from then on to get the ofpath of devices. Please note, that since I was using that technique prior to my knowledge of your new ofpath, I recorded the output of the old ofpath. I did notice one difference between the output of the old ofpath and the new one on the same machine, as you will see below. If this is a problem, I'm not sure, and will leave it in your expert hands. If I can be of further assistance in testing, let me know. I'll check back on this forum from time to time.
Thanks Again!

Code:


----------- Output of new ofpath -----------

#Blue & White PowerMac G3
machine      : PowerMac1,1

#/dev/sda:
/pci@80000000/pci-bridge@d/pci-ata@1/pci-ata@1@0/disk@0:

#/dev/sr0: (Internal CD-RW)
/pci@80000000/pci-bridge@d/mac-io@5/ata-3@20000/disk@0:

------------------------------------------------

Output of old ofpath for the same internal hard drive that is now at /dev/sda:
/pci@80000000/pci-bridge@d/pci-ata@1/@0/disk@0:

Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Fri Oct 29, 2010 1:46 pm    Post subject: Reply with quote

Thanks for providing your examples everyone!

Ato, I'll give it a try with my own firewire device, but if you could test the result when it's finished, I'd really appreciate it.

leviathan4444, it looks like I'm duplicating part of the name with that device. Can you please provide the output from: 'find /sys/devices/pci*' and email it to me at josejx@gentoo.org

Thanks for testing!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Sat Nov 27, 2010 9:08 pm    Post subject: Reply with quote

i suppose im late but :

Powerbook5,4 :
Code:
/dev/sda -->/pci@f4000000/ata-6@d/disk@0:
/dev/sr0 -->/pci@f2000000/mac-io@17/ata-3@20000/disk@0:


same output as TheLazy1

cheers
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Mon Feb 14, 2011 2:10 pm    Post subject: Reply with quote

Thanks for your help everyone! Debian requested that I add this code back into the existing ofpath instead of just rewriting it. The new ofpath is here: http://dev.gentoo.org/~josejx/new-ofpath-v2

If you could please give it a try and make sure it works, I'd really appreciate it.

Thanks!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
blob999
n00b
n00b


Joined: 07 Jun 2009
Posts: 64
Location: NATO area

PostPosted: Mon Feb 14, 2011 8:03 pm    Post subject: Reply with quote

thanks again!

Anyway yaboot is maintained from IBM guys thus i guess debian's thoughts aren't relevant.
I noticed your new-ofpath 'll be included in the next upcoming cruxppc (release 2.7 install ISO) 'cause it's already shipped in their rc2.
_________________
LinuxPPC user!
my blog: http://linuxpowerpc.blogspot.com/
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Wed Feb 16, 2011 8:02 am    Post subject: Reply with quote

im getting the same output as mentioned above.

thanks !
Back to top
View user's profile Send private message
Ato
n00b
n00b


Joined: 22 Dec 2007
Posts: 66
Location: Macclesfield, United Kingdom

PostPosted: Fri Feb 25, 2011 4:08 am    Post subject: Reply with quote

JoseJX wrote:
Thanks for your help everyone! Debian requested that I add this code back into the existing ofpath instead of just rewriting it. The new ofpath is here: http://dev.gentoo.org/~josejx/new-ofpath-v2

If you could please give it a try and make sure it works, I'd really appreciate it.

Thanks!


Certainly! Sorry for the late reply, I somehow must have missed the notification.

Code:
mac ~ # grep machine /proc/cpuinfo
machine         : PowerMac10,1

# Internal ATA disk:
mac ~ # bash ./new-ofpath-v2 /dev/sda
/pci@f4000000/ata-6@d/disk@0:

# Internal DVD drive
mac ~ # bash ./new-ofpath-v2 /dev/dvd1
new-ofpath-v2: Device: /dev/dvd is not supported

# External Firewire drive #1
mac ~ # bash ./new-ofpath-v2 /dev/sdb
cat: /sys/devices/pci0002:20/0002:20:0e.0/fw1/fw1.0/host2/target2:0:0/2:0:0:0/../../../devspec: No such file or directory
ofpath: Unable to find the controller path!
/pci@f4000000/firewire@e/node@0001d202e017041d/sbp-2@c000/disk@0:

# External Firewire drive #2
mac ~ # bash ./new-ofpath-v2 /dev/sdc
cat: /sys/devices/pci0002:20/0002:20:0e.0/fw2/fw2.0/host3/target3:0:0/3:0:0:0/../../../devspec: No such file or directory
ofpath: Unable to find the controller path!
/pci@f4000000/firewire@e/node@0001d202e017041d/sbp-2@c000/disk@0:


Note that I have now two firewire drives and the output path for both seems to be the same which seems to me to be wrong. But I am not an of-path expert anyway. :P
Cheers,
T.
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Fri Feb 25, 2011 3:34 pm    Post subject: Reply with quote

Yeah, firewire and USB are both broken. I'm working on it. :) Thanks for the reports everyone!
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum