Subject: Re: 1.4.2 macppc install notes
To: None <port-macppc@netbsd.org>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-macppc
Date: 02/22/2000 00:31:29
----Next_Part(Tue_Feb_22_00:30:04_2000_562)--
Content-Type: Text/Plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

OK,

I've fiddled some more with the install notes for NetBSD/macppc,
and here's the result.  I'm going to commit this now, but will
still accept corrections or additions (but hurry up, the time for
1.4.2 is getting closer...).

Regards,

- H=E5vard

----Next_Part(Tue_Feb_22_00:30:04_2000_562)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

   Preparing your System for NetBSD Installation

     Note   Currently NetBSD 1.4.2_ALPHA requires a dedicated drive if it is
            going to be run from a local disk drive.  In other words, NetBSD
            1.4.2_ALPHA cannot be installed on the hard drive on which MacOS
            and/or any other oparating systems reside.  This is because of
            NetBSD 1.4.2_ALPHA currently does not support Apple's Disk Parti-
            tion Map.

     Before you start, you must choose a boot medium.  There are several pos-
     sibilities:

     o   Boot from the network

     o   Boot from floppy (if your machine has one)

     o   Boot from a CD-ROM

     o   Boot from a disk drive prepared on another machine

     This latter option is not described further here.

     If you have a newer Macintosh, want to boot from the network, and don't
     want to pass any special options to the boot command, you can net-boot by
     resetting and holding the ``N'' key down during the boot sequence.  In
     any other case, you will need to issue commands to the OpenFirmware in
     your Macintosh.

     The various Apple Macintosh machines have slightly different versions of
     OpenFirmware, and they vary somewhat in their capabilities, so the docu-
     mentation provided here is more hints than the definitive all-encompass-
     ing truth about OpenFirmware on Macintosh machines.  Some versions of
     OpenFirmware also has bugs -- check with Apple if a firmware update is
     available for your particular model.

     To get into OpenFirmware, reset the Macintosh and hold down Command-Op-
     tion-O-F while booting.  The firmware checks the state of the keys some
     time after the startup chime -- exactly when varies from model to model.
     The G3 PowerBooks seem to be the pickiest about timing. If you're having
     problems, try waiting until the startup chime starts, then quickly press
     the keys before it finishes (and hold them down until you see the Open-
     Firmware screen).  It's also been reported that it's easier to get into
     Open Firmware from a powered-off state than it is from a reboot.

     If your screen remains dark after this procedure, you have an old Macin-
     tosh where you must interact with OpenFirmware via the serial port at
     38400 baud, parity none, 8 bits.  Newer machines will give you a prompt
     on the screen.

     The OpenFirmware prompt looks like this:

             ok
             0 >

     If you want to always boot to OpenFirmware, enter the following at an
     OpenFirmware prompt

             setenv auto-boot? false

     This can always be set back with

             setenv auto-boot? true

     or you can reset all the settings to their defaults with

             set-defaults

     If you want to boot from floppy, you can use

             boot fd:0

     If you want to boot from the network, you can use

             boot enet:0

     or possibly simply

             boot enet

     When booting from the network the Macintosh will issue a BOOTP/DHCP query
     to get it's IP address, and load the file given in the reply using TFTP.
     The file loaded is typically ``ofwboot.elf.'' This second-stage boot
     loader will in turn use DHCP again to get the Mac's IP address, the IP
     address of an NFS file server, and the root path to mount.  ofwboot.elf
     will then use NFS to load the kernel, typically ``netbsd.''

     Note   Older Macintosh machines' OpenFirmware may not have support for
            loading an ELF executable -- the error message may say ``OBJECT
            FILE FORMAT NOT RECOGNIZED.'' In that case, you need to use an
            XCOFF boot loader, named ``ofwboot.xcf.'' Once that boot loader
            runs, it can boot the normal ELF kernel just fine.

            Also note that some older Macintoshes which use BOOTP will need to
            have the ``Vendor Extensions'' flag set, typically by ``always-
            reply-rfc1048'' in the DHCP daemon configuration file.

     If you want to run your Macintosh diskless, you will need to populate the
     NFS server's area used for your Macintosh with macppc binaries.  Please
     also remember to do ``cd dev; ./MAKEDEV all'' to create the required de-
     vice nodes, and edit etc/rc.conf and etc/fstab.  If, on the other hand,
     you just want to load the install kernel via the network to install or
     upgrade your machine, you only need the install kernel installed in the
     root directory on the NFS server.

     In some cases you may want to interact with the ofwboot program to tell
     it which file to load.  You can do that by passing the ``-a'' flag to the
     boot loader, i.e.:

             boot enet:0 -a

     Note   Using DHCP for network boot has the annoying problem that if you
            have some other network device which responds to ``anonymous''
            DHCP queries on your network (cable modem, DSL box or the like),
            you may need to disconnect these devices in order to make the net-
            work boot of the Macintosh work.

     An example dhcpd.conf file follows.

     # Notes:
     # To set up dhcpd, install this file and ensure that /var/db/dhcpd.leases
     # exists.
     #
     get-lease-hostnames true;               # DNS lookup for dynamic IP's
     use-host-decl-names true;               # take fixed-ip hostname from the
                                             # host <x> declaration

             subnet 10.50.100.5 netmask 255.255.255.248 {
             # no dynamically assigned addrs in this subnet
                     option routers 10.50.100.1;
                     option subnet-mask 255.255.255.248;
                     option broadcast-address 10.50.100.7;
             }

     host majic {
             hardware ethernet 00:05:02:f7:22:d3;
             filename "ofwboot.elf";
             next-server 10.50.100.3;
             option root-path "/usr/export/majic";
             fixed-address majic;
     #       always-reply-rfc1048 true;
     }

     Note   The root-path has a rather short maximum length, and this may
            cause ofwboot.elf not to load your kernel.  The above reportedly
            works, but adding ``/netbsd-nfsroot'' makes it not work.

     To boot from CD-ROM (if your Macintosh supports it; apparently only later
     models do), do

             boot cd:,ofwboot.elf

     A few commands which may make it easier to get your machine going are:

             boot scsi/sd@1:0

     boots from the first bootable partition on target 1 on (of one of) the
     SCSI bus(es).

             devalias

     shows the device aliases on your machine, ``scsi'' is typically a device
     alias.  The command

             dev / ls

     lists the entire device tree on your console.

             printenv

     displays the current ``environment'' variable settings in your Open-
     Firmware. Lastly,

             reset-all

     reinitializes OpenFirmware.

----Next_Part(Tue_Feb_22_00:30:04_2000_562)----