The saga continues: I tried to reinstall with 5.4-beta,
and have a similar, but different problem now.

To recall the previous situation: the kernel was
confused about what 'cd0' and 'hd0' is, and I had
to hardcode the bootpath into the kernel config.
A patch from mpieuc...@nolizard.org solved it for me,
but it is still considered not quite the right thing:

On Dec 26 20:54:34, m...@online.fr wrote:
> I think I understand what goes wrong. The code responsible for matching
> the boot device to the actual kernel device on macppc is quite crude,
> especially for non-SCSI disks.
> 
> Your bootpath specifies `disk@1' because the disk drive is the second
> device (slave) on the ATA channel, the cdrom drive being master.
> However, the kernel wants to match this information against a `wd1'
> device (as if there were two hard disks on the ATA channel).
> 
> The kernel code needs to be fixed to use device_register() to match the
> boot path against actual attachment information, instead of walking the
> device tree at the end of autoconf. If nobody beats me to do this, I'll
> try to cook a diff in a few days.


On May 23 09:29:25, h...@stare.cz wrote:
> On May 23 08:41:50, mpieuc...@nolizard.org wrote:
> > Were you thinking of something like that? It works for me (c) tm, with
> > my PowerBooks (disk@0/wd0), I haven't tried NFS boot yet.
> > Jan, does it improve something for you?
> 
> Yes it does: with this patch, I don't need to hardcode
>       config         bsd root on wd0a
> into my kernel, it figures the bootpath itself.
> 
> [ using 500872 bytes of bsd ELF symbol table ]
> console out [ATY,RockHopper2_A]console in [keyboard] , using USB
> using parent ATY,RockHopper2Paren:: memaddr 98000000 size 8000000, : consaddr 
> 9c008000, : ioaddr 90020000, size 20000: memtag 8000, iotag 8000: width 1280 
> linebytes 1280 height 1024 depth 8
> Copyright (c) 1982, 1986, 1989, 1991, 1993
>       The Regents of the University of California.  All rights reserved.
> Copyright (c) 1995-2013 OpenBSD. All rights reserved.  http://www.OpenBSD.org
> 
> OpenBSD 5.3-current (GENERIC.MP) #5: Thu May 23 09:02:44 CEST 2013
>     r...@www.stare.cz:/usr/src/sys/arch/macppc/compile/GENERIC.MP
> real mem = 1073741824 (1024MB)
> avail mem = 1032151040 (984MB)
> mainbus0 at root: model PowerMac10,2
> cpu0 at mainbus0: 7447A (Revision 0x102): 1499 MHz: 512KB L2 cache
> mem0 at mainbus0
> spdmem0 at mem0: 1GB DDR SDRAM non-parity PC3200CL3.0
> memc0 at mainbus0: uni-n rev 0xd2
> "hw-clock" at memc0 not configured
> kiic0 at memc0 offset 0xf8001000
> iic0 at kiic0
> mpcpcibr0 at mainbus0 pci: uni-north
> pci0 at mpcpcibr0 bus 0
> pchb0 at pci0 dev 11 function 0 "Apple UniNorth AGP" rev 0x00
> appleagp0 at pchb0
> agp0 at appleagp0: aperture at 0x0, size 0x10000000
> vgafb0 at pci0 dev 16 function 0 "ATI Radeon 9200" rev 0x01, mmio
> wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation)
> mpcpcibr1 at mainbus0 pci: uni-north
> pci1 at mpcpcibr1 bus 0
> pchb1 at pci1 dev 11 function 0 "Apple UniNorth PCI" rev 0x00
> bwi0 at pci1 dev 18 function 0 "Broadcom BCM4318" rev 0x02: irq 52, address 
> 00:11:24:bf:cb:2a
> macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00
> openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
> macgpio0 at macobio0 offset 0x50
> "modem-reset" at macgpio0 offset 0x1d not configured
> "modem-power" at macgpio0 offset 0x1c not configured
> macgpio1 at macgpio0 offset 0x9 irq 47
> "programmer-switch" at macgpio0 offset 0x11 not configured
> "gpio5" at macgpio0 offset 0x6f not configured
> "gpio6" at macgpio0 offset 0x70 not configured
> "extint-gpio15" at macgpio0 offset 0x67 not configured
> "escc-legacy" at macobio0 offset 0x12000 not configured
> zsc0 at macobio0 offset 0x13000: irq 22,23
> zstty0 at zsc0 channel 0
> zstty1 at zsc0 channel 1
> aoa0 at macobio0 offset 0x10000: irq 30,1,2
> audio0 at aoa0
> "timer" at macobio0 offset 0x15000 not configured
> adb0 at macobio0 offset 0x16000apm0 at adb0: battery flags 0x0, 0% charged
> piic0 at adb0
> iic1 at piic0
> maxtmp0 at iic1 addr 0xc8: max6642
> kiic1 at macobio0 offset 0x18000
> iic2 at kiic1
> wdc0 at macobio0 offset 0x20000 irq 24: DMA
> ohci0 at pci1 dev 24 function 0 "Apple Intrepid USB" rev 0x00: couldn't map 
> interrupt
> ohci1 at pci1 dev 25 function 0 "Apple Intrepid USB" rev 0x00: couldn't map 
> interrupt
> ohci2 at pci1 dev 26 function 0 "Apple Intrepid USB" rev 0x00: irq 29, 
> version 1.0, legacy support
> ohci3 at pci1 dev 27 function 0 "NEC USB" rev 0x43: irq 63, version 1.0
> ohci4 at pci1 dev 27 function 1 "NEC USB" rev 0x43: irq 63, version 1.0
> ehci0 at pci1 dev 27 function 2 "NEC USB" rev 0x04: irq 63
> usb0 at ehci0: USB revision 2.0
> uhub0 at usb0 "NEC EHCI root hub" rev 2.00/1.00 addr 1
> usb1 at ohci2: USB revision 1.0
> uhub1 at usb1 "Apple OHCI root hub" rev 1.00/1.00 addr 1
> usb2 at ohci3: USB revision 1.0
> uhub2 at usb2 "NEC OHCI root hub" rev 1.00/1.00 addr 1
> usb3 at ohci4: USB revision 1.0
> uhub3 at usb3 "NEC OHCI root hub" rev 1.00/1.00 addr 1
> mpcpcibr2 at mainbus0 pci: uni-north
> pci2 at mpcpcibr2 bus 0
> pchb2 at pci2 dev 11 function 0 "Apple UniNorth PCI" rev 0x00
> kauaiata0 at pci2 dev 13 function 0 "Apple Intrepid ATA" rev 0x00
> wdc1 at kauaiata0 irq 39: DMA
> atapiscsi0 at wdc1 channel 0 drive 0
> scsibus0 at atapiscsi0: 2 targets
> cd0 at scsibus0 targ 0 lun 0: <MATSHITA, DVD-R UJ-825, DAND> ATAPI 5/cdrom 
> removable
> wd0 at wdc1 channel 0 drive 1: <ST9808211A>
> wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
> cd0(wdc1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4
> wd0(wdc1:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4
> "Apple UniNorth Firewire" rev 0x81 at pci2 dev 14 function 0 not configured
> gem0 at pci2 dev 15 function 0 "Apple Uni-N2 GMAC" rev 0x80: irq 41, address 
> 00:14:51:17:42:34
> bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
> umass0 at uhub0 port 1 configuration 1 interface 0 "Prolific Technology Inc. 
> Mass Storage Device" rev 2.00/1.00 addr 2
> umass0: using SCSI over Bulk-Only
> scsibus1 at umass0: 2 targets, initiator 0
> sd0 at scsibus1 targ 1 lun 0: <ST980815, A, 3.AL> SCSI0 0/direct fixed 
> serial.067b2506000000000000
> sd0: 76319MB, 512 bytes/sector, 156301488 sectors
> uhidev0 at uhub1 port 1 configuration 1 interface 0 "Apple Computer 
> HID-proxy" rev 2.00/19.65 addr 2
> uhidev0: iclass 3/1
> ukbd0 at uhidev0: 8 variable keys, 6 key codes
> wskbd0 at ukbd0: console keyboard, using wsdisplay0
> uhidev1 at uhub1 port 1 configuration 1 interface 1 "Apple Computer 
> HID-proxy" rev 2.00/19.65 addr 2
> uhidev1: iclass 3/1
> ums0 at uhidev1: 5 buttons
> wsmouse0 at ums0 mux 0
> uhidev2 at uhub3 port 1 configuration 1 interface 0 "Chicony USB Keyboard" 
> rev 1.10/1.02 addr 2
> uhidev2: iclass 3/1
> ukbd1 at uhidev2: 8 variable keys, 6 key codes
> wskbd1 at ukbd1 mux 1
> wskbd1: connecting to wsdisplay0
> uhidev3 at uhub3 port 1 configuration 1 interface 1 "Chicony USB Keyboard" 
> rev 1.10/1.02 addr 2
> uhidev3: iclass 3/0, 3 report ids
> uhid0 at uhidev3 reportid 1: input=1, output=0, feature=0
> uhid1 at uhidev3 reportid 2: input=1, output=0, feature=2
> uhid2 at uhidev3 reportid 3: input=3, output=0, feature=0
> vscsi0 at root
> scsibus2 at vscsi0: 256 targets
> softraid0 at root
> scsibus3 at softraid0: 256 targets
> bootpath: /pci@f4000000/ata-6@d/disk@1:/bsd
> root on wd0a (5d2ade1fc5a8d569.a) swap on wd0b dump on wd0b

On May 23 17:00:42, m...@online.fr wrote:
> > Were you thinking of something like that? It works for me (c) tm, with
> > my PowerBooks (disk@0/wd0), I haven't tried NFS boot yet.
> 
> Not exactly, but your version is probably better than what I was
> thinking of. However, it will not allow for root on the second wd disk
> of a controller, or on any secondary pciide controller.
> Borrowing the sparc64 logic is a larger work but less error-prone.


The 5.4-beta install CD boots fine, and the install goes fine.
I used the [W]hole disk, which made the install script
create a small DOS partition at the beginning of the disk,
and flagged it bootable. Is this expected?

# fdisk wd0
Disk: wd0       geometry: 155061/16/63 [156301488 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
*0: 06      0   0   2 -      2   0  33 [           1:        2048 ] DOS > 32MB
 1: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 2: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
 3: A6      4   1   2 - 155060  15  63 [        4096:   156297392 ] OpenBSD


After the install, I ejected the CD and rebooted.
I got to the OpenFirmware prompt, and

        > boot hd:,ofwboot /bsd
        can't OPEN: hd:,ofwboot
        Can't open device or file

With the previous experience, I suppose the Open Firmware
is confused as before about what 'cd' and 'hd' is in my machine.
So I tried

        > boot cd:,ofwboot /bsd
        can't OPEN: hd:,ofwboot
        Can't open device or file

I also tried with all the other possible devices
and their possible names: hd0, hd1, cd0, cd1,
ide0, ide1, ultra0, ultra1 - with the same result.

'devalias' says that 'cd' is an alias for
'/pci@f4000000/ata-6@d/disk@1', which is
my disk, judging by the working bootpath

        /pci@f4000000/ata-6@d/disk@1:/bsd

of the previous install
(and this one too, see below).


The only way I could find to make it work was
to insert the install CD back in and

        > boot hd:,ofwboot

(note: that's the ofwboot on the install CD)

which gives me

        Loading ELF
        >> OpenBSD/macppc BOOT 1.2
        boot>

where I can do

        boot> boot cd:/bsd

(note: this is the /bsd on the disk, as installed)
which boots fine into the installed system; dmesg below.

Why is this? Note that this is a different problem
than what I had before, where the booting kernel
got stuck at the bootpath line; that's not
a problem now.

What troubles me is that whatever device (device name) I try,
it is the 'ofwboot' which is not found.
I don't mind calling my disk 'cd' in the boot sequence
or altering the devaliases, or "setenv boot-device cd:,ofwboot",
but that doesn't work either, as shown above.
How can I make sure that the installer
has actually put the ofwboot on my disk?

I am not very familiar with the macppc architecture.
Is there something specific I could test?

        Thank oyu for your time

                Jan




[ using 500484 bytes of bsd ELF symbol table ]
console out [ATY,RockHopper2_A]console in [keyboard] , using USB
using parent ATY,RockHopper2Paren:: memaddr 98000000 size 8000000, : consaddr 
9c008000, : ioaddr 90020000, size 20000: memtag 8000, iotag 8000: width 1280 
linebytes 1280 height 1024 depth 8
Copyright (c) 1982, 1986, 1989, 1991, 1993
        The Regents of the University of California.  All rights reserved.
Copyright (c) 1995-2013 OpenBSD. All rights reserved.  http://www.OpenBSD.org

OpenBSD 5.4-beta (GENERIC) #20: Fri Jul 12 13:02:35 MDT 2013
    dera...@macppc.openbsd.org:/usr/src/sys/arch/macppc/compile/GENERIC
real mem = 1073741824 (1024MB)
avail mem = 1032146944 (984MB)
mainbus0 at root: model PowerMac10,2
cpu0 at mainbus0: 7447A (Revision 0x102): 1499 MHz: 512KB L2 cache
mem0 at mainbus0
spdmem0 at mem0: 1GB DDR SDRAM non-parity PC3200CL3.0
memc0 at mainbus0: uni-n rev 0xd2
"hw-clock" at memc0 not configured
kiic0 at memc0 offset 0xf8001000
iic0 at kiic0
mpcpcibr0 at mainbus0 pci: uni-north
pci0 at mpcpcibr0 bus 0
pchb0 at pci0 dev 11 function 0 "Apple UniNorth AGP" rev 0x00
appleagp0 at pchb0
agp0 at appleagp0: aperture at 0x0, size 0x10000000
vgafb0 at pci0 dev 16 function 0 "ATI Radeon 9200" rev 0x01, mmio
wsdisplay0 at vgafb0 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
mpcpcibr1 at mainbus0 pci: uni-north
pci1 at mpcpcibr1 bus 0
pchb1 at pci1 dev 11 function 0 "Apple UniNorth PCI" rev 0x00
bwi0 at pci1 dev 18 function 0 "Broadcom BCM4318" rev 0x02: irq 52, address 
00:11:24:bf:cb:2a
macobio0 at pci1 dev 23 function 0 "Apple Intrepid" rev 0x00
openpic0 at macobio0 offset 0x40000: version 0x4614 feature 3f0302 LE
macgpio0 at macobio0 offset 0x50
"modem-reset" at macgpio0 offset 0x1d not configured
"modem-power" at macgpio0 offset 0x1c not configured
macgpio1 at macgpio0 offset 0x9: irq 47
"programmer-switch" at macgpio0 offset 0x11 not configured
"gpio5" at macgpio0 offset 0x6f not configured
"gpio6" at macgpio0 offset 0x70 not configured
"extint-gpio15" at macgpio0 offset 0x67 not configured
"escc-legacy" at macobio0 offset 0x12000 not configured
zsc0 at macobio0 offset 0x13000: irq 22,23
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
aoa0 at macobio0 offset 0x10000: irq 30,1,2
audio0 at aoa0
"timer" at macobio0 offset 0x15000 not configured
adb0 at macobio0 offset 0x16000
apm0 at adb0: battery flags 0x0, 0% charged
piic0 at adb0
iic1 at piic0
maxtmp0 at iic1 addr 0xc8: max6642
kiic1 at macobio0 offset 0x18000
iic2 at kiic1
wdc0 at macobio0 offset 0x20000 irq 24: DMA
ohci0 at pci1 dev 24 function 0 "Apple Intrepid USB" rev 0x00: couldn't map 
interrupt
ohci1 at pci1 dev 25 function 0 "Apple Intrepid USB" rev 0x00: couldn't map 
interrupt
ohci2 at pci1 dev 26 function 0 "Apple Intrepid USB" rev 0x00: irq 29, version 
1.0, legacy support
ohci3 at pci1 dev 27 function 0 "NEC USB" rev 0x43: irq 63, version 1.0
ohci4 at pci1 dev 27 function 1 "NEC USB" rev 0x43: irq 63, version 1.0
ehci0 at pci1 dev 27 function 2 "NEC USB" rev 0x04: irq 63
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "NEC EHCI root hub" rev 2.00/1.00 addr 1
usb1 at ohci2: USB revision 1.0
uhub1 at usb1 "Apple OHCI root hub" rev 1.00/1.00 addr 1
usb2 at ohci3: USB revision 1.0
uhub2 at usb2 "NEC OHCI root hub" rev 1.00/1.00 addr 1
usb3 at ohci4: USB revision 1.0
uhub3 at usb3 "NEC OHCI root hub" rev 1.00/1.00 addr 1
mpcpcibr2 at mainbus0 pci: uni-north
pci2 at mpcpcibr2 bus 0
pchb2 at pci2 dev 11 function 0 "Apple UniNorth PCI" rev 0x00
kauaiata0 at pci2 dev 13 function 0 "Apple Intrepid ATA" rev 0x00
wdc1 at kauaiata0 irq 39: DMA
atapiscsi0 at wdc1 channel 0 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <MATSHITA, DVD-R UJ-825, DAND> ATAPI 5/cdrom 
removable
wd0 at wdc1 channel 0 drive 1: <ST9808211A>
wd0: 16-sector PIO, LBA, 76319MB, 156301488 sectors
cd0(wdc1:0:0): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4
wd0(wdc1:0:1): using PIO mode 4, DMA mode 2, Ultra-DMA mode 4
"Apple UniNorth Firewire" rev 0x81 at pci2 dev 14 function 0 not configured
gem0 at pci2 dev 15 function 0 "Apple Uni-N2 GMAC" rev 0x80: irq 41, address 
00:14:51:17:42:34
bmtphy0 at gem0 phy 0: BCM5221 100baseTX PHY, rev. 4
uhidev0 at uhub1 port 1 configuration 1 interface 0 "Apple Computer HID-proxy" 
rev 2.00/19.65 addr 2
uhidev0: iclass 3/1
ukbd0 at uhidev0: 8 variable keys, 6 key codes
wskbd0 at ukbd0: console keyboard, using wsdisplay0
uhidev1 at uhub1 port 1 configuration 1 interface 1 "Apple Computer HID-proxy" 
rev 2.00/19.65 addr 2
uhidev1: iclass 3/1
ums0 at uhidev1: 5 buttons
wsmouse0 at ums0 mux 0
uhidev2 at uhub3 port 1 configuration 1 interface 0 "Chicony USB Keyboard" rev 
1.10/1.02 addr 2
uhidev2: iclass 3/1
ukbd1 at uhidev2: 8 variable keys, 6 key codes
wskbd1 at ukbd1 mux 1
wskbd1: connecting to wsdisplay0
uhidev3 at uhub3 port 1 configuration 1 interface 1 "Chicony USB Keyboard" rev 
1.10/1.02 addr 2
uhidev3: iclass 3/0, 3 report ids
uhid0 at uhidev3 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev3 reportid 2: input=1, output=0, feature=2
uhid2 at uhidev3 reportid 3: input=3, output=0, feature=0
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
bootpath: /pci@f4000000/ata-6@d/disk@1:/bsd
root on wd0a (5d2ade1fc5a8d569.a) swap on wd0b dump on wd0b

Reply via email to