August 22, 2004 INSTALL 8 NetBSD

NAME

INSTALL - Installation procedure for NetBSD/macppc.

CONTENTS

                                                              

About this Document............................................3 Quick install notes for the impatient..........................3 What is NetBSD?................................................5 Changes Between The NetBSD 3.1 release and 3.1.1 update........5 Supported devices...........................................5 Kernel......................................................5 Networking..................................................5 File system.................................................5 Security....................................................6 Miscellaneous...............................................6 alpha specific..............................................6 mac68k specific.............................................6 sparc specific..............................................6 xen specific................................................6 The Future of NetBSD...........................................7 Sources of NetBSD..............................................7 NetBSD 3.1.1 Release Contents..................................7 NetBSD/macppc subdirectory structure........................9 Binary distribution sets...................................10 NetBSD/macppc System Requirements and Supported Devices.......11 Supported models...........................................12 Unsupported models.........................................13 Supported devices..........................................13 Unsupported devices........................................15 Supported boot devices and media...........................16 Getting the NetBSD System on to Useful Media..................16 Preparing your System for NetBSD installation.................17 Prepare yourself...........................................17 Preparing your Open Firmware 3 System for NetBSD..............19 Updating your BootROM......................................19 Getting to Open Firmware 3.................................19 Setting up Open Firmware 3 to boot NetBSD..................20 Available Boot Media.......................................20 Partitioning your hard drive for NetBSD....................22 Preparing the Open Firmware 3 Bootable Media...............23 Creating the NetBSD/macppc CD-R.........................24 Preparing an HFS or HFS+ partition......................24 Preparing a custom hybrid HFS/ISO9660 CD-R..............24 Creating an MS-DOS disk.................................25 Preparing the netboot server............................25 Preparing a SCSI or IDE drive with the CD-R image.......30 Preparing your Open Firmware 1.x or 2.x System for NetBSD.....30 Getting to Open Firmware on Apple Network Servers..........30 Open Firmware 1 and 2 System Preparation...................31 Getting to Open Firmware (MacOS X or Darwin)...............32 Getting to Open Firmware (Best, MacOS 8 or 9)..............32 Getting to Open Firmware (Harder, MacOS 7, 8, or...........33 Getting to Open Firmware (Without using MacOS).............34 Setting up Open Firmware 1 and 2 to boot...................35 Available Boot Media.......................................36 Partitioning your hard drive for NetBSD....................37 Preparing the Open Firmware 1 or 2 Bootable Media..........39 Creating the NetBSD/macppc CD-R.........................39 Creating the NetBSD install floppies....................39 Creating a custom ISO9660 CD-R..........................40 Creating an MS-DOS disk.................................41 Preparing the netboot server............................41 Preparing a SCSI or IDE drive with the CD-R image.......46 Installing the NetBSD System..................................46 Open Firmware boot syntax..................................46 Examples of Open Firmware boot commands....................49 Booting the NetBSD/macppc install CD-R..................50 Booting the NetBSD install floppies.....................50 Booting an IDE or SCSI drive with an HFS partition......50 Booting a custom CD-ROM.................................51 Booting an MS-DOS floppy................................51 Booting over the ethernet...............................51 Booting an IDE or SCSI drive with 'partition zero'......52 Example of a normal boot...................................52 Common Problems and Error Messages.........................53 Black screen............................................53 Grey screen with flashing question mark.................53 Information on your screen seems garbled or out of sync.53 DEFAULT CATCH!..........................................54 CLAIM failed............................................54 can't OPEN..............................................54 unrecognized Client Program formatstate not valid.......54 bad partition number, using 0no bootable HFS partition..55 READ TIMEOUT@...........................................55 TFTP timeout............................................55 enet:,/netbsd.ram.gz: Inappropriate file type or format.55 Bootloader hangs before the copyright notice............55 Hang after configuring devices..........................55 Milestone..................................................56 Running the sysinst installation program...................56 Introduction............................................56 General.................................................56 Quick install...........................................56 Booting NetBSD..........................................57 Network configuration...................................57 Preparing a disk for Open Firmware 3 systems............58 Installation drive selection and parameters.............59 Partitioning the disk...................................59 Preparing your hard disk................................60 Getting the distribution sets...........................60 Installation using ftp..................................61 Installation using NFS..................................61 Installation from CD-ROM................................61 Installation from an unmounted file system..............61 Installation from a local directory.....................61 Extracting the distribution sets........................62 Making the device nodes.................................62 Finalizing your installation............................62 Finalizing Open Firmware settings..........................62 Booting NetBSD exclusively..............................63 Additional Open Firmware tips...........................63 Booting NetBSD and MacOS X or Darwin....................63 Booting NetBSD and MacOS 9 or earlier...................64 Other boot techniques...................................64 Post installation steps.......................................64 Upgrading a previously-installed NetBSD System................67 Compatibility Issues With Previous NetBSD Releases............68 Issues affecting an upgrade from NetBSD 3.1 and older......68 Using online NetBSD documentation.............................68 Administrivia.................................................69 Thanks go to..................................................69 We are........................................................74 Legal Mumbo-Jumbo.............................................80 The End.......................................................86

DESCRIPTION

About this Document

This document describes the installation procedure for NetBSD3.1.1 on the macppc platform. It is available in four different formats titled INSTALL.ext, where .ext is one of .ps, .html, .more, or .txt:

.ps
PostScript.

.html
Standard Internet HTML.

.more
The enhanced text format used on UNIX-like systems by the more(1) and less(1) pager utility programs. This is the format in which the on-line man pages are generally presented.

.txt
Plain old ASCII.

You are reading the HTML version.

Quick install notes for the impatient

This section contains some brief notes describing what you need to install NetBSD3.1.1 on a machine of the macppc architecture.

What is NetBSD?

The NetBSD Operating System is a fully functional Open Source UNIX-like operating system derived from the University of California, Berkeley Networking Release 2 (Net/2), 4.4BSD-Lite, and 4.4BSD-Lite2 sources. NetBSD runs on fifty four different system architectures (ports), featuring seventeen machine architectures across fifteen distinct CPU families, and is being ported to more. The NetBSD3.1.1 release contains complete binary releases for many different system architectures. (A few ports are not fully supported at this time and are thus not part of the binary distribution. For information on them, please see the NetBSD web site at http://www.NetBSD.org/.)

NetBSD is a completely integrated system. In addition to its highly portable, high performance kernel, NetBSD features a complete set of user utilities, compilers for several languages, the X Window System, firewall software and numerous other tools, all accompanied by full source code.

NetBSD is a creation of the members of the Internet community. Without the unique cooperation and coordination the net makes possible, it's likely that NetBSD wouldn't exist.

Changes Between The NetBSD 3.1 release and 3.1.1 update

The NetBSD 3.1.1 update is the first security/critical update of the NetBSD 3.1 release branch. This represents a selected subset of fixes deemed critical in nature for stability or security reasons.

These fixes will also appear in future releases (NetBSD 3.2 etc), together with other less-critical fixes and feature enhancements.

Specific updates are as follows:

Supported devices
Kernel
Networking
File system
Security
Miscellaneous
alpha specific
mac68k specific
sparc specific
xen specific

This is the fifth major release of NetBSD for the macppc platform, including the Apple eMac, iBook, iMac, PowerMacintosh, PowerBook, and Xserve models, as well as clones.

NetBSD3.1.1 on macppc is, as usual, also fully backward compatible with old NetBSD/macppc binaries, so you don't need to recompile all your local programs provided you set the appropriate binary compatibility options in your kernel configuration.

The Future of NetBSD

The NetBSD Foundation has been incorporated as a non-profit organization. Its purpose is to encourage, foster and promote the free exchange of computer software, namely the NetBSD Operating System. The foundation will allow for many things to be handled more smoothly than could be done with our previous informal organization. In particular, it provides the framework to deal with other parties that wish to become involved in the NetBSD Project.

The NetBSD Foundation will help improve the quality of NetBSD by:

We intend to begin narrowing the time delay between releases. Our ambition is to provide a full release every six to eight months.

We hope to support even more hardware in the future, and we have a rather large number of other ideas about what can be done to improve NetBSD.

We intend to continue our current practice of making the NetBSD-current development source available on a daily basis.

We intend to integrate free, positive changes from whatever sources submit them, providing that they are well thought-out and increase the usability of the system.

Above all, we hope to create a stable and accessible system, and to be responsive to the needs and desires of NetBSD users, because it is for and because of them that NetBSD exists.

Sources of NetBSD

Refer to http://www.NetBSD.org/mirrors/.

NetBSD 3.1.1 Release Contents

The root directory of the NetBSD3.1.1 release is organized as follows:

.../NetBSD-3.1.1/

CHANGES
Changes since earlier NetBSD releases.

LAST_MINUTE
Last minute changes.

MIRRORS
A list of sites that mirror the NetBSD3.1.1 distribution.

README.files
README describing the distribution's contents.

TODO
NetBSD's todo list (also somewhat incomplete and out of date).

patches/
Post-release source code patches.

source/
Source distribution sets; see below.

In addition to the files and directories listed above, there is one directory per architecture, for each of the architectures for which NetBSD3.1.1 has a binary distribution.

The source distribution sets can be found in subdirectories of the source subdirectory of the distribution tree. They contain the complete sources to the system. The source distribution sets are as follows:

gnusrc
This set contains the ``gnu'' sources, including the source for the compiler, assembler, groff, and the other GNU utilities in the binary distribution sets.
79 MB gzipped, 367 MB uncompressed

pkgsrc
This set contains the ``pkgsrc'' sources, which contain the infrastructure to build third-party packages.
24 MB gzipped, 200 MB uncompressed

sharesrc
This set contains the ``share'' sources, which include the sources for the man pages not associated with any particular program; the sources for the typesettable document set; the dictionaries; and more.
5 MB gzipped, 20 MB uncompressed

src
This set contains all of the base NetBSD3.1.1 sources which are not in gnusrc, sharesrc, or syssrc.
37 MB gzipped, 176 MB uncompressed

syssrc
This set contains the sources to the NetBSD3.1.1 kernel for all architectures; config(8); and dbsym(8).
26 MB gzipped, 140 MB uncompressed

xsrc
This set contains the sources to the X Window System.
84 MB gzipped, 450 MB uncompressed

All the above source sets are located in the source/sets subdirectory of the distribution tree.

The source sets are distributed as compressed tar files. Except for the pkgsrc set, which is traditionally unpacked into /usr/pkgsrc, all sets may be unpacked into /usr/src with the command:
       #( cd / ; tar -zxpf - ) < set_name.tgz

In each of the source distribution set directories, there are files which contain the checksums of the files in the directory:

BSDSUM
Historic BSD checksums for the various files in that directory, in the format produced by the command:
cksum -o 1 file.

CKSUM
POSIX checksums for the various files in that directory, in the format produced by the command:
cksum file.

MD5
MD5 digests for the various files in that directory, in the format produced by the command:
cksum-m file.

SYSVSUM
Historic AT&T System V UNIX checksums for the various files in that directory, in the format produced by the command:
cksum -o 2 file.

The MD5 digest is the safest checksum, followed by the POSIX checksum. The other two checksums are provided only to ensure that the widest possible range of system can check the integrity of the release files.

NetBSD/macppc subdirectory structure
The macppc-specific portion of the NetBSD3.1.1 release is found in the macppc subdirectory of the distribution: .../NetBSD-3.1.1/macppc/. It contains the following files and directories:

INSTALL.html
INSTALL.ps
INSTALL.txt
INSTALL.more
Installation notes in various file formats, including this file. The .more file contains underlined text using the more(1) conventions for indicating italic and bold display.
binary/
kernel/
netbsd-GENERIC.gz
A gzipped NetBSD kernel containing code for everything supported in this release.
netbsd-GENERIC.MP.gz
A gzipped NetBSD kernel containing code for everything supported in this release. This kernel also supports SMP on systems with more than one CPU.
netbsd-GENERIC_MD.gz
A gzipped NetBSD kernel containing code for everything supported in this release. It also has a RAM-disk installer. This is the kernel you should use when you want to install via netboot, from a CD-R, or an HFS partition on Open Firmware 3 systems.
netbsd-INSTALL.gz
A gzipped NetBSDkernel containing code only for Open Firmware 1.0.5, 1.1.22, 2.0.x, and 2.4 systems (i.e. those that have floppy drives). It has a RAM-disk installer.
sets/
macppc binary distribution sets; see below.
installation/
floppy/boot1.fs
floppy/boot2.fs
macppc boot and installation floppy images. The first is the bootloader and kernel. The second image has the installation tools. Only usable on models that ship with a floppy drive (pre-Open Firmware 3); see below.
ofwboot.xcf
macppc bootloader; see below.
Binary distribution sets
The NetBSD macppc binary distribution sets contain the binaries which comprise the NetBSD3.1.1 release for the macppc. The binary distribution sets can be found in the macppc/binary/sets subdirectory of the NetBSD3.1.1 distribution tree, and are as follows:

base
The NetBSD3.1.1 macppc base binary distribution. You must install this distribution set. It contains the base NetBSD utilities that are necessary for the system to run and be minimally functional. It includes shared library support, and excludes everything described below.
19 MB gzipped, 53 MB uncompressed

comp
Things needed for compiling programs. This set includes the system include files (/usr/include) and the various system libraries (except the shared libraries, which are included as part of the base set). This set also includes the manual pages for all of the utilities it contains, as well as the system call and library manual pages.
23 MB gzipped, 83 MB uncompressed

etc
This distribution set contains the system configuration files that reside in /etc and in several other places. This set must be installed if you are installing the system from scratch, but should not be used if you are upgrading.
1 MB gzipped, 1 MB uncompressed

games
This set includes the games and their manual pages.
3 MB gzipped, 8 MB uncompressed

kern-GENERIC
This set contains a NetBSD/macppc 3.1.1 GENERIC kernel named /netbsd. You must install this distribution set.
3 MB gzipped, 6 MB uncompressed

kern-GENERIC.MP
This set contains a NetBSD/macppc 3.1.1 GENERIC.MP kernel, which will use multiple processors (if present), named /netbsd.
3 MB gzipped, 6 MB uncompressed

man
This set includes all of the manual pages for the binaries and other software contained in the base set. Note that it does not include any of the manual pages that are included in the other sets.
8 MB gzipped, 30 MB uncompressed

misc
This set includes the (rather large) system dictionaries, the typesettable document set, and other files from /usr/share.
3 MB gzipped, 9 MB uncompressed

text
This set includes NetBSD's text processing tools, including groff(1), all related programs, and their manual pages.
2 MB gzipped, 7 MB uncompressed

NetBSD maintains its own set of sources for the X Window System in order to assure tight integration and compatibility. These sources are based on XFree86, and tightly track XFree86 releases. They are currently equivalent to XFree86 4.4.0. Binary sets for the X Window System are distributed with NetBSD. The sets are:

xbase
The basic files needed for a complete X client environment. This does not include the X servers.
7 MB gzipped, 19 MB uncompressed

xcomp
The extra libraries and include files needed to compile X source code.
13 MB gzipped, 44 MB uncompressed

xfont
Fonts needed by X.
31 MB gzipped, 39 MB uncompressed

xetc
Configuration files for X which could be locally modified.
0.03 MB gzipped, 0.17 MB uncompressed

xserver
The X server. This includes both the XFree86 and Xmacppc servers.
The XFree86 server supports acceleration, switchable resolutions and bit-depths. This server supports only known video cards, such as ATI and Nvidia and can be difficult to configure.
The Xmacppc server supports all on-board video and Open Firmware-compatible video cards. Acceleration and depths greater than 256 colors are not supported.

See the X11 FAQ for help using X on macppc systems. http://www.NetBSD.org/Ports/macppc/x11.html
10 MB gzipped, 27 MB uncompressed

The macppc binary distribution sets are distributed as gzipped tar files named with the extension .tgz, e.g. base.tgz.

The instructions given for extracting the source sets work equally well for the binary sets, but it is worth noting that if you use that method, the filenames stored in the sets are relative and therefore the files are extracted below the current directory. Therefore, if you want to extract the binaries into your system, i.e. replace the system binaries with them, you have to run the tar -xpf command from the root directory ( / ) of your system. This utility is used only in a Traditional method installation.

Note:
Each directory in the macppc binary distribution also has its own checksum files, just as the source distribution does.

NetBSD/macppc System Requirements and Supported Devices

Currently, NetBSD/macppc requires the use of Open Firmware to boot. Open Firmware is a command environment using the FORTH language. The NetBSD kernel uses Open Firmware to gather information about your system and to control some of your devices. It is part of the boot ROMs in most PowerPC-based Macintosh systems. Until late 1996, Apple never intended to use Open Firmware for anything other than internal debugging and hardware support. It was not intended to be used to boot an operating system. This is why earlier machines have so much trouble with Open Firmware. This also means that PowerMacs and clones that lack Open Firmware cannot boot NetBSD on the macppc platform. Most machines introduced by Apple and the clone-makers after August 17, 1995 have Open Firmware and are supported.

Apple made several revisions of this Open Firmware environment, and each has various quirks and problems that we must work around. The single hardest step of installing NetBSD/macppc is to set up Open Firmware properly. Open Firmware versions 1.0.5 and 2.0.x act similarly and the same set of instructions applies to them. Open Firmware version 2.4 is slightly different with regards to booting. Open Firmware version 3 is altogether different, but easier to set up for NetBSD.

At present, NetBSD/macppc does not support the PPC 601 microprocessor, which means that the PowerMacintosh 7200 and 7500 models are not supported. The PowerMacintosh 7500 may be upgraded to a PPC 604, G3 or G4 microprocessor via a daughtercard replacement, in which case NetBSD will run on this system.

The minimal configuration requires 16 MB of RAM and ~80 MB of disk space. To install the entire system requires 200 MB plus space for the swap partition (usually the RAM size, unless you've got a lot of RAM). To install X, an additional 60 MB disk space is required, as is more RAM (at least 32 MB). NetBSD with 16 MB of RAM is very slow. Until you have around 32 MB of RAM, getting more RAM is more important than getting a faster CPU.

Supported models
Find your model from the list below and take note of its Open Firmware version:

Open Firmware 1.0.5

Open Firmware 1.1.22

Open Firmware 2.0.x

Open Firmware 2.4

Open Firmware 3

Unsupported models
Supported devices
Unsupported devices
Supported boot devices and media
Each version of Open Firmware supports different devices and media that you may boot from. We define the terms ``bootable media'' as the media (hard drive, floppy, CD-R, ethernet) that will be used to bootstrap your macppc system into NetBSD, and ``distribution sets'' or ``distribution media'' as the media (hard drive, CD-R, ethernet) that contains the files that will be installed to generate a working NetBSD system onto your destination media.

Go to the NetBSD/macppc Model Support webpage and look up your system. Take note of the comments about your model and keep these in mind during the rest of this installation procedure. http://www.NetBSD.org/Ports/macppc/models.html

Getting the NetBSD System on to Useful Media

You should wait to decide where to put the NetBSD distribution sets until you have figured out how you are going to boot your system. Refer back to this section after you have done so.

Note:
Some Mac OS ftp clients default to downloading files in `ASCII' mode. This will render the NetBSD files useless. Make sure to set your ftp program to download in `binary' mode.

Note that if you are installing or upgrading from a writable media, the media can be write-protected if you wish. These systems mount a root image from inside the kernel, and will not need to write to the media. If you booted from a floppy, the floppy disk may be removed from the drive after the system has booted.

Installation is supported from several media types, including:

The steps necessary to prepare the distribution sets for installation depend upon which installation medium you choose. The steps for the various media are outlined below.

CD-ROM / DVD
Find out where the distribution set files are on the CD-ROM or DVD. Likely locations are binary/sets and macppc/binary/sets.

Proceed to the instruction on installation.

FTP
The preparations for this installation/upgrade method are easy; all you need to do is make sure that there's an FTP site from which you can retrieve the NetBSD distribution when you're about to install or upgrade. If you don't have DHCP available on your network, you will need to know the numeric IP address of that site, and, if it's not on a network directly connected to the machine on which you're installing or upgrading NetBSD, you need to know the numeric IP address of the router closest to the NetBSD machine. Finally, you need to know the numeric IP address of the NetBSD machine itself. If you don't have access to a functioning nameserver during installation, the IPv4 address of ftp.NetBSD.org is 204.152.184.75 and the IPv6 address is 2001:4f8:4:7:2e0:81ff:fe21:6563 (as of June, 2004).

Once you have this information, you can proceed to the next step in the installation or upgrade process. If you're installing NetBSD from scratch, go to the section on preparing your hard disk, below. If you're upgrading an existing installation, go directly to the section on upgrading.

Note:
This method of installation is recommended for those familiar with using BSD network configuration and management commands. If you aren't, this documentation should help, but is not intended to be all-encompassing.

NFS
Place the NetBSD distribution sets you wish to install into a directory on an NFS server, and make that directory mountable by the machine on which you are installing or upgrading NetBSD. This will probably require modifying the /etc/exports file on of the NFS server and resetting its mount daemon (mountd). (Both of these actions will probably require superuser privileges on the server.)

You need to know the numeric IP address of the NFS server, and, if you don't have DHCP available on your network and the server is not on a network directly connected to the machine on which you're installing or upgrading NetBSD, you need to know the numeric IP address of the router closest to the NetBSD machine. Finally, you need to know the numeric IP address of the NetBSD machine itself.

Once the NFS server is set up properly and you have the information mentioned above, you can proceed to the next step in the installation or upgrade process. If you're installing NetBSD from scratch, go to the section on preparing your hard disk, below. If you're upgrading an existing installation, go directly to the section on upgrading.

Note:
This method of installation is recommended for those already familiar with using BSD network configuration and management commands. If you aren't, this documentation should help, but is not intended to be all-encompassing.

Preparing your System for NetBSD installation

Prepare yourself
Take a deep breath.

Good. Now, make sure you are reading the PDF (if available), PostScript, or HTML version of this document, as the .txt and .more versions lack important formatting information that will prevent you from following the twisted path you must follow. OK, good. Now, print out this document.

While it's printing, get some coffee, relax a bit, and mentally prepare yourself for something that promises to be confusing, frustrating, and annoying. If you assume the worst, you'll be pleasantly surprised when everything works easier than you expected. Also, forget everything you've been told about installing NetBSD/macppc. That's right, flush your knowledge cache -- some of it is almost certainly dirty.

Some of this document assumes familiarity with MacOS, e.g. how to download BinHex files and extract things with StuffIt Expander. If you've never heard of those terms before, it is possible to install NetBSD/macppc without booting or knowing how to use MacOS, but depending on your model it may be almost as painful as learning a little MacOS. See the FAQ for more help: http://www.NetBSD.org/Ports/macppc/faq.html#macos-newbie

It's done printing? Fine, time to get started.

The recommended installation procedure is as follows:

  1. Go to the NetBSD/macppc model support page and look up your model information and issues (I can't stress this enough times). http://www.NetBSD.org/Ports/macppc/models.html

  2. Spend about 15 minutes and read through this document from this point onward. There will be many pages of instructions that apply to Open Firmware versions that you do not have. Throw them out. Do not read them -- at best you will be confused, at worst you may damage your system requiring repairs.

  3. Now create your bootable media and media for the distribution sets.

  4. Prepare your machine, depending on the instructions for your model (for example: partition your drive, download and run System Disk, or hook up a serial console).

  5. Boot into Open Firmware, and verify that it has the version of Open Firmware you think it does. Also make sure that the other variables are set correctly.

  6. Figure out the correct boot command, and boot your machine from the bootable media you just created. If you're having trouble, be sure to read the section on Common Problems and Error Messages

  7. Celebrate! The worst is over, but you've still got some work to do. Take a break, maybe more coffee, maybe a quick walk around the block, whatever turns your fancy.

  8. Now use the installer to install the distribution sets onto your system and do some initial configurations.

  9. Figure out how to boot from the installed partition. Boot into NetBSD for the first time.

  10. You may then boot into Open Firmware and set it to always boot your favorite operating system.

  11. Configure to your preferences, install your favorite packages, and have fun with your new NetBSD/macppc machine!

Note:
You really actually truly do need to follow the procedure listed in this document in the order that we describe. These systems are rather tricky to boot for the novice and expert alike. Once you cross off the sections that don't apply to you, it will make more sense.

Note:
If the instructions in a subsection below do not apply to all versions of Open Firmware, there will be a line listing which versions of Open Firmware they apply to, such as:
(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4, Open Firmware 3)
If you do not have an Open Firmware 3 system, skip down to Preparing your Open Firmware 1.x or 2.x System for NetBSD

Preparing your Open Firmware 3 System for NetBSD

Updating your BootROM
Open Firmware 3 systems have a rewritable ``firmware'', also called the BootROM. When you use an Apple firmware updater, it updates the BootROM. This will not change the version of Open Firmware in your machine -- it will still be Open Firmware 3. The BootROM is what is first executed when you power on or reset your system. The BootROM then loads Open Firmware, which boots your operating system.

Go to the `Apple Software Downloads' web site at http://www.info.apple.com/support/downloads.html and search for `firmware' and install the most recent version for your model. For most G3 and G4 models, you will need to run the FirmWare updater from MacOS 9.

Note:
If you accidentally change the load-base or real-base Open Firmware variables and reset your machine you will, in effect, rewrite the BootROM with garbage. This will permanently damage your machine. We recommend not doing this.

Note:
The most recent BootROMs available (4.1.7 and later) are a little picky about RAM. Initially, some PowerMacintosh G3 users found that their third-party RAM had been disabled, but the RAM vendors brought their RAM up to spec and it hasn't been much of an issue since then.

There is one report that FirmWare Update 4.1.9 on iMac (Summer 2000) will prevent the CD-ROM and the hard drive from operating together. You may get wdc0:0:1: lost interrupt problems.

Getting to Open Firmware 3
Hold down a special four-key combination when your system boots.

After the chime starts, but before it stops, hold down the four COMMAND-OPTION-O-F keys (the COMMAND key looks like a four-leaf clover or an open apple, and the OPTION key may look like a two-way switch with four straight line segments or say ALT) until you see the Open Firmware command prompt on your screen:

Apple PowerBook3,1 2.1f1 BootROM built on 01/29/00 at 22:38:07
Copyright 1994-2000 Apple Computer, Inc.
All Rights Reserved
                                                                                     

Welcome to Open Firmware. To continue booting, type "mac-boot" and press return. To shut down, type "shut-down" and press return. ok 0 >

Now, set your system to always stop at the Open Firmware prompt.

0 > setenv auto-boot? false

Alternatively, if you are currently running MacOS X or Darwin, you can use the nvram command to set this variable before rebooting.

# nvram auto-boot\?=false

You will need to escape the question-mark or enclose the whole nvram argument in double-quotes to prevent your shell from trying to interpret it.

Setting up Open Firmware 3 to boot NetBSD
This section describes some steps you must take to prepare Open Firmware to boot NetBSD. Additional resources are available in the FAQ regarding how to use the Open Firmware command environment, and the Open Firmware variables you may be using: http://www.NetBSD.org/Ports/macppc/faq.html#ofw-access http://www.NetBSD.org/Ports/macppc/faq.html#ofw-variables

Double-check your Open Firmware version:

0 > dev /openprom
0 > .properties
name                    openprom
device_type             BootROM
model                   OpenFirmware 3
relative-addressing
supports-bootinfo
 ok

If you will be netbooting your system, you can look up your MAC address.

0 > dev enet
0 > .properties
[...]
local-mac-address   CCCCCCCC CCCC
[...]

Note:
Some Open Firmware 3 machines have their MAC address stored incorrectly (little- vs. big-endian problem). If you look up your MAC address in MacOS, it will be different than what Open Firmware 3 uses to contact your netboot server. Your machine will still work, but its MAC address may conflict with another ethernet device on your network.

You can check your Open Firmware settings with the printenv command:

0 > printenv
-------------- Partition: common -------- Signature: 0x70 ---------------
little-endian?      false               false
real-mode?          false               false
auto-boot?          false               true
diag-switch?        false               false
[...]
use-nvramrc?        true                false
real-base           -1                  -1
[...]
input-device        keyboard            keyboard
output-device       screen              screen
Available Boot Media
Open Firmware is capable of booting from a variety of media (such as hard drives, CD-ROMs, and ethernet). Open Firmware is able to boot files from a variety of file systems (such as ISO9660, HFS, HFS+, and MS-DOS FAT). Unfortunately, Open Firmware is not able to directly boot from the NetBSD file system (FFS) or Apple's new BSD-based file system (UFS), so we must put the bootloader in a location that Open Firmware is capable of understanding.

Therefore, to boot the NetBSD kernel, Open Firmware must first load a `bootloader' (ofwboot.xcf) which knows how to load the NetBSD kernel.

Note:
ofwboot.elf is obsoleted. All users should be using ofwboot.xcf instead of ofwboot.elf now.

The following bootable media are available for loading the bootloader:

Once the bootloader is loaded, it can open the kernel from one of the following sources:

The boot CD-R images provided with the distribution sets has both a `partition zero' bootloader and ofwboot.xcf on a hybrid partition so it can be booted on all Open Firmware versions. It also has an ISO9660 file system with an installation kernel and the distribution sets.

Partitioning your hard drive for NetBSD
You must have at least one disk that was partitioned before running the NetBSD installer.

This is the drive that will have the bootloader, ofwboot.xcf. Your NetBSD partitions may either be on this same disk (using the method described in the rest of this section), or on a separate disk accessible only to NetBSD.

This section describes how to make a single disk usable by both MacOS and NetBSD -- this is necessary for machines which have only one hard drive (such as the eMac, iBook, iMac, PowerBook, and PowerMacintosh Cube systems). If you do not want MacOS you must still follow this procedure, but create only a small HFS+ partition (large enough for the bootloader).

There are two partitioning tools available for NetBSD/macppc, disklabel(8) and pdisk(8). The former is used in the NetBSD sysinst installer, and will render your disk unusable by MacOS. It will also prevent Open Firmware 3 machines from booting from that disk. When running the installer, you will need to use the installer's ``Re-install sets'' option to skip the disklabel step.

Do not use disklabel or ``Re-install sets'' unless you will use one drive for NetBSD only and have another drive which will have the bootloader.

The process is more fully detailed in the Partitioning HOW-TO: http://www.NetBSD.org/Ports/macppc/partitioning.html

You can create a partition map with pdisk(8), but the disk will not be usable with MacOS 9 and earlier. If this is a concern, you will need to use Apple's Drive Setup or Disk Utility.

If you are using Apple's Drive Setup tool, make sure you have version 1.8.1 or later. This tool only runs under MacOS 9 and earlier. Drive Setup will erase the contents of your drive -- it does not preserve data from any of your partitions.

Apple's Disk Utility only runs under MacOS X 10.0.0 and later. Make sure you click the ``Install Mac OS 9 Disk Drivers'' checkbox. Also, keep in mind that Disk Utility does not create the partitions that NetBSD/macppc requires. After creating the initial partition map with Disk Utility, you will need to use the NetBSD pdisk to change the partition types. Also, Disk Utility will erase the contents of your drive -- it does not preserve data from any of your partitions.

pdisk is the most flexible (and most difficult to use) partitioning tool available. It runs on almost all OSes that macppc machines support. Download it: ftp://ftp.NetBSD.org/pub/NetBSD/arch/macppc/netbsd-pdisk/ ftp://ftp.NetBSD.org/pub/NetBSD/arch/macppc/macos-utils/pdisk.sea.hqx

There is built-in help describing how it works. When it asks you to enter the ``Type of partition'', use Apple_UNIX_SVR2 for NetBSD partitions, Apple_HFS for HFS and HFS+ partitions, and Apple_UFS for UFS partitions.

After you've written the partition map with pdisk, you will need to create the file systems. Use newfs(8) and mount(8) for NetBSD file systems, and hfstools to create and mount HFS file systems. ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/hfsutils/README.html

Make the following partitions:

HFS or HFS+
Must be large enough to hold the bootloader, over 100 KB. May be as large as you desire for MacOS usage.

A/UX Root
Must be at least 20 MB. Alternatively, you may decide to use one partition for your entire NetBSD installation, in which case it should be at least 200 MB without X, or 260 MB with X. NetBSD interprets an A/UX Root partition as the first partition (a) on the disk. This partition is not readable from MacOS.

A/UX Swap
Any size. The recommendation is your RAM size, although this is not strictly necessary for machines with a lot of RAM. NetBSD interprets an A/UX Swap partition as the second partition (b) on the disk. This partition is not readable from MacOS.

A/UX User and A/UX Free1
Use these for any additional partitions you may want to use under NetBSD, such as /usr (at least 200 MB), /home, /usr/local, or /usr/pkg. NetBSD interprets these partitions as normal NetBSD-style partitions. These partitions are not readable from MacOS.

HFS
Any size. You may want to leave an additional partition available to transfer files between MacOS and NetBSD. If would like to create such a partition, then see the Partitioning HOW-TO. http://www.NetBSD.org/Ports/macppc/partitioning.html#msdos

UFS
Any size. UFS partitions are not readable from MacOS versions prior to X 10.0.0. If you use an UFS partition as your root, then it may not be recognized by the NetBSD kernel as the first partition (a) on the disk. You will need to compile a new kernel with the root partition explicitly defined to be the UFS partition.

Now would be a good time to use pdisk to determine the partition numbers for your bootloader and kernel.

Preparing the Open Firmware 3 Bootable Media
The purpose of this section is to prepare the media from which your system will boot the installer. We'll describe how to put the files in the right places on your disk(s) or netboot server and prepare it for use on your system.

If you will be running your system diskless (i.e. entirely over NFS, not using any local hard drives), then you do not need to run the installer, you only need to extract the distribution sets on the diskless server.

To get the distribution sets onto appropriate media, see the above section entitled Getting the NetBSD System on to Useful Media. You may want to get the distribution sets when you create the bootable media.

Note:
Some MacOS ftp clients default to downloading files in `ASCII' mode. This will render the NetBSD files useless. Make sure to set your ftp program to download in `binary' mode.

What follows are the steps to create different types of bootable media for the NetBSD install kernel. You should only need to create one of these to get your system to boot the installer

Skip forward to Installing the NetBSD System

Preparing your Open Firmware 1.x or 2.x System for NetBSD

Getting to Open Firmware on Apple Network Servers
(Open Firmware 1.1.22)

The version of Open Firmware in the Apple Network Servers can only use a serial console. You must first hook up a serial console (38400 bps, 8 bits, no parity, 1 stop bit, no handshaking) to `Port 2' (the `ttya' device in Open Firmware).

Hold down a special four-key combination on the keyboard attached to the ADB port on your system (not the serial console) when your system boots.

After the chime starts, but before it stops, hold down the four COMMAND-OPTION-O-F keys (the COMMAND key looks like a four-leaf clover or an open apple, and the OPTION key may look like a two-way switch with four straight line segments or say ALT) until you see some introductory text and the Open Firmware command prompt on your serial terminal:

0 >

Your Apple Network Server's screen will remain black.

Now, set your system to always stop at the Open Firmware prompt.

0 > setenv auto-boot? false