Previous | Next | Table of Contents

Introduction (macppc-specific), Diskless NetBSD HOW-TO

For a concise iMac-specific netboot page, look at Mitchell Spector's How to Run NetBSD on an iMac

Power Macintosh Open Firmware procedures

Which Power Macintosh machines can netboot

All NetBSD-supported Power Macs can boot over their built-in network interface. There are no reported cases of people being able to netboot over PCI, Cardbus, SCSI, or Airport network interfaces.

There are three major revisions of Open Firmware on the supported macppc machines. Each handles booting in a different manner. Open Firmware versions 1.0.5, 1.1.22, 2.0.x, and 2.4 support BOOTP (or a DHCP server in BOOTP compatible mode) and expect to load a XCOFF bootloader. Open Firmware version 3 supports DHCP (and will fall back to BOOTP) and expects to load an XCOFF or ELF bootloader, or the ELF kernel directly.

Since all versions of Open Firmware can load the XCOFF bootloader, and since it provides the most flexibility, all Open Firmware versions should use ofwboot.xcf, which is in the NetBSD/macppc distribution.

The version of OpenFirmware is printed when you first enter Open Firmware. See the macppc model support page for a listing of all supported models and their Open Firmware versions.

Quirks/problems you may run into

There have been some reports of some Open Firmware 1.0.5 machines not being able to netboot. The symptom is that ofwboot.xcf fails to mount the nfs server with the kernel and attempts to tftp something with no filename (it keeps printing the message "TFTP timeout"). The solution is to specify the bootloader name (even though the DHCP or bootp server sends that information):

0 > boot enet:,ofwboot.xcf 

Additionally, older PowerMacintosh systems with Open Firmware 1.0.5 using ofwboot.xcf version 1.2 (included in NetBSD 1.5.3 and earlier) can't load compressed kernels. Use gunzip to uncompress the kernel.

There have also reports of some Open Firmware 2.0.x machines which don't get all of the information properly from the BOOTP server, but a DHCP server serving BOOTP requests works. Keep this in mind later.

The first generation of iMacs (Bondi Blue) have a known problem with DHCP with their original firmware. You should download the latest firmware for these iMacs. Other early Open Firmware 3 models may have similar problems. See Are there bugs in my machine's Open Firmware implementation?

Obtaining an IP address and downloading the boot loader

Power Macintosh workstations first try to acquire an IP address using either the Internet Bootstrap Protocol (BOOTP), or the Dynamic Host Configuration protocol (DHCP) depending on which version of Open Firmware they have. The bootpd and dhcpd servers use the ethernet address (MAC) of the client machine to determine its IP address and a bootloader filename. If this request is successful, Open Firmware expects to be able to download a second-stage boot program via the Trivial File Transfer Protocol (TFTP). It will do this by setting up a TFTP connection to the server that answered the earlier BOOTP or DHCP request, and asking for the file name returned by the server. The second-stage boot program then loads the kernel using NFS from the server and path specified by the BOOTP or DHCP request.

Note, the very early PCI PowerMacintoshes (i.e. early Open Firmware 1.0.5 machines) had a motherboard error which manifests as the ethernet address being reversed (e.g. 00:a0:40:0b:77:2c when corrected becomes 00:05:02:d0:ee:34). Running certain Mac OS utilities will correct this. If you find that netbooting suddenly fails to work, double-check your ethernet address and see if it has been fixed, or if you zapped the PRAM and erased the fix.

To determine the MAC address Open Firmware will use for its BOOTP/DHCP request, type the following command:

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

Open Firmware commands

On Open Firmware 3 machines, you can make it boot over ethernet by holding down the "N" key during startup without even entering Open Firmware.

On earlier machines (or if you want to configure your Open Firmware 3 machine to always netboot), you must first get to the Open Firmware prompt and enter a boot command at the prompt.

The syntax used for netbooting varies depending on Open Firmware version. In Open Firmware 1.0.5, 1.1.22, 2.0.x, and 2.4 you will need to type one of:

0 > boot enet:,ofwboot.xcf
0 > boot enet:,ofwboot.xcf netbsd.ram.gz   #to specify a kernel other than "netbsd"
0 > boot enet:,ofwboot.xcf netbsd  #if having trouble getting all info from bootpd

In Open Firmware 3 you will need to type one of:

0 > boot enet:0,ofwboot.xcf
0 > boot enet:0,ofwboot.xcf netbsd.ram.gz           #to specify a kernel other than "netbsd"
0 > boot enet:,ofwboot.xcf netbsd           #if having trouble getting all info from dhcpd

Some users have reported trouble with DHCP sending the proper information. The find that it is necessary to specify the kernel name on the command line.

Other arguments can be passed to the boot loader or kernel by specifying them on the end of the command line (e.g. boot enet:,ofwboot.xcf -a). See the ofwboot(8) man page.

To make booting over the network the default, set the Open Firmware variables (where the presence or absence of the 0 depends on Open Firmware version):

0 > setenv boot-device enet:[0],ofwboot.xcf
0 > setenv auto-boot? true
0 > reset-all
See also What can I do at the Open Firmware prompt? and The Open Firmware variables of interest.

Begin setting things up (suggested order):

  1. bootpd (Open Firmware 1 and 2) or dhcpd (Open Firmware 3)
  2. tftpd
  3. nfs
  4. client filesystem
  5. finishing up

Previous | Next | Table of Contents
NetBSD Home Page
NetBSD Documentation top level

(Contact us) $NetBSD: intro.macppc.html,v 1.4 2007/08/01 15:36:02 kano Exp $
Copyright © 1998-2004 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.