Port-macppc archive

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

Re: Help needed booting NetBSD on Beige G3 Rev1 from the 2nd IDE Channel



Hello,

On Mon, 16 Feb 2009, Michael wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> On Feb 16, 2009, at 6:34 AM, Gheorghe Ardelean wrote:
>
> > On Sun, 15 Feb 2009, Michael wrote:
> >
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> Hello,
> >>
> >> On Feb 15, 2009, at 8:00 PM, Gheorghe Ardelean wrote:
> >>
> >>> On Sun, 15 Feb 2009, Gheorghe Ardelean wrote:
> >>>
> >>> [...]
> >>>> Now that the installation is finished, I'd like to boot the NetBSD
> >>>> from
> >>>> the disk but I don't know how.
> >>>>
> >>>> First I tried to see the content of the HFS
> >>>> partition on the first and the second IDE disks, but
> >>>>
> >>>> dir ide0/disk@0:x,\         where x is 0,1,...,10
> >>>> dir ide1/disk@0:x,\
> >>>> (pfdisk says that x should be 5 for ide0 and 7 for ide1)
> >>>> returns the error message can't OPEN the DIR device.
>
> OF 2.x is supposed to support HFS but with 2.0f I wouldn't bet on
> anything.

Well, I do not understand how MacOS is booting from the first ide drive
(ide0). Is it not using OpenFirmware to do this?

> >>> After searching the archives and finding a message from Michael
> >>> (macallan@ ---
> >>> http://mail-index.netbsd.org/port-macppc/2008/05/02/msg000119.html)
> >>> I have tried the partition 0 boot method but without success (I
> >>> reinstalled on the disk after dd-ing the first 1000 sectors with
> >>> 0). I
> >>> copied ofwboot to the root partition, unmounted the wd1a and used
> >>> installboot as follows:
> >>>
> >>> installboot /dev/rwd1c /usr/mdec/bootxx /ofwboot
>
> try rwd1a - I keep forgetting which one is the one that works.

Maybe I don't get it but rwd1c should be the entire disk in raw mode. We
need bootxx to be at the very begining, isn't it? Such that the OF can
load and run it. If rw1a comes after rw1b (for example) than I suppose the OF
does not know where to find the loader because he does not understand BSD
disklabel. Am I wrong? Nevertheless I have tried both rw1c and rw1a to
no go. :(

> Also, I never tried to boot NetBSD from the 2d IDE disk - I wouldn't
> bet on OF even supporting it properly.

I thought the slave is not supported, not the master on the second
channel. But I have done more tests and this time I used only channel 0
(ide0). See below.

> >>> after rebooting and issuing the following boot command
> >>> 0 > boot ide1/@0:0 netbsd
> >>> I get the following error message: "can't OPEN:"
>
> That looks like bootxx wasn't installed properly, otherwise you should
> see at least output from the loader.

Or maybe bootxx is installed but the OF does not know how to
read from that drive.

[...]

> > If this fails I will put a SCSI disk inside and try also this way.
>
> The beige G3's IDE chip is extremely picky about cables and its
> OpenFirmware variant isn't exactly good at dealing with IDE problems.
> Please try different ( brand new is possible ) IDE cables. I had
> endless trouble with mine, replacements just worked and the old cables
> work fine in a different machine which isn't quite as picky. This
> particular OF won't give you any useful error messages regarding IDE -
> it's always 'can't OPEN' or something like that.
> Finally - check if the drive you're trying to boot from is actually
> the master. Some drives have different settings for single, master-
> with-slave, cable select - they might work in NetBSD but OF may
> require different jumper settings. Try with only one disk per channel
> ( it took me some time to get two disks at ide0 to work. The 2nd one
> isn't used for booting anything though )

Here is a summary of what I have tested (on the ide0 channel):

1) Drives as master (single not with slave and there is no slave on the
   cable). IDE HDDs from Seagate, IBM and Quantum.

2) cables: 40 pin and 80 pin cables from various
   manufacturers and different lengths. For the 40 pin ones I have with 2
   connectors and with one drive connector only (tested both types). The drive
   is always connected at the end of the cable. The other end plugged into
   the motherboard.
   Michael, what cables are you using? Standard length?

3) attached also a DOS drive (seen under MacOS) and used also to test
   dir ide0/@0:0,\
   Only errors from DIR no real listing of the contents.

With all this it fails to read the disk. Or at least I have not found a
good combination that works.

Maybe your patches from OSX are different from the SystemDisk ones.
Could you please check the patches I attach to this email against yours?
Especially the dev ide0 and dev ide1 ones. Maybe here is the key?

I have attached now a small SCSI drive, installed NetBSD on it and moved
the /usr to the wd1. Now I have / and swap on SCSI and /usr on IDE it
works ok. Booting the SCSI disk (ID 0) with a similar command to the one
you suggested for ide works (0 > boot scsi/sd@0,0 netbsd). BTW when trying
to use 2 HDDs at install time (one for / and one for /usr), I realized
that I do not know how? It is not possible with sysinst?

Thanks.

Best regards,

Gheorghe Ardelean.

P.S. ================ printenv ========================================

Open Firmware, 2.0f1
To continue booting the MacOS type:
BYE<return>
To continue booting from the default boot device type:
BOOT<return>
For Open Firmware serial I/O type:
TTYA IO<return>
 ok
0 > printenv

VARIABLE            CURRENT             DEFAULT
little-endian?      false               false
real-mode?          false               false
auto-boot?          false               true
diag-switch?        false               false
fcode-debug?        false               false
oem-banner?         false               false
oem-logo?           false               false
use-nvramrc?        true                false
real-base           F00000              -1
real-size           100000              100000
virt-base           -1                  -1
virt-size           100000              100000
load-base           600000              4000
pci-probe-list      -1                  -1
screen-#columns     64                  64
screen-#rows        28                  28
selftest-#megs      0                   0
boot-device         scsi/sd@3:0,\OFWBOOT.XCF;1 /AAPL,ROM
boot-file           NETBSDMD.GZ;1
diag-device                             fd:diags
diag-file
input-device        ttya                kbd
output-device       ttya                screen
oem-banner
oem-logo
nvramrc
     hex
     : $D find-device ;
     : $E device-end ;
     : $L BLpatch ; : $R BRpatch ;
     : $X execute ;
     : $p 0 to my-self property ;
     : $a " /chosen" $D $p $E ;
     : &c " ata-enable" $call-parent ;
     10 buffer: km
     dev kbd
     get-key-map km swap move
     $E
     : ck 0 do swap dup 3 >> km + c@ 1 rot 7 and << and or loop ;
     : bootr 0d word count encode-string " machargs" $a
     0 0 1 ck if 0 and else f 3d 0 2 ck if 40 or then then
     if bye else 1e 0 do ['] boot catch drop 1f4 ms loop then bye ;
     : myboot boot-command eval ;
     dev enet
     ' open constant $M
     : $M2 $M 710 - $X ;
     : rl@ -7D9D40 $X ;
     : chstat begin $M2 $M 14f8 - $X -7D6C20 $X rl@ 400 and 0= until ;
     : bmstat begin $M2 $M 13F0 - $X rl@ 100 and until ;
     : xmt1 get-msecs $M 720 - ! chstat $M A00 - $X bmstat chstat ;
     ' xmt1 ' WRITE 10 + l!
     62 ' READ 7 - c!
     : READ { _p _n ; _a } begin _p _n bead -> _a _a 2+
     if _p c@ 80 and 0= else 1 then until _a ;
     $E
     dev /packages/obp-tftp
     : $M over + ['] noop $L ;
     : $O ['] open + ;
     : $M1 dup 24 - -1720 $O $X 6 move 14 + ;
     -5BC $O ' $M1 $L
     0 $O E8 $M EC $M F0 $M F4 $M F8 + ' true $L
     $E
     dev /packages/mac-parts
     : $M -7E89E0 $X 8000 alloc-mem 7F00 + 4 -7E89E0 $X ;
     ' load 268 - ' $M $L
     ' load 160 + ' 0 $L
     $E
     dev ide0
     : open use-ata-interface 0 &c -1 ;
     : set-device-ID set-drive-select ;
     : reset-atapi-bus reset-ata-bus ;
     ' reset-ata-bus 2c + ' 2 $L
     $E
     dev ide1
     : open use-ata-interface 0 &c -1 ;
     : set-device-ID set-drive-select ;
     : reset-atapi-bus reset-ata-bus ;
     ' reset-ata-bus 2c + ' 2 $L
     $E
     dev scsi
     : $M ['] do-cmd + ;
     : $M2 5 us -5f0 $M $X ;
     : $M3 -710 $M f over $X $X ;
     : $M4 1 ms ;
     -1AC $M ' $M2 $L
     100 $M ' $M3 $L
     120 $M ' $M4 $L
     124 $M ' 1 $L
     $E
     unselect-dev
boot-command        boot                boot
 ok
0 >



Home | Main Index | Thread Index | Old Index