xref: /netbsd/distrib/notes/macppc/prep (revision c4a72b64)
$NetBSD: prep,v 1.36 2002/11/18 12:39:51 lukem Exp $
. .Ss2 Prepare yourself . Take a deep breath.

p Good. Now, make sure you are reading the PDF (if available), PostScript, or HTML version of this document, as the

a .txt No and Pa .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.

p 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 .Nx*M No Ns . That's right, flush your knowledge cache -- some of it is almost certainly dirty.

p Some of this document assumes familiarity with .Tn 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 .Nx*M without booting or knowing how to use .Tn MacOS , but depending on your model it may be almost as painful as learning a little .Tn MacOS . See the FAQ for more help: .Lk http://www.netbsd.org/Ports/macppc/faq.html#macos-newbie

p It's done printing? Fine, now get a dark writing implement.

p The recommended installation procedure is as follows: .(enum Go to the .Nx*M model support page and look up your model information and issues (I can't stress this enough times). .Lk http://www.netbsd.org/Ports/macppc/models.html

p t Spend about 15 minutes and read through this document from this point onward. While you're reading, use the writing implement to cross out the sections that do not apply to your model (or hilight the sections that do depending on your preferences).

p t Now spend another 5 minutes and re-read this document, and mentally piece together how you think you'll be installing onto your machine. It may help to take a blank piece of paper and write out an outline of the procedure you think you'll be going through.

p t Now create your bootable media and media for the distribution sets.

p t 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).

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

p t 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 .Sx Common Problems and Error Messages

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

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

p t Figure out how to boot from the installed partition. Boot into .Nx for the first time.

p t Configure to your preferences, install your favorite packages, and have fun with your new .Nx*M machine! .enum)

p .(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) .(Note If the instructions in a subsection below do not apply to .Em 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) .Note) . .Ss2 Updating your BootROM . (Open Firmware 3)

p Open Firmware 3 systems have a rewritable .Dq firmware , also called the BootROM. When you use an Apple firmware updater, it updates the BootROM. This will .Em not change the version of Open Firmware in your machine \(em 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.

p Go to the .Sq "Apple Software Updates" web site at .Lk http://asu.info.apple.com/ and search for .Sq firmware and install the most recent version for your model. You will need to run the FirmWare updater from MacOS 9.

p .(Note If you accidentally set the c load-base No or Ic real-base Open Firmware variables and reset your machine you will, in effect, rewrite the BootROM with garbage, rendering your machine unbootable. We recommend not doing this. .Note) .(Note The most recent BootROMs available (4.1.7 and later) are known to have some problems. Some PowerMacintosh users find that their third-party RAM has been disabled. See the discussion at .Lk http://www.macfixit.com/archives/april.01.a.shtml#firm-04-07

p There are reports 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

a "wdc0:0:1: lost interrupt" problems. .Note)

p . .Ss2 Getting to the Open Firmware Prompt on Newer Models . (Open Firmware 3)

p Hold down a special four-key combination when your system boots.

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

p .(disp 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 \*> .disp)

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

p .(disp .No 0 \*> Ic "setenv auto-boot? false .disp)

p Skip down to the section on .Sx Setting up Open Firmware 3 to boot NetBSD since the next several pages are instructions for older models.

p . .Ss2 Getting to the Open Firmware Prompt on Apple Network Servers . (Open Firmware 1.1.22)

p 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 .Sq "Port 2" (the .Sq Li ttya device in Open Firmware).

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

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

p .(disp .No 0 \*> .disp)

p Your Apple Network Server's screen will remain black.

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

p .(disp .No 0 \*> Ic "setenv auto-boot? false .disp)

p Skip down to the section on .Sx Setting up pre-Open Firmware 3 to boot NetBSD since the next several pages are instructions for MacOS models.

p . .Ss2 Getting to the Open Firmware Prompt on Older Models . (Open Firmware 1.0.5, Open Firmware 2.0.x, Open Firmware 2.4)

p These models are significantly trickier than the newer machines. Open Firmware has two variables, .Sq input-device and .Sq output-device No Ns , which specify which devices to use for input and output. All Open Firmware 1.0.5 and most Open Firmware 2.0.x systems will default to using the .Sq Modem serial port for the console instead of the ADB keyboard and the monitor attached to the on-board video.

p Unless you use a MacOS-based utility to set these variables correctly, you .Em will need to hook up a serial console temporarily to configure Open Firmware to use your keyboard and screen. Some models (such as the Performa 54xx, 6360, 6400, and 6500) have the .Sq Modem serial port covered with a piece of plastic since the internal modem usurps that serial port. You will either need to use Boot Variables to set the .Sq input-device and .Sq output-device variables to .Sq ttyb (which is the Printer serial port) or remove the internal modem.

p Open Firmware seems to ignore the settings on most DB15 to VGA adapters. Depending on your model, it will default to either 640 x 480 at 60 Hz or to the resolution previously selected in MacOS. Make sure that your monitor can handle these resolutions.

p Now would be a good time to look at the .Nx*M Model Support webpage to determine the issues with your model. .Lk http://www.netbsd.org/Ports/macppc/models.html

p In particular, some models .Em must use a serial console, or they will be unable to boot .Nx at all. All models can be set to use a serial console, if you desire to bypass the keyboard and screen.

p If, after re-reading the next several sections, you still need help figuring out your .Sq input-device and .Sq output-device settings, see the FAQ: .Lk http://www.netbsd.org/Ports/macppc/faq.html#ofw-input-output-devices

p If you need to use a serial console, you can use a normal .Sq printer cable (mini-DIN 8 to mini-DIN 8) and a .Tn MacOS tool, such as ZTerm to connect a .Tn MacOS system to your .Nx*M system. .Lk http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/comm/term/zterm-101.hqx

p See the NetBSD Serial Port Primer for additional help and references: .Lk http://www.netbsd.org/Documentation/Hardware/Misc/serial.html . .Ss2 Older Open Firmware System Preparation . (Open Firmware 1.0.5, Open Firmware 2.0.x, Open Firmware 2.4)

p All pre-Open Firmware 3 \*M systems have Open Firmware bugs. Luckily, Open Firmware has a small Non-Volatile RAM variable (NVRAM) which is reserved for FORTH commands which will be run before booting an operating system. Apple has released a freeware .Tn MacOS tool called System Disk, which patches most of these bugs. We .Em strongly recommend that you use this tool to patch your Open Firmware, as several systems cannot boot without these patches. Instructions for using System Disk are covered in the next section.

p Unfortunately, some models are broken by or are unsupported by System Disk. If you have one of the following models, then skip down to the section on .Sx Getting to the Open Firmware Prompt (Harder method using MacOS)

Apple Performa 4400, 5500, 6500, 54xx, 6400, and 6360,

Motorola Starmax 3000, 4000, 5000, and 5500,

APS Tech M*Power 604e/200,

PowerComputing PowerBase,

Umax Apus 2000, Apus 3000, C500, and C600

Umax S900

p . .Ss2 Getting to the Open Firmware Prompt (Recommended method using MacOS) . (Open Firmware 1.0.5, Open Firmware 2.0.x, Open Firmware 2.4)

p Download System Disk: .Lk ftp://ftp.apple.com/developer/macosxserver/utilities/SystemDisk2.3.1.smi.bin

p For a brief tutorial on how to use System Disk, see: .Lk http://www.netbsd.org/Ports/macppc/SystemDisk-tutorial/

p Launch the .Tn MacOS System Disk tool. Click on .Dq "Power User (Open Firmware)" then click on the .Dq "Advanced Options" button. Now, click on the checkbox that says .Dq "Stop Boot at Open Firmware prompt" and select .Dq OK . Click the .Dq Save button and reboot your system.

p .(Note NVRAM patches and Open Firmware settings will be erased if you .Sq "zap your PRAM" by holding down .Key COMMAND-OPTION-P-R keys during the boot chimes, or if you accidentally boot into .Tn MacOS No Ns . .Note)

p If your .Sq output-device is .Sq Li /chaos/control (i.e. you have a PowerMacintosh 7300 \(em 8600 system), there is a chance that your monitor will not sync. See .Lk http://www.netbsd.org/Ports/macppc/SystemDisk-tutorial/of105patch.html

p You should now see the Open Firmware command prompt on your screen:

p .(disp Open Firmware, 1.0.5 To continue booting the MacOS type: BYE\*<return\*> To continue booting from the default boot device type: BOOT\*<return\*> ok 0 \*> .disp)

p If your screen is black, then your model does not support using the on-board video in Open Firmware. You will need to connect a serial console to the .Sq Modem port of your system (38400 bps, 8 bits, no parity, 1 stop bit, no handshaking). .(Note The .Dq "Stop Boot at Open Firmware prompt" setting is persistent. It is equivalent to the Open Firmware command

p .(disp .No 0 \*> Ic "setenv auto-boot? false .disp) .Note) .(Note Unfortunately, there are a few models that are better off without the System Disk patches. If you find that your machine doesn't boot, then try:

p .(disp .No 0 \*> Ic "setenv use-nvramrc? false" .No 0 \*> Ic "reset-all" .disp) .Note) . .Ss2 Getting to the Open Firmware Prompt (Harder method using MacOS) . (Open Firmware 1.0.5, Open Firmware 2.0.x, Open Firmware 2.4)

p If System Disk doesn't work because your version of .Tn MacOS is too old or because System Disk says that it doesn't support your model, then you may try using the .Tn MacOS BootVars tool.

p .Lk ftp://ftp.netbsd.org/pub/NetBSD/arch/macppc/macos-utils/bootvars/bootvars.sit.hqx .(Note BootVars does .Em not apply the (possibly critical) NVRAM patches that System Disk does. Expect some devices to not work (such as booting from hard drives and CD-Rs). .Note)

p Look up the proper .Sq output-device for your model on the .Nx*M Model Support webpage. .Lk http://www.netbsd.org/Ports/macppc/models.html If the .Nx*M Model support webpage does not list an .Sq output-device for your model, then your system will default to using the on-board video. You needn't fill in the .Sq output-device and .Sq input-device variables.

p Launch the .Tn MacOS BootVars tool. Uncheck the .Dq auto-boot? checkbox, then check on the .Dq "All Variables" checkbox and type c kbd into the .Sq input-device box, and the proper device name into the .Sq output-device box. Click on the .Dq write button, and then reboot your system.

p If your .Sq output-device is .Sq Li /chaos/control (i.e. you have a PowerMacintosh 7300 \(em 8600 system), there is a chance that your monitor will not sync. See .Lk http://www.netbsd.org/Ports/macppc/SystemDisk-tutorial/of105patch.html

p If you have a Performa 5500 or 6500, you may need to apply NVRAMRC patches to use your built-in video. See the information in the .Nx*M Model Support webpage.

p You should now see the Open Firmware command prompt on your screen:

p .(disp Open Firmware, 1.0.5 To continue booting the MacOS type: BYE\*<return\*> To continue booting from the default boot device type: BOOT\*<return\*> ok 0 \*> .disp)

p If your screen is black, then your model has defaulted to using a serial console. This is fairly common on Open Firmware 1 and 2 models if you do not use the System Disk tool to set up Open Firmware. You must hook up a serial console (38400 bps, 8 bits, no parity, 1 stop bit, no handshaking). .(Note The .Dq auto-boot? setting is persistent. Your system will always stop at the Open Firmware prompt. It is equivalent to the Open Firmware command

p .(disp .No 0 \*> Ic "setenv auto-boot? false .disp) .Note) . .Ss2 Getting to the Open Firmware Prompt (Without using MacOS) . (Open Firmware 1.0.5, Open Firmware 2.0.x, Open Firmware 2.4)

p If you don't have .Tn MacOS , then you need to hold down a special four-key combination when your system boots. Do this on the keyboard attached to the ADB port on your system (not the serial console or PS/2 port) when your system boots. .(Note Your system will .Em not have the (possibly critical) NVRAM patches that System Disk applies. Expect some devices to not work (such as booting from hard drives and CD-Rs). .Note)

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

p .(disp Open Firmware, 1.0.5 To continue booting the MacOS type: BYE\*<return\*> To continue booting from the default boot device type: BOOT\*<return\*> ok 0 \*> .disp)

p If your screen is black, then your system has defaulted to using a serial console. This is fairly common on Open Firmware 1 and 2 models if you do not use the System Disk tool to set up Open Firmware. You must hook up a serial console (38400 bps, 8 bits, no parity, 1 stop bit, no handshaking).

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

p .(disp .No 0 \*> Ic "setenv auto-boot? false .disp)

p To use your on-board video and keyboard, look up the proper .Sq output-device for your model on the .Nx*M webpage .Lk http://www.netbsd.org/Ports/macppc/models.html Run the following commands to use your screen instead of a serial console (replace .Sq Li screen with the correct .Sq output-device for your model):

p .(disp .No 0 \*> Ic "setenv output-device screen" .No 0 \*> Ic "setenv input-device kbd" .No 0 \*> Ic "reset-all" .disp)

p Now you should see the Open Firmware prompt on your screen.

p If your .Sq output-device is .Sq Li /chaos/control (i.e. you have a PowerMacintosh 7300 \(em 8600 system), there is a chance that your monitor will not sync. See .Lk http://www.netbsd.org/Ports/macppc/SystemDisk-tutorial/of105patch.html . .Ss2 Setting up pre-Open Firmware 3 to boot NetBSD . (Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p This section describes some steps you must take to prepare Open Firmware to boot .Nx . 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: .Lk http://www.netbsd.org/Ports/macppc/faq.html#ofw-access .Lk http://www.netbsd.org/Ports/macppc/faq.html#ofw-variables

p Double-check your Open Firmware version:

p .(disp .No 0 \*> Ic "dev /openprom" .No 0 \*> Ic ".properties" name openprom model Open Firmware, 1.0.5 relative-addressing ok .disp)

p If your system has Open Firmware prior to version 3, then you must set some Open Firmware variables before .Nx can boot. Do .Em not run these commands on Open Firmware 3 machines, as you may overwrite your firmware requiring a trip to Apple for repairs.

p .(disp .No 0 \*> Ic "setenv load-base 600000" .No 0 \*> Ic "setenv real-base F00000" .No 0 \*> Ic "reset-all" .disp)

p The last command reboots your machine so that the settings are stored.

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

p .(disp .No 0 \*> Ic "dev enet" .No 0 \*> Ic ".properties" [...] local-mac-address CCCCCCCC CCCC [...] ok .disp)

p .(Note Some early Open Firmware 1.0.5 machines had their MAC address stored incorrectly on the motherboard (little- vs. big-endian problems). The patches the System Disk installs will correct this. Without the patch, the machine will still work, but its MAC address may conflict with another ethernet device on your network. .Note)

p You can check your Open Firmware settings with the

a printenv command: .(disp .No 0 \*> Ic "printenv" little-endian? false false real-mode? false false auto-boot? false true diag-switch? false false [...] use-nvramrc? true false real-base F00000 -1 [...] load-base 600000 4000 [...] input-device kbd ttya output-device /chaos/control ttya .disp)

p .(Note Open Firmware 1.0.5 settings and nvram patches will be erased if you boot into .Tn MacOS No Ns . You will need to re-enter them before booting .Nx again. .Note)

p .(Note Open Firmware 2.0.x and Open Firmware 2.4 systems will set the .Li real-base environment variable to its default value (which prevents .Nx from booting) if you boot into .Tn MacOS No Ns . .Note) . .Ss2 Setting up Open Firmware 3 to boot NetBSD . (Open Firmware 3)

p This section describes some steps you must take to prepare Open Firmware to boot .Nx . 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: .Lk http://www.netbsd.org/Ports/macppc/faq.html#ofw-access .Lk http://www.netbsd.org/Ports/macppc/faq.html#ofw-variables

p Double-check your Open Firmware version:

p .(disp .No 0 \*> Ic "dev /openprom" .No 0 \*> Ic ".properties" name openprom device_type BootROM model OpenFirmware 3 relative-addressing supports-bootinfo ok .disp)

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

p .(disp .No 0 \*> Ic "dev enet" .No 0 \*> Ic ".properties" [...] local-mac-address CCCCCCCC CCCC [...] .disp)

p .(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 .Tn 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. .Note)

p You can check your Open Firmware settings with the

a printenv command: .(disp .No 0 \*> Ic "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 .disp) . .Ss2 Available Boot Media . (All Open Firmware versions)

p Each version of Open Firmware is capable of booting from a variety of media (such as hard drives, floppy disks, CD-ROMs, and ethernet). Open Firmware is able to boot files from a variety of file systems (such as ISO9660, MS-DOS, and on some models HFS and HFS+). Unfortunately, Open Firmware is .Em not able to use the .Nx file system (FFS), so we must put the bootloader in a location that Open Firmware is capable of using.

p Therefore, to boot the .Nx kernel, Open Firmware must first open a .Sq bootloader which knows how to load the .Nx kernel. There are two approaches, the

a ofwboot.xcf bootloader and the .Sq "partition zero" bootloader. In the former case, the user tells Open Firmware to load

a ofwboot.xcf and it will load the kernel. In the latter case, the user tells Open Firmware to boot from a particular device, and a primary bootloader

a bootxx is loaded, which then loads the secondary bootloader

a ofwboot which then loads the kernel. .(Note

a ofwboot.elf is obsoleted. All users should be using

a ofwboot.xcf instead of

a ofwboot.elf now. .Note)

p The following bootable media are available for loading the bootloader

q Pa ofwboot No or Pa ofwboot.xcf (see below for descriptions): .(bullet -offset indent . .Em "Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x"

.(bullet -compact Partition zero t Ethernet (netboot) t ISO9660 CD-ROM file system t MS-DOS file system .bullet) t .Em "Open Firmware 2.4"

.(bullet -compact Partition zero t Ethernet (netboot) t ISO9660 CD-ROM file system t HFS or HFS+ file systems t Hybrid (both ISO9660 and HFS) file system t MS-DOS file system .bullet) t .Em "Open Firmware 3"

.(bullet -compact HFS, HFS+, or Hybrid (ISO9660 and HFS) file system t Ethernet (netboot) t Partition zero (not supported by .Nx ) t MS-DOS file system .bullet) .bullet)

p Once

a ofwboot or

a ofwboot.xcf is loaded, it can open the kernel from one of the following sources: .(bullet -offset indent . .Em "Ethernet (NFS)" . t .Em "NetBSD FFS file system"

p Such as the boot floppy, or an installed .Nx partition. . t .Em "HFS or HFS+ file system"

p Only on Open Firmware 2.4 or Open Firmware 3 systems. . t .Em "ISO9660 CD-ROM file system" .bullet)

p The boot floppy image provided with the distribution sets has a .Sq "partition zero" bootloader and a .Nx file system with an installation kernel. The boot CD-R images provided with the distribution sets has both a .Sq "partition zero" bootloader and

a ofwboot.xcf on a hybrid partition so it can be booted on all Open Firmware versions. The boot CD-R image also has an ISO9660 file system with an installation kernel and the distribution sets.

p . .Ss2 Description of bootable media . (All Open Firmware versions)

p This section gives a quick description of the various media that can be used by Open Firmware to load the bootloader.

p .(bullet -offset indent . .Em "Partition zero"

(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p This method loads a primary bootloader called

a bootxx located in the Apple Partition Map, which then loads the secondary bootloader

a ofwboot (functionally identical to

a ofwboot.xcf (q.v.)) which then loads the kernel. This is what c sysinst will place on your hard drive during the installation procedure. Additionally, the .Nx*M CD-R images and boot floppies use this method to load a kernel from the floppy's FFS partition or the CD-R's ISO9660 partition. . t .Em "Partition zero"

(Open Firmware 3)

p While Open Firmware 3 supports this boot method, .Nx*M does not yet support it on these systems.

p t .Em "HFS or HFS+ file system"

(Open Firmware 2.4, Open Firmware 3)

p This method loads

a ofwboot.xcf from an HFS or HFS+ partition which then loads the kernel from an acceptable source (such as an FFS partition or an HFS or HFS+ partition). The FFS-based kernel may be on a previously installed .Nx file system.

p Alternatively, the kernel (compressed or non-compressed) may be on an HFS or HFS+ partition. Due to Open Firmware pickiness, it must be on the same partition as

a ofwboot.xcf . . t .Em "MS-DOS file system"

(All Open Firmware versions)

p Load the

a ofwboot.xcf bootloader from an MS-DOS file system (such as a floppy or Zip disk). It can then load a .Nx kernel from the same MS-DOS file system or elsewhere. This has only been thoroughly tested on floppy disks, but may work on FDISK-formatted hard drives. This does not work for MS-DOS partitions on a hard drive with an Apple Partition Map.

p . t .Em "Ethernet (network boot)"

(All Open Firmware versions)

p You can run your entire system diskless or netboot only the files necessary to boot (i.e. the bootloader and the installation kernel), but you must have root access on another x machine on your subnet. .(Note You must use your on-board ethernet device for netbooting. While there may be some PCI or Cardbus ethernet interfaces with Open Firmware ROMs, no one has reported success netbooting using these devices .Note) . t .Em "ISO9660 CD-ROM file system"

(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p Load the

a ofwboot.xcf bootloader from an ISO9660 CD-ROM. It can then load a .Nx kernel from the ISO9660 CD-ROM.

p Open Firmware 1.0.5 and 2.0.x machines will .Em not boot from the ISO9660 file system if you create a hybrid HFS/ISO format CD-R. Make sure that the CD .Em only has ISO9660 data and does not have an Apple Partition Map. .(Note Open Firmware can only open files on the first session of a multi-session CD-R .Note) . t .Em "Hybrid HFS/ISO9660 CD-ROM file system"

(Open Firmware 2.4, Open Firmware 3)

p Load the

a ofwboot.xcf bootloader from the CD-ROM's HFS file system. It can then load a .Nx kernel from the HFS or ISO9660 file system.

p Make sure that the CD has an Apple Partition Map. .(Note Open Firmware can only open files on the first session of a multi-session CD-R .Note) .bullet)

p . .Ss2 Partitioning your hard drive for NetBSD . (All Open Firmware versions)

p .(bullet -offset indent . .Em "Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x"

You must use the .Nx installer to partition your disk if you want it to be bootable. With this release of .Nx , there is no way to dual-boot .Tn MacOS and .Nx on one hard drive.

p You can use the instructions in this section to partition a disk that may also be used with .Tn MacOS No Ns , although a disk prepared in this way .Em "will not boot" .Em Nx No Ns . That means, your root partition .No ( Ns Pa / No Ns ) must be on a drive prepared with the .Nx installer, but the partitions not necessary to boot (for example

a /usr No Ns ,

a /home No Ns , or

a /export No Ns ) may be on the same disk as .Tn MacOS No Ns .

p Unless you are planning to use partitions on the same disk as .Tn MacOS No Ns , skip forward to .Sx Preparing the Bootable Media t .Em "Open Firmware 2.4"

We recommend using the .Nx installer to partition your disk, but you will not be able to use partitions on this drive with .Tn MacOS .

p If you'd like to have .Tn MacOS and .Nx partitions on one hard drive (and for both to be bootable), then read the rest of this section. t .Em "Open Firmware 3"

You must have at least one disk that was partitioned using a .Tn MacOS tool before installing .Nx on your system.

p This is the drive that will be holding the bootloader,

a ofwboot.xcf No Ns . Your .Nx 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 .Nx . If you are dedicating an entire disk to .Nx , then your .Tn MacOS partitioned disk only needs HFS or HFS+ partitions.

p The rest of this section describes how to make a single disk dual-bootable which is necessary for machines which have only one hard drive (such as the iBook, iMac, PowerBook, and PowerMacintosh Cube systems). .bullet)

p Using the .Nx installer to install a disklabel or bootloader will render your disk unusable by .Tn MacOS . Either will also prevent Open Firmware 3 machines from booting. You will need to use the installer's .Dq Re-install sets option. More information is provided below on this process.

p There are several contradictory partition numbering schemes. You may want to look at the explanation in the FAQ. .Lk http://www.netbsd.org/Ports/macppc/faq.html#partitions

p Unfortunately, the partitioning tools for .Nx are not advanced enough to create HFS or HFS+ file systems or a partition map that can be shared with .Tn MacOS . You will need to use the .Tn MacOS Drive Setup tool (versions 1.8.1 and later are known to work) to partition the hard drive you will be using for .Nx . Drive Setup will erase the contents of your drive -- it does not preserve data from any of your partitions. Make the following partitions: .(tag "A/UXxUserxandxA/UXxFree1" -offset indent t Em HFS No or Em HFS+ Must be large enough to hold the bootloader, over 100 KB. May be as large as you desire for .Tn MacOS usage. t Em "A/UX Root" Must be at least 20 MB. Alternatively, you may decide to use one partition for your entire .Nx installation, in which case it should be at least 200 MB without X, or 250 MB with X. .Nx interprets an .Em "A/UX Root" partition as the first partition .No ( Ns Em a No Ns ) on the disk. This partition is not readable from .Tn MacOS No Ns . t Em "A/UX Swap" Any size. The recommendation is 1.5 times your RAM, although this is not strictly necessary for machines with a lot of RAM. .Nx interprets an .Em "A/UX Swap" partition as the second partition .No ( Ns Em b No Ns ) on the disk. This partition is not readable from .Tn MacOS No Ns . t Em "A/UX User" No and Em "A/UX Free1" Use these for any additional partitions you may want to use under .Nx Ns , such as

a /usr No (at least 200 MB), Pa /home No Ns , Pa /usr/local No Ns , or

a /usr/pkg No Ns . .Nx interprets these partitions as normal .Nx No Ns -style partitions. These partitions are not readable from .Tn MacOS . t Em HFS Any size. You may want to leave an additional partition available to transfer files between .Tn MacOS and .Nx . If you think you'll be doing this often, then see the FAQ entry on sharing files: .Lk http://www.netbsd.org/Ports/macppc/faq.html#disk-sharing t Em UFS Any size. This file system type is not currently supported by .Nx*M although it might be in the future. .Em UFS partitions are not readable from .Tn MacOS versions prior to X 10.0.0.

p If you need further help, there is a partitioning HOW-TO on the .Nx website: .Lk http://www.netbsd.org/Ports/macppc/partitioning.html . .Ss2 Preparing the 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.

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

p To get the distribution sets (which will be placed on your hard drive) onto appropriate media, see the above section entitled .Sx Getting the NetBSD System on to Useful Media .No Ns . You may wish to do this at the same time you create the bootable media (such as netbooting and placing distribution sets on the netboot server, or booting from CD-R and placing distribution sets on the same disk)

p .(Note Some .Tn MacOS c ftp clients default to downloading files in .Sq ASCII mode. This will render the .Nx files useless. Make sure to set your ftp program to download in .Sq binary mode. .Note)

p These are the recommended techniques for booting the .Nx install kernel:

p .(bullet -offset indent . .Em "Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x"

.(bullet -compact Booting off an MS-DOS floppy t Booting off the .Nx install floppy t Booting off the .Nx*M install CD-R image t Booting off an ISO9660 CD-ROM t Booting over the ethernet t Booting the floppy image off a SCSI or IDE drive (not recommended) .bullet) t .Em "Open Firmware 2.4"

.(bullet -compact Booting off an MS-DOS floppy (may not be supported by Open Firmware 2.4) t Booting off the .Nx install floppy t Booting off the .Nx*M install CD-R image t Booting off an HFS or HFS+ partition t Booting off an ISO9660 CD-ROM t Booting off a Hybrid HFS/ISO9660 CD-ROM t Booting over the ethernet t Booting the floppy image off a SCSI or IDE drive (not recommended) .bullet) t .Em "Open Firmware 3"

.(bullet -compact Booting off an HFS or HFS+ partition t Booting off the .Nx*M install CD-R image t Booting off a Hybrid HFS/ISO9660 CD-ROM t Booting over the ethernet .bullet) .bullet)

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

p .(bullet . .To 2 "Booting off an MS-DOS floppy" .Em "Booting off an MS-DOS floppy"

(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p .(enum First, make sure you have done a low-level format on the disk. A bad floppy can produce Open Firmware errors similar to other problems. t Mount the floppy on your computer. .(bullet -compact Insert it into a Windows or DOS machine. t Use .Sq "File Exchange" No or Sq "PC Exchange" with .Tn MacOS versions prior to X 10.0.0 t Use .Xr mount_msdos 8 on any unix-like machine. .bullet) t Copy

a netbsd-INSTALL.gz No and Pa ofwboot.xcf to the floppy. t Rename

a netbsd-INSTALL.gz No to Pa netbsd.gz , since OpenFirmware can't deal with MS-DOS filenames longer than eight characters. .enum)

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting off the NetBSD install floppy" .Em "Booting off the" Nx Em "install floppy"

(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p .(enum First, make sure you have done a low-level format on the disk. A bad floppy can produce Open Firmware errors similar to other problems. t If the boot floppy image is compressed, then you will need to uncompress it first. t Use a tool to write the boot floppy image

a installation/floppy/boot.fs to a floppy disk

p .(bullet -compact .Em "From a UNIX machine" .(disp .No # Ic "dd if=boot.fs of=/dev/rfd0a bs=36k" .disp)

p t .Em "From a Windows machine"

p Get either the c rawrite.exe program from the .Nx Ns / Ns i386 distribution or c rawrite32.exe from .Lk http://www.duskware.com/rawrite32/

p t .Em "From a MacOS machine"

p Get c DiskCopy 6.3.3 from .Lk http://downloAd.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Macintosh/Utilities/Disk_Copy/Disk_Copy_6.3.3.smi.bin

p If you are running a .Tn MacOS version prior to 9.0, get .Lk ftp://ftp.netbsd.org/pub/NetBSD/arch/macppc/macos-utils/MakeDiskCopyFloppyType.hqx and un-BinHex it. Then, drag the

a boot.fs file onto this application, which will change the type and creator to

a dimg No and Pa ddsk , which is necessary for DiskCopy to work. .(enum Open the .Sq Utilities menu and pick .Sq Make Floppy

p t In the dialog box, select

a boot.fs

p t At the prompt, insert a blank floppy disk .enum)

p t .Em "From a MacOS machine (Alternate)"

p Get c suntar from .Lk http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/suntar-222.hqx .(enum Open the .Sq Preferences menu and pick .Sq Expert Mode

p t Open the .Sq Special menu and pick .Sq "Overwrite Sectors ..."

p t Insert a floppy disk

p t Hit return (i.e. start at sector number zero)

p t Select

a boot.fs and click .Dq Open

p t Open the .Sq File menu and pick .Sq Eject .enum) .bullet) .enum)

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting off an HFS or HFS+ partition" .Em "Booting off an HFS or HFS+ partition"

(Open Firmware 2.4, Open Firmware 3)

p Place

a ofwboot.xcf and the installation kernel

a netbsd-GENERIC_MD.gz at the top level of your Macintosh file system. That is, drag the two icons onto your hard drive icon (not the desktop). Make sure they're both on the same partition.

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting off the NetBSD/macppc CD-R image" .Em "Booting off the NetBSD/\*M CD-R image"

(All Open Firmware versions)

p Go to one of the .Nx mirror sites and download CD-R image from the

a pub/NetBSD/iso directory. .Lk http://www.netbsd.org/mirrors/#iso

p .(bullet .Em "From a UNIX machine"

p Get and install cdrecord. .Nx users should install it from the package collection. Other unix systems should get it from the official website:

.Lk ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/cdrecord/README.html

.Lk http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

p .(disp .No # Ic "cdrecord -v speed=4 dev=/dev/cd1c output.iso" .disp)

p You will need to substitute the correct name of the disk image file, speed for your CD writer, and the correct device for your system (for i386 it would be

a /dev/cd1d No Ns ).

p t .Em "From a MacOS machine (using Toast)"

p .(enum Open the .Sq Format menu and pick .Sq "Disk Image"

p t Click the .Dq Data... button and select the disk image you downloaded.

p t Click the .Dq "Write CD..." button .enum) .bullet)

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting off an ISO9660 CD-ROM" .Em "Booting off an ISO9660 CD-ROM"

(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p This section describes how to create your own bootable .Nx*M CD-R. We recommend that you use the official .Nx*M Ns -\*V CD-R image, as described in the section above.

p Place

a ofwboot.xcf and the installation kernel

a netbsd-GENERIC_MD.gz at the top level of the CD. Due to restrictions in the way that Open Firmware deals with ISO filenames, you may wish to name your kernel

a netbsd.gz . You may also place the .Nx \*V distribution sets on the disk.

p .(bullet .Em "From a UNIX machine"

p Get and install mkhybrid. This is now part of the cdrecord package. .Nx users should install it from the package collection. Other unix systems should get it from the official website:

.Lk ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/cdrecord/README.html

.Lk http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

p .(disp .No # Ic "mkhybrid -o output.iso -a -l -J -r -L /cdsources" .No # Ic "cdrecord -v speed=4 dev=/dev/cd1c output.iso" .disp)

p You will need to substitute the correct speed for your CD writer, and the correct device for your system (for i386 it would be

a /dev/cd1d No Ns ).

p See the .Nx Bootable CD-ROM HOW-TO for more detail: .Lk http://www.netbsd.org/Documentation/bootcd.html

p t .Em "From a MacOS machine (using Toast)"

p .(enum Open the .Sq Format menu and pick .Sq "ISO 9660"

p t Click the .Dq Data... button and drag

a installation/ofwboot.xcf and

a binary/kernel/netbsd-GENERIC_MD.gz into the window

p t Click the .Dq Settings tab, open the .Dq Naming popup menu, and pick .Dq "Macintosh Names"

p t Click the .Dq Done button

p t Click the .Dq "Write CD..." button .enum) .bullet)

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting off a hybrid HFS/ISO9660 CD-ROM" .Em "Booting off a hybrid HFS/ISO9660 CD-ROM"

(Open Firmware 2.4, Open Firmware 3)

p This section describes how to create your own bootable .Nx*M CD-R. We recommend that you use the official .Nx*M Ns -\*V CD-R image, as described two sections above.

p Place

a ofwboot.xcf and the installation kernel

a netbsd-GENERIC_MD.gz at the top level of the CD. Make sure that the bootloader is present on the HFS partition, and the kernel is on both the ISO9660 and HFS partitions. Due to restrictions in the way that Open Firmware deals with ISO filenames, you may wish to name your kernel

a netbsd.gz . You may also place the .Nx \*V distribution sets on the ISO9660 partition .No ( Ns Em not only on the HFS partition).

p .(bullet .Em "From a UNIX machine"

p Get and install mkhybrid. This is now part of the cdrecord package. .Nx users should install it from the package collection. Other unix systems should get it from the official website: .Lk ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/sysutils/cdrecord/README.html .Lk http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

p

.(disp .No # Ic "mkhybrid -o output.iso -hfs -part -a -l -J -r -L /cdsources" .No # Ic "cdrecord -v speed=4 dev=/dev/cd1c output.iso" .disp)

p You will need to substitute the correct speed for your CD writer, and the correct device for your system (for i386 it would be

a /dev/cd1d No Ns ).

p See the .Nx Bootable CD-ROM HOW-TO for more detail: .Lk http://www.netbsd.org/Documentation/bootcd.html

p t .Em "From a MacOS machine (using Toast)"

p .(enum Open the .Sq Format menu and pick .Sq "Mac/ISO Hybrid"

p t Open the .Sq Utilities menu and pick .Sq "Create Temporary Partition..."

p t Make this temporary partition large enough for all of the files you will be placing on the HFS portion of the CD (only

a ofwboot.xcf is necessary).

p t Copy

a installation/ofwboot.xcf to the temporary partition

p t Click the .Dq Data... button and select the temporary partition you just created

p t Click the .Dq ISO... button and drag

a binary/kernel/netbsd-GENERIC_MD.gz into the window. You may also want to drag the .Nx \*V distribution sets to this window as well.

p t Click the .Dq Settings tab, open the .Dq Naming popup menu, and pick .Dq "Macintosh Names"

p t Click the .Dq Done button

p t Click the .Dq "Write CD..." button .enum) .bullet)

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting over the ethernet" .Em "Booting over the ethernet"

(All Open Firmware versions)

p .so ../common/netboot

p Skip forward to .Sx Installing the NetBSD System . t .To 2 "Booting the floppy image off a SCSI or IDE drive" .Em "Booting the floppy image off a SCSI or IDE drive"

(Open Firmware 1.0.5, Open Firmware 1.1.22, Open Firmware 2.0.x, Open Firmware 2.4)

p If the boot floppy image is compressed, then you will need to uncompress it first.

p Find a spare bootable drive (i.e. SCSI or IDE), and use some tool to write the floppy disk image

a installation/floppy/boot.fs to your spare drive, and boot from that drive. For example, you could use a Zip drive, a Jaz drive, a Compact Flash drive, or even a spare hard drive. The floppy image has a .Sq "partition zero" bootloader which ultimately loads the installation kernel from the FFS file system from the disk image.

p .(bullet -compact .Em "From a UNIX machine"

p .(disp .No # Ic "dd if=boot.fs of=/dev/rsd0c" .disp)

p where

a /dev/rsd0c is the .Sq "whole disk" partition for the drive you will be using. Be certain you have typed this correctly, as it will erase the disk.

p t .Em "From a Windows machine"

p Get c rawrite32.exe from .Lk http://www.duskware.com/rawrite32/

p Be certain you have selected the correct disk, as it will erase the contents.

p t .Em "From a MacOS machine"

p Get c suntar from .Lk http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/suntar-222.hqx .(enum Open the .Sq Preferences menu and pick .Sq "Expert Mode"

p t Open the .Sq File menu and pick .Sq "Open Device ..."

p t Click on the .Dq "scan SCSI" button to get a list of which drives are attached.

p t Pick the correct drive. Be certain you have selected the correct disk, as it will erase the contents.

p t Open the .Sq Special menu and pick .Sq "Overwrite Sectors ..."

p t Hit return (i.e. start at sector number zero)

p t Select

a boot.fs and click .Dq Open

p t Open the .Sq File menu and pick .Sq "Close Device" .enum) .bullet) .bullet)