Subject: Re: Booting new laptops (Was Re: OF boot string (Re: 1.5.1_BETA2
To: Nathan J. Williams <nathanw@MIT.EDU>
From: Michael Wolfson <mw@blobulent.com>
List: port-macppc
Date: 07/08/2001 19:57:18
At 12:48 PM -0400 7/6/01, Nathan J. Williams wrote:

:)Okay. I've now tried up to 39 with no success in that syntax. What
:)does "partition" mean in this context, anyway? Is it the same thing
:)that I created when I used Drive Setup to repartition my disk for
:)MacOS and NetBSD, or something else?

No, it is the logical order on the drive.  Drive Setup injects about 8
"partitions" onto the drive, which are MacOS drivers.  The "partitions"
that you set up Drive Setup are the user-accessible ones.  Open Firmware
doesn't know the difference between driver and user-accessible, and will
fail if you tell it to use a driver partition (usually 1 thru 8).

To make matters more confusing, the partition numbering in NetBSD is also
different, based on whether the partition has A/UX flags indicating that
it's a UNIX filesystem.

Yes, you need to tell Open Firmware to try booting from the partition that
has ofwboot.xcf.  Without using pdisk or the Open Firmware "dir" command,
you can't be sure which partition number (as Open Firmware sees it) has it.
This is why it's easiest to let Open Firmware figure it out.  If you type:
boot hd:,ofwboot.xcf

This tells Open Firmware to find the first user-accessible partition (i.e.
one with HFS or HFS+) and look for a file called ofwboot.xcf and run it.

:)Also, I still believe that 0 is correct. Booting with
:)"hd:,ofwboot.xcf blah" produces:
:)
:)"open /pci@f2000000/mac-io@17/ata-4@@1f00/disk@0:0/blah: Inappropriate..."

No, not on Open Firmware 3 systems.  Partition number zero is special to
Open Firmware, and tells it to look in the boot blocks of the disk.  This
is how we boot pre-Open Firmware 3 systems, but we haven't figured out how
to get this same boot block to work with Open Firmware 3.  As of now, the
*only* two methods of booting an Open Firmware 3 system (as spelled out in
the INSTALL notes) are:

1) ofwboot.xcf from an HFS or HFS+ partition
2) ofwboot.xcf over the network

:)I don't see anything in the install notes that talks about the
:)requirement for the disk/partition syntax for boot.fs. It does mention
:)both syntaxes, but only says that you need the explicit syntax when
:)the file to boot is on a different partition - clearly not the case
:)here, since ofwboot.xcf and boot.fs were located on the same partition.

My apologies -- I had forgotten that I had cleared this up after BETA2.
The version that will be released with NetBSD 1.5.1 says (and I had also
posted this to the list on Wednesday):

-----------
Here are some examples of what you might use to boot the boot floppy image
located on an HFS or HFS+ partition (note, you must use the path to the
floppy image):

       0 > boot scsi/sd@0:9,ofwboot.xcf scsi/sd@0:9,boot.fs
       0 > boot ide0/disk@0:10,ofwboot.xcf ide0/disk@0:9,boot.fs
       0 > boot hd:9,ofwboot.xcf hd:9,boot.fs

Here are some examples of what you might use to boot a kernel located on
the same HFS or HFS+ partition as the bootloader (note, you do not specify
a path to the kernel name):

       0 > boot ultra1:9,ofwboot.xcf netbsd.ram.gz
       0 > boot hd:10,ofwboot.xcf netbsd.GENERIC.gz
--------------

Good luck,
  -- MW