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
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.html.moremore(1)
and
less(1)
pager utility programs.
This is the format in which the on-line
man
pages are generally presented.
.txtYou are reading the HTML version.
This section contains some brief notes describing what you need to install NetBSD3.1.1 on a machine of the macppc architecture.
macppc/installation/floppy/boot1.fs
and
macppc/installation/floppy/boot2.fs,
which include the bootloader and installation kernel.
For systems without floppy drives (most are Open Firmware 3), fetch the
bootloader
macppc/installation/ofwboot.xcf
and the installation kernel
macppc/binary/kernel/netbsd-GENERIC_MD.gz.
If you have a CD-R, you can fetch the CD image,
macppccd.iso.
Alternatively, you may netboot the installation kernel. This process is
covered below, in detail.
macppc/binary/sets/
directory.
When you boot the install
kernel from floppies, hard drive, or CD-ROM,
the installation program
can fetch these files for you (using e.g. ftp),
if you have a network connection.
There are several other methods to get the binary sets onto
your machine.
You will at a minimum need
the following sets:
kern-GENERIC.tgz,
base.tgz
and
etc.tgz.
In a typical workstation installation you will probably want
all the installation sets.
ofwboot.xcf and netbsd-GENERIC_MD.gz
to your hard drive icon (the top level of the drive, not the desktop).
If you are using the CD image, burn it now.
The disk(s) you just prepared will be used to boot the installation kernel, which contains all the tools required to install NetBSD.
At present, NetBSD/macppc cannot exist on the same hard drive as Mac OS unless you partition your disk before running the installer. Open Firmware versions prior to 3 require a dedicated NetBSD drive -- you must use the entire disk, partitioned with the installation tools. Open Firmware version 3 cannot boot into NetBSD on a drive partitioned with the installation tools, you must partition your disk before running the installer, then select the ``Re-install sets or install additional sets'' option in the installer (selecting the ``Install NetBSD to hard disk'' or ``Upgrade NetBSD on a hard disk'' options will render your drive unbootable). If you are unsure, you may want to read the section below on Partitioning your hard drive for NetBSD
COMMAND-OPTION-O-F
keys after the boot chime starts, but before the chime ends.
Entering Open Firmware versions prior to 3 is usually the most frustrating
part of installation -- you may want to read the section below on
Older Open Firmware System Preparation
You should have the Open Firmware
``0 >''
prompt on your screen before attempting to boot
NetBSD/macppc.
For boot CDs, the command is something like
``boot cd:,\ofwboot.xcf netbsd.macppc''
(for Open Firmware 3) or
``boot scsi-int/sd@3:0 NETBSD.MACPPC''
(for earlier Open Firmware versions).
You will need to use the correct case for
OFWBOOT.XCF and NETBSD.MACPPC
depending on how your version of Open Firmware interprets the ISO
file system.
You may need to replace
cd
with
scsi/sd@3 , scsi-int/sd@3 , ata/atapi-disk ,
or some other device alias.
You should also use the Open Firmware
dir
command to confirm that the
NetBSD/macppc
kernel is called
NETBSD.MACPPC.
You may want to read the section below on
Open Firmware boot syntax
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.
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:
wd(4):
fix broken Seagate drive ST3160811A.
vnd(4)
image with block size 0 to avoid a kernel panic.
dhcpd.conf(5)
to make
dhcpd(8)
use the DNS hostname as the DHCP hostname given to the client.
ipfilter(4).
dump(8)
when using -X (filesystem internal snapshots).
glob(3),
which affected
ftpd(8)
and possibly other programs (SA2006-027).
iso(4)
which could potentially lead to a local root compromise (SA2007-004).
file(1)
which could lead to an exploitable heap overflow.
racoon(8)
which could allow an attacker to disrupt a connection between IPSec peers.
veriexec(4)
flaws have been fixed: users can no longer rename a file to a veriexec
protected file or run unfingerprinted files at strict level two or above.
file(1)
has been updated to version 4.21, including and integer underflow and an
integer overflow fix (CVE-2007-1536 and CVE-2007-2799).
etcupdate(8)
for upgrading.
passwd(1):
display a message indicating who's password is being changed, to avoid
confusion after
su(1).
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 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.
Refer to
http://www.NetBSD.org/mirrors/.
The root directory of the NetBSD3.1.1 release is organized as follows:
.../NetBSD-3.1.1/
CHANGESLAST_MINUTEMIRRORSREADME.filesTODOpatches/source/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:
config(8);
and
dbsym(8).
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:
BSDSUMCKSUMMD5SYSVSUMThe 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.
macppc
subdirectory of the distribution:
.../NetBSD-3.1.1/macppc/.
It contains the following files and directories:
INSTALL.htmlINSTALL.psINSTALL.txtINSTALL.more.more
file contains underlined text using the
more(1)
conventions for indicating italic and bold display.
binary/kernel/netbsd-GENERIC.gznetbsd-GENERIC.MP.gznetbsd-GENERIC_MD.gznetbsd-INSTALL.gzsets/installation/floppy/boot1.fsfloppy/boot2.fsofwboot.xcfmacppc/binary/sets
subdirectory
of the
NetBSD3.1.1
distribution tree, and are as follows:
/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.
/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.
GENERIC
kernel named
/netbsd.
You
must
install this distribution set.
GENERIC.MP
kernel, which will use multiple processors (if present), named
/netbsd.
/usr/share.
groff(1),
all related programs, and their manual pages.
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:
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.
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.
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
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 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.
binary/sets
and
macppc/binary/sets.
Proceed to the instruction on installation.
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.
/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.
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:
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.
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.
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.
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
[...]
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
Therefore, to boot the
NetBSD
kernel, Open Firmware must first load a
`bootloader'
(ofwboot.xcf)
which knows how to load the
NetBSD
kernel.
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:
This method loads
ofwboot.xcf
from an HFS or HFS+ partition which then loads the kernel from an acceptable
location. 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
ofwboot.xcf.
In this method, Open Firmware loads the
ofwboot.xcf
bootloader from an MS-DOS file system. It may then load a
NetBSD
kernel from the same MS-DOS file system.
This has only been thoroughly tested on floppy disks,
but may work on Zip disks or FDISK-formatted hard drives.
This does not work for MS-DOS partitions on a hard drive with an Apple
Partition Map.
You can run your entire system diskless or netboot only the files necessary to boot (i.e. the bootloader and the installation kernel). You must have root access for the UNIX-like netboot server, which must be on the same subnet as your NetBSD/macppc machine.
Load the
ofwboot.xcf
bootloader from the CD-ROM's HFS file system.
It can then load a
NetBSD
kernel from the HFS or ISO9660 file system.
Make sure that the CD has an Apple Partition Map.
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.
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:
/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.
Now would be a good time to use pdisk to determine the partition numbers for your bootloader and kernel.
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.
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
Go to one of the
NetBSD
mirror sites and download the CD-R image
macppccd.iso
from the
pub/NetBSD/iso
directory.
http://www.NetBSD.org/mirrors/#iso
Get and install cdrecord.
NetBSD
users should install it from the package collection.
Other
UNIX-like
systems should get it from the official website:
ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/cdrecord/README.html
http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
# cdrecord -v speed=4 dev=/dev/cd1c macppccd.iso
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
/dev/cd1d).
Skip forward to Installing the NetBSD System
Place
ofwboot.xcf
and the installation kernel
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.
Skip forward to Installing the NetBSD System
This section describes how to create your own bootable NetBSD/macppc CD-R. We recommend that you use the official NetBSD/macppc-3.1.1 CD-R image, as described in the section above.
Place
ofwboot.xcf
and the installation kernel
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
netbsd.gz.
You may also place the
NetBSD3.1.1
distribution sets on the
ISO9660 partition (not only on the HFS partition).
Get and install mkisofs.
This is now part of the cdrecord package.
NetBSD
users should install it from the package collection.
Other
UNIX-like
systems should get it from the official website:
ftp://ftp.NetBSD.org/pub/NetBSD/packages/pkgsrc/sysutils/cdrecord/README.html
http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
# mkisofs -o output.iso -hfs -part -l -J -r -L -N /cdsources
# cdrecord -v speed=4 dev=/dev/cd1c output.iso
You will need to substitute the correct speed for your CD writer, and the
correct device for your system (for i386 it would be
/dev/cd1d).
See the NetBSD Bootable CD-ROM HOW-TO for more detail: http://www.NetBSD.org/Documentation/bootcd.html
installation/ofwboot.xcf
and
binary/kernel/netbsd-GENERIC_MD.gz
into the window. You may also want to drag the
NetBSD3.1.1
distribution sets to this window as well.
Skip forward to Installing the NetBSD System
Open Firmware 3 cannot boot from a floppy disk, but you can still create a bootable Zip disk with this method.
mount_msdos(8)
on any
UNIX-like
machine.
netbsd-INSTALL.gz and ofwboot.xcf
to the disk.
netbsd-INSTALL.gz to netbsd.gz,
since OpenFirmware can't deal with MS-DOS filenames longer than eight
characters.
Skip forward to Installing the NetBSD System
To netboot a macppc, you must configure one or more servers to provide
information and files to your macppc (the
`client ).'
If you are using
NetBSD
(any architecture) on your netboot server(s), the information
provided here should be sufficient to configure everything.
Additionally, you may wish to look at the
diskless(8)
manual page and the manual pages for each daemon you'll be configuring.
If the server(s) are another operating system, you should consult the
NetBSD Diskless HOW-TO, which will walk you through the steps necessary to
configure the netboot services on a variety of platforms.
http://www.NetBSD.org/Documentation/network/netboot/
You may either netboot the installer so you can install onto a locally attached disk, or you may run your system entirely over the network.
Briefly, the netboot
process involves discovery, bootstrap, kernel and file system stages.
In the first stage, the client discovers information
about where to find the bootstrap program.
Next, it downloads and executes the bootstrap program.
The bootstrap program goes through another discovery phase to determine
where the kernel is located.
The bootstrap program tries to mount the NFS share containing the kernel.
Once the kernel is loaded, it starts executing.
For RAM disk kernels, it mounts the RAM disk file system and begins
executing the installer from the RAM disk.
For normal (non-RAM disk) kernels, the
kernel tries to mount the NFS share that had the kernel and starts
executing
the installation tools or
init(8).
All macppc systems use BOOTP for the discovery stage.
TFTP is used in the bootstrap phase to download
the bootstrap program,
ofwboot.xcf.
NFS is used in both the kernel and file system stages to download the
kernel, and to access files on the file server.
We will use
`CC:CC:CC:CC:CC:CC'
as the MAC address (ethernet hardware address) of your netboot client
machine.
You should have determined this address in an earlier stage.
In this example, we will use
`192.168.1.10'
as the IP address of your client and
`client.test.net'
as its name.
We will assume you're providing all of your netboot services
on one machine called
`server.test.net'
with the client's files exported from the directory
/export/client/root.
You should, of course, replace all of these with the names, addresses,
and paths appropriate to your environment.
You should set up each netboot stage in order (i.e. discovery, bootstrap, kernel, and then file system) so that you can test them as you proceed.
dhcpd(8)
in
bootpd(8)
compatible mode
Put the following lines in your
/etc/dhcpd.conf
(see
dhcpd.conf(5)
and
dhcp-options(5)
for more information):
ddns-update-style none;
# Do not use any dynamic DNS features
#
allow bootp; # Allow bootp requests, thus the dhcp server
# will act as a bootp server.
#
authoritative; # master DHCP server for this subnet
#
subnet 192.168.1.0 netmask 255.255.255.0 {
# Which network interface to listen on.
# The zeros indicate the range of addresses
# that are allowed to connect.
}
group {
# Set of parameters common to all clients
# in this "group".
#
option broadcast-address 192.168.1.255;
option domain-name "test.net";
option domain-name-servers dns.test.net;
option routers router.test.net;
option subnet-mask 255.255.255.0;
#
# An individual client.
#
host client.test.net {
hardware ethernet CC:CC:CC:CC:CC:CC;
fixed-address 192.168.1.10;
#
# Name of the host (if the fixed address
# doesn't resolve to a simple name).
#
option host-name "client";
#
# Name of the bootloader or kernel
# to download via tftp.
#
filename "ofwboot.xcf";
#
# The path on the NFS server.
#
option root-path "/export/client/root";
#
# If your DHCP server is not your NFS server, supply the
# address of the NFS server. Since we assume you run everything
# on one server, this is not needed.
#
# macppc machines will look for their bootloader,
# ofwboot.xcf, on the next-server as well.
#
# next-server server.test.net;
}
#you may paste another "host" entry here for additional
#clients on this network
}
You will need to make sure that the
dhcpd.leases
file exists.
# touch /var/db/dhcpd.leases
You will need to start the dhcpd. If it's already running, you will need to restart it to force it to re-read its configuration file. If the server is running NetBSD, you can achieve this with:
# /etc/rc.d/dhcpd restart
tftpd(8)
The default configuration of the TFTP server is to run in a
chroot(8)
environment in the
/tftpboot
directory.
Thus, the first order of business is to create this directory:
# mkdir -p /tftpboot
Next, edit
/etc/inetd.conf
and uncomment the line with the TFTP daemon:
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
Now, restart
inetd(8).
If the server is running
NetBSD,
you can achieve this with:
# /etc/rc.d/inetd restart
Now, you need to copy the
bootloader
for your macppc machine to
/tftpboot.
Get
ofwboot.xcf(8)
from the
installation
directory of the distribution.
# cp ofwboot.xcf /tftpboot
# chmod -R a+rX /tftpboot
Sometimes, the
arp(8)
table gets messed up, and the TFTP server can't communicate with the
client.
In this case, it will write a log message (via
syslogd(8))
to
/var/log/messages
saying:
`tftpd: write: Host is down'.
If this is the case, you may need to force the server to map your client's
ethernet address to its IP address:
# arp -s client CC:CC:CC:CC:CC:CC
nfsd(8),
mountd(8),
and
rpcbind(8)
Now your system should be able to load the bootstrap program and start looking for the kernel. Let's set up the NFS server. Create the directory you are exporting for the netboot client:
# mkdir -p /export/client/root
Put the following line in
/etc/exports
to enable NFS sharing:
/export/client/root -maproot=root client.test.net
If your server is currently running an NFS server, you only need to
restart
mountd(8).
Otherwise, you need to start
rpcbind(8)
and
nfsd(8).
If the server is running
NetBSD,
you can achieve this with:
# /etc/rc.d/rpcbind start
# /etc/rc.d/nfsd start
# /etc/rc.d/mountd restart
Now, if you place a kernel named
netbsd
in
/export/client/root
your client should boot the kernel.
If you are netbooting the installer, use
binary/kernel/netbsd-GENERIC_MD.gz
(this has the installation tools in a RAM disk).
Also, copy the distribution files to the client's root directory.
ofwboot.xcf
version have trouble loading compressed kernels. If you have trouble loading
a kernel, try uncompressing it with
gunzip(1)
# cp *tgz /export/client/root
# gunzip netbsd-GENERIC_MD.gz
# mv netbsd-GENERIC_MD /export/client/root/netbsd
If you are running your macppc diskless, simply use
binary/kernel/netbsd-GENERIC.gz.
You can skip this step if you do not plan to run your client diskless after installation. Otherwise, you need to extract and set up the client's installation of NetBSD. The Diskless HOW-TO describes how to provide better security and save space on the NFS server over the procedure listed here. http://www.NetBSD.org/Documentation/network/netboot/nfs.html
# cd /export/client/root
# tar -xpzf /path/to/files/base.tgz
# tar -xpzf /path/to/files/etc.tgz
Continue with the other non-essential distribution sets if desired.
# mkdir /export/client/root/swap
# dd if=/dev/zero of=/export/client/swap bs=4k count=4k
# echo '/export/client/swap -maproot=root:wheel client.test.net' | cat >> /etc/exports
# /etc/rc.d/mountd restart
# cd /export/client/root/dev
# ./MAKEDEV all
This procedure only works on NetBSD hosts.
fstab(5)
Create a file in
/export/client/root/etc/fstab
with the following lines:
server:/export/client/swap none swap sw,nfsmntpt=/swap
server:/export/client/root / nfs rw 0 0
rc.conf(5)
Edit
/export/client/root/etc/rc.conf
rc_configured=YES
hostname="client"
defaultroute="192.168.1.1"
nfs_client=YES
auto_ifconfig=NO
net_interfaces=""
Make sure rc does not reconfigure the network device since it will lose its connection to the NFS server with your root file system.
hosts(5)
file.
Edit
/export/client/root/etc/hosts
::1 localhost
127.0.0.1 localhost
192.168.1.10 client.test.net client
192.168.1.5 server.test.net server
If you want
these services to start up every time you boot
your server, make sure the following lines are present in your
/etc/rc.conf:
dhcpd=YES dhcpd_flags="-q"
nfs_server=YES # enable server daemons
mountd=YES
rpcbind=YES rpcbind_flags="-l" # -l logs libwrap
Also, you'll need to make sure the
tftpd
line in
/etc/inetd.conf
remains uncommented.
Skip forward to Installing the NetBSD System
If the NetBSD/macppc CD-R image is compressed, then you will need to uncompress it first.
Find a spare bootable drive (i.e. SCSI or IDE), and use some tool to write
the disk image
macppccd.iso
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 disk image has
an HFS partition with
ofwboot.xcf
which
loads the installation kernel from the ISO file system on the disk image.
# dd if=macppccd.iso of=/dev/rsd0c
where
/dev/rsd0c
is the
`whole disk'
partition for the drive you will be using.
Be certain you have typed this correctly, as it will erase the disk.
Get rawrite32.exe from http://www.duskware.com/rawrite32/
Be certain you have selected the correct disk, as it will erase the contents.
Get suntar from http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/suntar-223.hqx
macppccd.iso
and click
``Open''
Skip forward to
Installing the NetBSD System
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