Subject: Re: 1.4.2 install notes
To: None <carton@Ivy.NET>
From: None <Havard.Eidnes@runit.sintef.no>
List: port-macppc
Date: 02/13/2000 20:24:43
Hi,

I've made a first attempt at rewriting the "prep" part of the
installation notes.  The following is cut & pasted from the
"more" version.  It doesn't mention how to boot from the disk
after NetBSD is installed... (It probably should.)  I've not
touched any of the other sections yet.  Comments and corrections
appreciated.


   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 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.

     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 Maci-
     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

     In the latter case, 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 device
     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 up-
     grade 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 the connection to these devices in order to
            make the network boot 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.

Regards,

- Havard