Subject: Re: OpenFirmware to boot netbsd[was: My G4 turned dead for a day...]
To: Isobel <Samuel.Hornus@crans.ens-cachan.fr>
From: William O Ferry <woferry@iname.com>
List: port-macppc
Date: 04/29/2000 22:31:32
Isobel,
	In order to boot NetBSD off the hard disk you'll always need to go
through ofwboot.elf first, Open Firmware has no idea how to read the
NetBSD partition on it's own, so ofwboot.elf has to be placed somewhere
Open Firmware CAN read.  In MacOS, copy that ofwboot.elf script off your
zip disk and onto the top-level of your hard disk (the MacOS boot
partition if you have multiple partitions).  That way you should be able
to do something like:

boot hd:,\ofwboot.elf ultra1:0,netbsd

	And it should do the rest.

	As for the second problem, my guess is when you did the installation
process to the HD it managed to install a kernel that doesn't recognize
uni-north.  Are you back to getting a very short boot output from the
kernel, or are you still getting screens full of configuration lines? 
If the former, you'll have to boot off the ramdisk image again, and you
want to FTP the kernel off the URL I mentioned previously (just
netbsd.gz).  You should even be able to leave it as /netbsd.gz, and
modify the boot line above and save yourself a few KB, though I'm not
sure all of our tools like that, some seem to expect to be able to open
/netbsd if I recall.

	If you are still getting a large amount of output on your screen, are
you by any chance willing to type it into an email?  The presence of
only "halt" in the choices implies that the kernel didn't find a hard
drive or a network device.  These kernels wouldn't support "gmac", which
might be the ethernet device you have on your machine, support was only
added a few weeks ago.  But I would expect it to find the hard drive.

	Boot menus are possible in Open Firmware, and I've seen a few webpages
out there with instructions, don't recall any URLs offhand.  The biggest
catches are it's a lot to type into Open Firmware, and if you get it
wrong you can really mess things up.  Plus if your machine ever gets
it's PRAM reset (or probably if you install MacOS X) you'll have to type
it in all over again.

	By the way, (re)booting and holding down Cmd-Opt-P-R before the grey
screen comes up and waiting to hear the boot chimes a second time
*should* reset any of the values you've customized in Open Firmware, and
get you back to a system that boots right into MacOS.  This is the
PRAM-reset key sequence I referred to in the previous paragraph.

	From an earlier email, the meaning of "hd:,\\:tbxi" is to boot off the
hard drive ("hd:"), using the first bootable partition ("," rather than
having a partition number before the comma), using the "blessed" System
Folder ("\\"), and load the file with the MacOS type "tbxi" (":tbxi"). 
This I believe is technically "trampoline" code, a Forth script (it
might be compiled, not sure) that sets things up and then loads/jumps
into the MacOS ROM file.  I guess you had asked specifically for what
"tbxi" means, I don't know what it actually stands for (how many MacOS
types or creators really make any sense, they just have to be 4
characters..  =)

	Hope that helps.
                                     Will