Subject: Re: Partial sucess (halted due to missing files on CD)
To: David Henderson <davidh@huey.jpl.nasa.gov>
From: Henry B. Hotz <hotz@jpl.nasa.gov>
List: port-macppc
Date: 01/11/2001 10:24:17
At 3:29 AM -0800 1/11/01, David Henderson wrote:
>Well, your suggestion of a strict ISO CDROM helped a lot. I had been using
>the Toast options to extend the standard. The "Use Macintosh names" flag

No good.

>and on at least one CD had the "Use Macintosh extentions" turned on. This

This one seems to be OK for me, but I don't know what it does.

>is apparently verboten with my firmware.
>
>I've zapped the PRAM. That should be good enough to restore OF to a virgin
>state. I'm disinclined to experiment further right now.

Good to be extra careful about having OF in a known state.

>My CDROM drive is a TEAC scsi connected device. I have two IDE hard drives
>connected to the Tanzania II IDE busses in this machine. They work fine
>with MacOS and for now I won't fool around with using them for NetBSD.

Understood.

>I still haven't gotten ofwboot.xcf to load using the firmware; I keep on
>getting "claim failed". I've also created a MS-DOS diskette with
>OFWBOOT.XCF on it; no success.

This worked for me (boot from partition 1, not 0), but was of no use 
because ofwboot can't read msdos floppies.  Since the netbsd.ram file 
had to be elsewhere the ofwboot might as well be there as well.

>What does work is to use boot.fs to create a partition 0 bootloader on a
>scsi drive. Doing it on to a scsi connected ZIP didn't work so well. Doing
>it ot a floppy didn't work.

So even with the ISO cdrom you couldn't get of...xcf to load?  Could 
you at least do the dir thing?  Unfortunately I could believe that 
there is a patch to the OF scsi IO routines in systemdisk that you 
need.  Or maybe in the xcoff package.

>The accidental situation that worked is: I have two SCSI drives(sd0 and
>sd1); The internal drive, sd0 had the boot.fs written to it, and sd1, the
>external 2 gig scsi drive that was prepped with a Root&Usr and Swap
>partitions with HD SC Setup.
>
>My first attempt with boot.fs was sucessful; I forgot to say -a to the
>bootloader and it apparently went ahead and scanned the drives looking for
>a NETBSD system to boot, finding it on the CDROM. The installer came up
>immediately. I was somewhat surprised to have to run it from the zterm
>program I had connected to the Starmax serial port.
>
>I then reset the machine and experimented with specifying NETBSD.RAM to the
>boot.fs bootloader; this did not work for me. I went back to the installer
>just by giving the bootloader a blank line.

The boot.fs has a netbsd partition map on it as well as a ffs 
partition with  netbsd.ram.gz stored as just netbsd.  You would need 
to specify the OF device as well as the filename to get something 
different.

>The installer would not create a correct partition set on the sd0 hard
>drive that had boot.fs written it; it said "disklabel -w -r sd0 scsi0"
>failed. I guess that might be because the driver info was wiped out by
>jamming boot.fs on the drive. Only the sd1 hard drive that I had prepared

It might also be because it was in use, but maybe that's my MacOS 
background speaking.  In any case you are right that dd'ing boot.fs 
onto the drive would wipe out the Apple Partition Map and any 
associated driver partitions in favor of the NetBSD partition map. 
It does however contain a minimal "fake" Apple Partition Map 
sufficient to get OF to load bootxx (which loads ofwboot, not exactly 
ofwboot.xcf).  I find the "partition 0 bootloader" nomenclature that 
MW uses in the installation documentation a bit misleading on this 
point, but he did a wonderful job of pulling it together so I don't 
want to criticize.

>with Root&Usr partitions seemed to be configured OK by the installer.

Those were created by HD SC Setup, unless you had the installer 
overwrite them.  There is an important distinction here:  If the 
partitions were created by the installer then they are in a NetBSD 
partition map.  If by an Apple formatter then they are in an Apple 
Partition Map.  In the former case the 1.5 installboot program should 
work and set up something like what worked for you in the boot.fs 
situation on sd0.  In the latter case you need to get the 
experimental version of installboot from Bill Stundenmund (which our 
rodent friend tried out recently) or maybe there's something you can 
do with hfsboot.

>The installer went ahead and found the "sets" subdirectory in
>/cdrom/macpps/binary/sets and proceeded to install the files. What stopped
>me was that misc.tgz, man.tgx, and xfont.tgz were simply not on the CDROM.
>I used "Fetch" to get the files and it didn't follow the symbolic links on
>the ftp site.

Been there, done that.  I think if you get the directory it doesn't 
follow the links and if you get the individual file it does?  Also it 
seems to think that .tgz files should be text, which they aren't.  I 
say that for the lurkers since you obviously figured it out.

>I went ahead and did a OF boot from the drive with NetBSD 1.5 on it. The
>session on ttya is appended as a postscript to the email. It stopped
>because /dev/console wasn't found. I guess things will work out once I have
>a complete set of files installed.

Since you got it going this far I guess you are using the NetBSD partition map.

I believe the installer should have done this for you, but you many 
need to cd to /dev and do a ./MAKEDEV all.  You can do this inside 
the installation kernel by mounting sd1 on /mnt and cd'ing to 
/mnt/dev also.  (Exit to shell from the installer.)

>Once I have a functioning installation I'll worry about redirecting the
>firmware to use the keyboard and screen.
>
>0 > boot scsi/sd@1:0
> >> NetBSD/macppc OpenFirmware Boot, Revision 1.2
> >> (matt@duel.local, Thu Nov 16 17:26:57 PST 2000)
>2901124+237436 [100+105392+88705]=0x32dd24
> start=0x100000
>[ preserving 194852 bytes of netbsd ELF symbol table ]
>Copyright (c) 1996, 1997, 1998, 1999, 2000
>    The NetBSD Foundation, Inc.  All rights reserved.
>Copyright (c) 1982, 1986, 1989, 1991, 1993
>    The Regents of the University of California.  All rights reserved.
>
>NetBSD 1.5 (GENERIC) #1: Sun Nov 19 13:58:47 PST 2000
>    matt@duel.local:/u1/kobj/GENERIC

...

>adb0 at obio0 offset 0x16000 irq 18: 4 targets
>aed0 at adb0 addr 0: ADB Event device
>akbd0 at adb0 addr 2: extended keyboard
>wskbd0 at akbd0
>ams0 at adb0 addr 3: 1-button, 100 dpi mouse
>wsmouse0 at ams0
>akbd1 at adb0 addr 2: extended keyboard
>wskbd at akbd1 not configured
>ams1 at adb0 addr 3: EMP trackball <LT02> 3-button, 200 dpi
>wsmouse at ams1 not configured
>ofb0 at pci0 dev 17 function 0: ATI Technologies Mach64 GT
>ofb0: 1280 x 1024, 8bpp
>wsdisplay0 at ofb0

... looks like the display stuff configured OK.  Don't like the 
SCSI_CHECK stuff though.  There was an exchange on this recently 
(over Xmas vacation) wasn't there?

>mesh: SCSI_CHECK && MESH_SENSE?
>mesh: SCSI_CHECK && MESH_SENSE?
>boot device: sd1
>root on sd1a dumps on sd1b
>root file system type: ffs
>warning: no /dev/console

You can't get anywhere using the kbd and local display devices in OF? 
You may have said that.  Try the MAKEDEV all stuff first.


Signature held pending an ISO 9000 compliant
signature design and approval process.
h.b.hotz@jpl.nasa.gov, or hbhotz@oxy.edu