About this Document............................................3
Quick install notes for the impatient..........................3
What is NetBSD?................................................5
Changes Between The NetBSD 4.0 and 5.0 Releases................5
General kernel..............................................5
Networking..................................................6
File systems................................................7
Security....................................................8
Drivers.....................................................8
Platforms..................................................13
Userland...................................................19
Components removed from NetBSD.............................23
Known Problems.............................................23
Features to be removed in a later release.....................24
The NetBSD Foundation.........................................24
Sources of NetBSD.............................................24
NetBSD 5.0_STABLE Release Contents............................24
NetBSD/macppc subdirectory structure.......................25
Binary distribution sets...................................26
NetBSD/macppc System Requirements and Supported Devices.......27
Supported models...........................................28
Unsupported models.........................................29
Supported devices..........................................29
Unsupported devices........................................32
Supported boot devices and media...........................32
Getting the NetBSD System on to Useful Media..................32
Preparing your System for NetBSD installation.................34
Prepare yourself...........................................34
Preparing your Open Firmware 3 System for NetBSD..............36
Updating your BootROM......................................36
Getting to Open Firmware 3.................................36
Setting up Open Firmware 3 to boot NetBSD..................37
Available Boot Media.......................................37
Partitioning your hard drive for NetBSD....................39
Preparing the Open Firmware 3 Bootable Media...............40
Creating the NetBSD/macppc CD-R.........................41
Preparing an HFS or HFS+ partition......................41
Preparing a custom hybrid HFS/ISO9660 CD-R..............41
Creating an MS-DOS disk.................................42
Preparing the netboot server............................42
Preparing a SCSI or IDE drive with the CD-R image.......47
Preparing your Open Firmware 1.x or 2.x System for NetBSD.....47
Getting to Open Firmware on Apple Network Servers..........48
Open Firmware 1 and 2 System Preparation...................48
Getting to Open Firmware (MacOS X or Darwin)...............49
Getting to Open Firmware (Best, MacOS 8 or 9)..............49
Getting to Open Firmware (Harder, MacOS 7, 8, or...........50
Getting to Open Firmware (Without using MacOS).............51
Setting up Open Firmware 1 and 2 to boot...................52
Available Boot Media.......................................53
Partitioning your hard drive for NetBSD....................54
Preparing the Open Firmware 1 or 2 Bootable Media..........56
Creating the NetBSD/macppc CD-R.........................56
Creating the NetBSD install floppies....................56
Creating a custom ISO9660 CD-R..........................57
Creating an MS-DOS disk.................................58
Preparing the netboot server............................58
Preparing a SCSI or IDE drive with the CD-R image.......63
Installing the NetBSD System..................................63
Open Firmware boot syntax..................................63
Examples of Open Firmware boot commands....................67
Booting the NetBSD/macppc install CD-R..................67
Booting the NetBSD install floppies.....................67
Booting an IDE or SCSI drive with an HFS partition......67
Booting a custom CD-ROM.................................68
Booting an MS-DOS floppy................................68
Booting over the ethernet...............................68
Booting an IDE or SCSI drive with 'partition zero'......69
Example of a normal boot...................................69
Common Problems and Error Messages.........................70
Black screen............................................70
Grey screen with flashing question mark.................70
Information on your screen seems garbled or out of sync.71
DEFAULT CATCH!..........................................71
CLAIM failed............................................71
can't OPEN..............................................71
unrecognized Client Program formatstate not valid.......72
bad partition number, using 0no bootable HFS partition..72
READ TIMEOUT@...........................................72
TFTP timeout............................................72
enet:,/netbsd.ram.gz: Inappropriate file type or format.72
Bootloader hangs before the copyright notice............72
Hang after configuring devices..........................72
Milestone..................................................73
Running the sysinst installation program...................73
Introduction............................................73
General.................................................73
Quick install...........................................73
Booting NetBSD..........................................74
Network configuration...................................74
Preparing a disk for Open Firmware 3 systems............75
Installation drive selection and parameters.............76
Selecting which sets to install.........................76
Partitioning the disk...................................76
Preparing your hard disk................................77
Getting the distribution sets...........................77
Installation from CD-ROM................................78
Installation using ftp..................................78
Installation using NFS..................................78
Installation from an unmounted file system..............78
Installation from a local directory.....................78
Extracting the distribution sets........................78
Making the device nodes.................................79
Finalizing your installation............................79
Finalizing Open Firmware settings..........................79
Booting NetBSD exclusively..............................79
Additional Open Firmware tips...........................80
Booting NetBSD and MacOS X or Darwin....................80
Booting NetBSD and MacOS 9 or earlier...................80
Other boot techniques...................................81
Post installation steps.......................................81
Upgrading a previously-installed NetBSD System................84
Compatibility Issues With Previous NetBSD Releases............84
Issues affecting an upgrade from NetBSD 3.x releases.......85
Issues affecting an upgrade from NetBSD 4.x releases.......86
Using online NetBSD documentation.............................86
Administrivia.................................................87
Thanks go to..................................................87
We are........................................................88
Legal Mumbo-Jumbo.............................................94
The End......................................................101
This document describes the installation procedure for
NetBSD
5.0_STABLE 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
.more
more(1)
and
less(1)
pager utility programs.
This is the format in which the on-line
man
pages are generally presented.
.txt
You are reading the HTML version.
This section contains some brief notes describing what you need to install NetBSD 5.0_STABLE 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-5.0_STABLE.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 57 different system architectures (ports) across 15 distinct CPU families, and is being ported to more. The NetBSD 5.0_STABLE 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. Please see the NetBSD web site at http://www.NetBSD.org/ for information on them.)
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 5.0_STABLE release provides numerous significant functional enhancements, including support for many new devices, integration of hundreds of bug fixes, new and updated kernel subsystems, and many user-land enhancements. The result of these improvements is a stable operating system fit for production use that rivals most commercially available systems.
It is impossible to completely summarize the massive development that went into the NetBSD 5.0_STABLE release. The complete list of changes can be found in the CHANGES: ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.0/CHANGES and CHANGES-5.0: ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-5.0/CHANGES-5.0 files in the top level directory of the NetBSD 5.0 release tree.
Some highlights include:
mutex(9)
,
rwlock(9)
,
and
condvar(9)
.
pset(3)
,
cpuset(3)
,
and
affinity(3)
.
kpreempt(9)
.
softint(9)
.
workqueue(9)
.
mremap(2)
,
to remap virtual memory addresses.
putter(9)
(Pass-to-Userspace Transporter), a generic request-response handler for kernel-attached userspace daemons.
pmf(9)
.
ddb(4)
if it panics. To get the old behavior, set ddb.onpanic to 1 in /etc/sysctl.conf.
ddb(4)
:
Added a
``whatis''
command, inspired by Solaris.
todr(9)
.
timecounter(9)
.
posix_madvise(2)
.
compat_linux(8)
and compat_linux32.
sockopt(9)
,
a new kernel API for passing socket options.
init(8)
program can be found, set the RB_ASKNAME flag and prompt users for the init path.
accept_filter(9)
,
accf_data(9)
,
and
accf_http(9)
.
fast_ipsec(4)
:
Added support for IPsec NAT-T.
pf(4)
:
Made
``nat''
and
``rdr''
translation rules obey state policy flags. Extended
pf.conf(5)
syntax to express the translation-state policies.
wapbl(4)
,
a preview of metadata journaling for FFS. Contributed by Wasabi Systems.
mount_hfs(8)
.
mount_efs(8)
.
mount_udf(8)
.
mount_psshfs(8)
,
to support
puffs(3)
sshfs.
mount_9p(8)
,
to support 9P file services with
puffs(3)
.
rump_nfs(8)
,
a userspace NFS client.
mount_sysctlfs(8)
,
to support browsing, querying, and modifying the
sysctl(3)
hierarchy.
refuse(3)
for FUSE compatibility functionality, layered on top of
puffs(3)
.
ukfs(3)
,
for standalone file system access.
p2k(3)
,
a
puffs(3)
to kernel vfs adaption library.
puffs(4)
:
Added support for NFS exporting puffs file servers.
newfs_ext2fs(8)
utility to create Ext2 file systems.
fsck_ext2fs(8)
,
fsck_ffs(8)
,
fsck_lfs(8)
:
Disable userid to username lookups by default and add -U flag to perform them.
scan_ffs(8)
:
Added -b option to search a partition for valid alternate superblocks.
fsck_ffs(8)
:
Added -x/-X options, which allow running fsck_ffs -n on a snapshot of a live filesystem.
security(8)
.
security(8)
.
opencrypto(9)
provider for VIA ACE (AES encryption instructions).
nsp(4)
,
a driver for NetOctave NSP2000, contributed by NBMK Encryption Technologies, ported from vendor FreeBSD SDK and integrated with opencrypto by Coyote Point Systems.
opencrypto(9)
:
Improved performance by adding asynchronous operation and batched submit/retrieve of requests/results. Contributed by Coyote Point Systems.
cgd(4)
:
Changed the default IV to encblkno1, which is faster without a real loss of security.
openssl(1)
:
Enabled support for Camellia.
pad(4)
,
a pseudo-audio device driver for feeding back raw PCM data to userland.
sgsmix(4)
,
a driver for the SGS 7433 mixer found in some G3 Macs.
umidi(4)
:
Added support for Roland UA25, UA4FX, and SonicCell devices.
dbri(4)
:
Added support for audio input.
auvia(4)
now works on big endian machines.
azalia(4)
:
AD1984 support was greatly improved. Added support for Realtek ALC662-GR and ALC269 codecs, which are found in EeePCs. Added support for ALC268.
auich(4)
:
Fixed a clock accounting problem that prevented detecting sample rates correctly.
powerd(8)
.
See
envsys(4)
and
sysmon_envsys(9)
.
aiboost(4)
,
a driver for the ASUS AI Booster ACPI Hardware monitor.
smsc(4)
,
a driver for the hardware monitoring portion of the SMSC LPC47B397.
aps(4)
,
a driver for the IBM Thinkpad Active Protection System.
coretemp(4)
,
a driver for Intel Core (and newer) on-die thermal sensors.
finsio(4)
,
a driver for various Fintek Super I/O chips.
amdtemp(4)
,
a driver for AMD CPU on-die thermal sensors.
dbcool(4)
,
a driver for Analog Devices dbCool chips including ADT7460, ADT7463, ADT7467, and ADM1030.
alipm(4)
,
a driver for the Acer Labs M7101 Power Management Controller.
admtemp(4)
,
a driver for the Analog Devices ADM1021 temperature sensor.
viaenv(4)
:
Added support for VIA VT8231.
nsclpcsio(4)
:
Added support for the VLM logical device.
lm(4)
:
Added an i2c attachment for the LM78 family of temp sensor and fan controllers.
jme(4)
,
a driver for the JMicron Technologies JME250 Gigabit Ethernet and JME260 Fast Ethernet controllers.
u3g(4)
,
a driver for many multi-port 3G datacards.
iwn(4)
,
a driver for the Intel Wireless LAN 4965AGN adapter.
zyd(4)
,
a driver for ZyDAS ZD1211/ZD1211B USB IEEE 802.11b/g wireless network devices.
uhmodem(4)
,
a driver for 3G wireless modems including Huawei E220 and E620, E-mobile D01HW and D02HW, and NTT DoCoMo a2502.
lii(4)
,
a driver for the Atheros L2 Fast Ethernet controller.
btuart(4)
,
a driver for Bluetooth HCI UART (H4).
ipw(4)
,
iwi(4)
,
wpi(4)
,
and
iwn(4)
.
For
ipw(4)
and
iwi(4)
,
the Intel EULA has to be accepted via
sysctl(8)
.
fxp(4)
:
Fixed some TX timeout and RX pool corruption problems. Added a workaround for a hardware ip4csum-tx bug.
bge(4)
:
Added support for BCM5786 and BCM5906(M). Fixed fiber card support.
nfe(4)
:
Added support for NVIDIA MCP67/73 Ethernet controllers. Fixed wakeup issues on some newer chips. Fixed a problem with receiving jumbo frames.
btbc(4)
:
Added support for AnyCom BlueCard devices.
rum(4)
:
Added support for MELCO WLI-U2-SG54HP, PLANEX GW-US54Mini2, COREGA CG-WLUSB2GL and K.K. CG-WLUSB2GPX, and ABOCOM WUG2700.
makphy(4)
:
Added support for Marvell 88E1116 Gigabit PHY.
gem(4)
:
Added support for Sun PCI SX fiber cards and Sun SBus SX fiber cards.
wm(4)
:
Added support for the Intel PRO/1000 PT Quad Port Server Adapter. Fixed a bug on receiving a jumbo frame which lead to a panic in sbcompress(). Added support for more ICH9 devices. Fixed an EEPROM-trashing bug on ICH8 and ICH9 chipsets.
udav(4)
:
Added support for Shantou ADM8515.
brgphy(4)
:
Added support for BCM5708C.
re(4)
:
Made hardware
vlan(4)
insertion/extraction work properly. Added support for the Realtek 8102E/8102EL PCIe 10/100 Ethernet adapters, as well as the 8111C chips that are found on many Intel-based motherboards.
sk(4)
,
msk(4)
:
Fixed a lock panic on receiving jumbo packets.
msk(4)
:
Fixed a Yukon EC Ultra cold power up issue.
bnx(4)
:
Added support for SerDes controllers.
vge(4)
:
Added ifconfig down and ALTQ support.
arcmsr(4)
,
a driver for Areca Technology Corporation SATA RAID controllers.
siisata(4)
,
a driver for Silicon Image SteelVine SATA-II controllers (SiI3124, SiI3132, and SiI3531).
isp(4)
:
Major update, including 4Gb (24XX) card support and new firmware sets.
piixide(4)
:
Added support for ICH10.
ahcisata(4)
:
Added support for ATAPI devices.
svwsata(4)
:
Added support for ServerWorks HT-1000 SATA controller.
njata(4)
:
Added support for Workbit CF32A CF adapter.
viaide(4)
:
Added support for VIA CX700, CX700M2, NVIDIA MCP67, and MCP73/77 controllers.
mfi(4)
:
Added support for LSI SAS1078 and Dell PERC 6 controllers.
mpt(4)
:
Fixed performance problems for old revisions of the Symbios 53c1030.
cac(4)
:
Added initial
bio(4)
support; only volume status is handled at this time.
siop(4)
:
Added support for the non-PCI NCR 53c720/770 in big-endian mode.
twa(4)
:
Added support for 3ware 9650 and 9690, based on contributions from Wasabi Systems.
ciss(4)
:
Added
bio(4)
support.
ataraid(4)
:
Added NVIDIA MediaShield, JMicron RAID, and Intel MatrixRAID support. Added support for status reports through
bio(4)
.
ixpide(4)
:
Added support for ATI SB700/SB800 controllers.
aac(4)
:
Added support for raw I/O mode and >2TB.
umass(4)
:
Added support for Sony GPS GPS-CS1. Fixed a panic on device removal.
aic(4)
:
Worked around an rbus resource allocation problem so that aic PCMCIA cards work again.
vnd(4)
,
and
cgd(4)
.
uvideo(4)
,
a driver for USB Video Class capture devices, from Patrick Mahoney's Google Summer of Code 2008 project.
uslsa(4)
,
a driver for CP210x USB-RS232 devices.
uchcom(4)
,
a driver for WinChipHead CH341/340 and HL-340 USB-Serial adapters.
uberry(4)
,
a driver to allow RIM BlackBerries to charge from the USB port.
bus_dmamap_sync(9)
calls to
uhci(4)
,
ohci(4)
,
and
ehci(4)
to prevent the CPU from reordering loads and stores against DMA descriptors. This fixes
``host controller process error/host controller halted''
errors.
ehci(4)
:
Added isochronous transfer support, contributed by Jeremy Morse as part of his Google Summer of Code 2008 project.
ukbd(4)
:
Added support for function keys F16 through F19.
uplcom(4)
:
Added support for Willcom WS002IN PHS and SMART Technologies-badged devices. Recognize Corega CG-USBRS232R as a serial device.
ugensa(4)
:
Added support for Novatel Wireless Merlin CMDA and Ovation U727.
ubsa(4)
:
Added support for CDMA modems sold by Eurotel/O2.
uftdi(4)
:
Added support for Sealevel SeaPORT+4 USB to Serial adapter.
slhci(4)
:
Replaced with Matthew Orgass's driver.
video(4)
,
a video4linux2 compatible capture interface, part of Patrick Mahoney's Google Summer of Code 2008 project.
uvideo(4)
,
a driver for USB Video Class capture devices, from Patrick Mahoney's Google Summer of Code 2008 project.
pseye(4)
,
a driver for the Sony PLAYSTATION(R) Eye USB webcam.
genfb(4)
,
a generic framebuffer console driver with PCI and SBus frontends.
isv(4)
,
a driver for the IDEC Supervision/16 image capture board.
wscons(4)
:
Added scrollback support to vcons.
cgfourteen(4)
:
Added support for wscons.
agp(4)
:
Added support for ALI M1689, MB i965Q, Intel Q33/35/G33, Intel 945GME, and Intel 946GZ.
bktr(4)
now works on amd64.
pud(4)
,
a driver that makes it possible to implement block and character devices in userspace.
spdmem(4)
,
a Serial Presence Detect driver that decodes technical specs stored in the eeprom on common types of memory modules.
bcsp(4)
to support the BlueCore Serial Protocol.
thinkpad(4)
,
a driver to support IBM/Lenovo Thinkpad hotkeys, brightness controls, and temperature and fan monitoring.
gcscpcib(4)
,
a driver for the AMD CS5535 and CS5536 Companion Device with support for the timecounter, watchdog timer, and GPIO.
ichsmb(4)
,
a driver for Intel ICH SMBus controllers.
asus(4)
,
a driver for ASUS ACPI hotkeys as found in the EeePC.
acpidalb(4)
,
a driver for PNP0C32 ACPI hotkeys, aka the Direct Application Launch Buttons.
hpqlb(4)
,
a driver for hotkeys on some HP notebooks.
adb(4)
:
New and simplified MI ADB drivers.
ichlpcib(4)
:
Added support for the TCO (watchdog) on ICH6 or newer chipsets. Now runs on EM64T systems as well.
itesio(4)
:
Added support for the watchdog timer.
ulpt(4)
:
Implemented non-blocking read.
puc(4)
:
Added support for the I-O DATA RSA-PCI 2 port serial board, Digi International 4 and 8 port boards, and B&B Electronics MIPort serial boards.
piixpm(4)
:
Added support for ATI SB600, SB700, and SB800 SMBus controllers.
wscons(4)
:
Added support for the Colemak keyboard layout.
com(4)
:
Added support for PCMCIA Sierra Wireless Aircard 850.
nfsmb(4)
:
Added support for numerous NVIDIA chipsets.
boot.cfg(5)
to configure the bootloader.
mbr(8)
variants that directly access serial ports.
ddb(4)
session on a VGA console if the system crashed while X11 was running.
boot(8)
:
Added support for the multiboot protocol. This allows booting Xen without GRUB.
cmos(4)
,
a driver for CMOS RAM.
delay(9)
issue and now the P5064 kernel works in gxemul.
compat_osf1(8)
again.
wdc(4)
frontend for the buddha and catweazle Z2 hardware.
sysinst(8)
support.
eeprom(8)
from actually changing firmware settings.
wdc(4)
.
genfb(4)
.
sysinst(8)
support.
spl(9)
bug which could cause a network freeze on traffic between two network interfaces.
gdb(1)
support.
sysinst(8)
support.
bus_dmamap_load(9)
so that NFS write works with
re(4)
.
sn(4)
to use the MI SONIC driver.
bus_dma(9)
,
bus_space(9)
,
SMP, and IPI frameworks.
genfb(4)
is now the default framebuffer.
gcc(1)
:
Fix jump table addressing in the M68k codegen.
memcpy(3)
,
memmove(3)
,
and
memcmp(3)
.
eeprom(8)
from actually changing firmware settings.
macekbc(4)
,
onboard display adapter
crmfb(4)
,
and audio driver
mavb(4)
.
tl(4)
.
light(4)
.
sq(4)
interface on the Challenge S's IOPLUS mezzanine.
ddb(4)
.
dhclient(8)
to the install disk image.
wscons(4)
.
genfb(4)
.
sysinst(8)
support.
pthread(3)
:
malloc(3)
with jemalloc, bringing a significant performance boost for many threaded workloads that make heavy use of malloc.
curses(3)
:
termattrs(3)
and
term_attrs(3)
.
getwin(3)
and
putwin(3)
.
util(3)
:
estrndup(3)
.
raise_default_signal(3)
.
math(3)
.
proplib(3)
:
prop_dictionary_make_immutable(3)
.
prop_array_util(3)
functions.
dehumanize_number(3)
.
posix_memalign(3)
.
strspn(3)
,
strcspn(3)
,
and
strpbrk(3)
with O(n+m) implementations.
getlogin_r(2)
.
imaxabs(3)
and
imaxdiv(3)
.
atomic_ops(3)
in userspace.
queue(3)
:
Added TAILQ_CONCAT() and STAILQ_CONCAT().
httpd(8)
.
rump(3)
,
the Runnable Userspace Meta Program framework. Allows running kernel code in userspace applications.
cpuctl(8)
,
a utility that allows placing CPUs online/offline.
schedctl(8)
,
a program to control scheduling of processes and threads.
psrset(8)
,
a utility to control processor sets.
atf(7)
,
the Automated Testing Framework, Julio M. Merino Vidal's 2007 Google Summer of Code project.
newgrp(1)
,
a utility to change effective group ID.
tcpdrop(8)
,
a utility to drop
tcp(4)
connections.
acpidump(8)
and
amldb(8)
.
dkscan_bsdlabel(8)
to scan disks for BSD disklabels.
btkey(1)
,
a utility to manage Bluetooth link keys in OS and device storage.
svhlabel(8)
,
a tool to update
disklabel(5)
from SGI Volume Header, like
mbrlabel(8)
for MBR labels.
pcc(1)
as an alternative compiler.
btpand(8)
,
a Bluetooth Personal Area Networking profile daemon.
c99(1)
as a wrapper to run
cc(1)
in C99 mode.
ld(1)
can now link 32bit objects on amd64.
vi(1)
has been updated to nvi 1.81, which supports internationalization. It also grew a new NetBSD-specific expandtab option.
pkill(1)
:
Added the -l (long format) option.
find(1)
:
Added the -delete and -E (extended regex) options.
xargs(1)
:
Replaced with FreeBSD's while keeping our GNU compatible exit values.
sdiff(1)
:
Replaced by OpenBSD's
sdiff(1)
.
pax(1)
:
Added a -V flag for verbose summary without listing.
top(1)
:
Allow a single process to be selected by pid. Added a thread mode that displays LWPs.
scsictl(8)
:
Added a setspeed command.
split(1)
:
Added a new option
``-n chunk_count''
that splits the input into chunk_count smaller files.
df(1)
:
Fixed the -P option and added the -g (gigabytes) option.
wtf(6)
now searches pkgsrc's help database when called inside a package directory.
atactl(8)
:
Improved SATA support.
wlanctl(8)
:
Added a -p flag that only prints public nodes.
btconfig(8)
:
Added a new
``rssi''
option to toggle inquiry results with RSSI.
ifconfig(8)
:
Added
``list scan''
to ifconfig, which lists access points in the neighborhood.
newsyslog.conf(5)
gained a
``J''
flag to bzip2 logfiles.
fdisk(8)
now reports the first active partition.
bioctl(8)
was rewritten to handle new features like creating and removing hot-spares, pass-through disks and RAID volumes, start/stop consistency checks in volumes.
savecore(8)
now uses the raw device to read crashdumps.
make(1)
:
Implemented
``-dl''
(aka LOUD) to override
``@''
at the start of script lines.
monop(6)
:
The save and restore format changed, breaking compatibility with already broken previous save files.
iconv(1)
now allows SUSv3 syntax.
lint(1)
:
Added _Complex support.
ftp(1)
:
Added epsv6 and epsv to disable extended passive mode.
getent(1)
:
Added support for
``netgroup''
databases.
ypserv(8)
:
Disabled libwrap address to hostname lookups to avoid the chance of ypserv blocking for an extended period of time due to a long DNS timeout.
postfix(1)
:
Enabled LDAP support for tables.
amd(8)
:
Enabled LDAP support for maps.
newfs(8)
:
Added support for the
``t''
(terabytes) suffix.
grep(1)
:
A warning is now printed if
``-r''
is used without specifying an argument.
db(1)
:
Added support for encoding or decoding VIS_HTTPSTYLE, and for tuning the page size of the database.
daily.conf(5)
:
Added run_fsck_flags to allow passing extra options to the daily fsck -n.
sysinst(8)
now supports the Colemak and Dvorak keyboard layouts.
od(1)
Added support for the
``-A addressformat''
flag.
etcupdate(8)
:
Removed the
``-b binarydir''
and
``-s srcdir/etc''
options which were deprecated in NetBSD-4.0. Deprecate the
``-s tgz1:tgz2''
option; please use
``-s tgz1 -s tgz2''
instead.
postinstall(8)
:
Deprecated the
``-s tgz1:tgz2''
option; please use
``-s tgz1 -s tgz2''
instead.
sed(1)
:
Added the -r flag, which is an alias for -E, to be compatible with GNU sed.
patch(1)
:
Merged improved version from DragonFly. patch -b now behaves as specified by POSIX.
rc.conf(5)
:
ifconfig_xxN variables may now have multi-line values, just like /etc/ifconfig.xxN files, and semicolons may be used instead of line breaks.
ls(1)
:
-n now implies -l.
ps(1)
:
Added the -A option, to display information about all processes. Use
``O''
for LSONPROC like Solaris instead of bundling LSIDL, LSRUN, and LSONPROC to
``R''.
ksh(1)
:
Fixed POSIX mode interpretation of backslashes inside backquotes inside double quotes.
makefs(8)
:
Made the allow-multidot option for cd9660 useful.
restore(8)
now works on Linux dump volumes, by ignoring extended attribute records on these volumes.
rc.d(8)
script for
rndctl(8)
.
MAKEDEV(8)
now creates /dev rather than
init(8)
.
MAKEDEV(8)
now uses
mtree(8)
in preference to
pax(1)
and
mknod(8)
,
making node creation more efficient, and
mount_tmpfs(8)
in preference to
mount_mfs(8)
when creating a memory file system.
MAKEDEV.local(8)
can now use functions defined in
MAKEDEV(8)
.
Besides this list, there have also been innumerable bug fixes and miscellaneous enhancements.
In this release of NetBSD, the following software components have been removed from the system. Some were not useful anymore, or their utility did not justify the maintenance overhead. Others were not working properly and there was a lack of interest in fixing them.
Using block device nodes directly for I/O may cause a kernel
crash when the file system containing
/dev
is FFS and is mounted with -o log.
Workaround: use raw disk devices, or remount the file system
without -o log.
Occassionally, gdb may cause a process that is being debugged to hang when ``single stepped''. Workaround: kill and restart the affected process.
gdb cannot debug running threaded programs correctly.
Workaround: generate a core file from the program using
gcore(1)
and pass the core to gdb, instead of debugging the running program.
Statically linked binaries using pthreads are currently broken.
Certain early revision AMD Opteron and Athlon 64 processors contain a bug that may cause system instability when running with more than one CPU core active. An OS-level workaround for this issue has been prepared but was not ready in time for inclusion in NetBSD 5.0. It will be available as part of a later release in the 5.0 series.
Large filesystems (over 2TB) may sometimes falsely claim to be out of space. A fix for this is available, but was not made in time for 5.0. It will be available as part of a later release in the 5.0 series.
The sparc port does not have functional SMP support in this release.
mount(8)
)
will be removed in the next major release.
NetBSD
5.0_STABLE
includes a preview of WAPBL
(Write Ahead Physical Block Logging),
which will replace soft dependencies in the next major release.
See
wapbl(4)
and
http://mail-index.netbsd.org/netbsd-announce/2008/12/14/msg000051.html
for details.
It should be considered as deprecated. Users are expected to not rely on it any more beyond this major release.
Further, at least version 3.1 of Xen will be required to run NetBSD as Dom0 or DomU.
The
NetBSD
Foundation is a tax exempt, not-for-profit 501(c)(3) corporation
that devotes itself to the traditional goals and Spirit of the
NetBSD
Project and owns the trademark of the word
``NetBSD''.
It supports the design, development, and adoption of
NetBSD
worldwide.
More information on the
NetBSD
Foundation, its composition, aims, and work can be found at:
http://www.NetBSD.org/foundation/
Refer to
http://www.NetBSD.org/mirrors/
The root directory of the NetBSD 5.0_STABLE release is organized as follows:
.../NetBSD-5.0_STABLE/
CHANGES
CHANGES-5.0
CHANGES.prev
LAST_MINUTE
README.files
source/
In addition to the files and directories listed above, there is one directory per architecture, for each of the architectures for which NetBSD 5.0_STABLE 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(1)
utility.
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:
MD5
SHA512
The SHA512 digest is safer, but MD5 checksums are provided so that a wider range of operating systems can check the integrity of the release files.
macppc
subdirectory of the distribution:
.../NetBSD-5.0_STABLE/macppc/
.
It contains the following files and directories:
INSTALL.html
INSTALL.ps
INSTALL.txt
INSTALL.more
.more
file contains underlined text using the
more(1)
conventions for indicating italic and bold display.
binary/
kernel/
netbsd-GENERIC.gz
netbsd-GENERIC.MP.gz
netbsd-GENERIC_MD.gz
netbsd-INSTALL.gz
sets/
installation/
floppy/boot1.fs
floppy/boot2.fs
ofwboot.xcf
macppc/binary/sets
subdirectory
of the
NetBSD
5.0_STABLE
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 X.Org. Binary sets for the X Window System are distributed with NetBSD. The sets are:
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 -xzpf
command from the root directory (
/
) of your system.
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 100 MB of disk space. To install the entire system requires considerably more, plus space for the swap partition (usually the RAM size, unless you've got a lot of RAM). To use X, 32MB of RAM is required. 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 writable media, it 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 instructions on installation.
split(1)
command, running e.g.
split -b 235k base.tgz base.
to split the
base.tgz
file from
macppc/binary/sets
into files named
base.aa
,
base.ab
,
and so on.
Repeat this for all
set_name.tgz
files, splitting them into
set_name.
xx
files.
Count the number of
set_name.
xx
files that make up the
distribution sets you want to install or upgrade.
You will need one sixth that number of 1.44 MB floppies.
Format all of the floppies with
MS-DOS.
Do
not
make any of them bootable
MS-DOS
floppies, i.e. don't use
format
/s
to format them.
(If the floppies are bootable, then the
MS-DOS
system files that make them bootable will take up some space, and you
won't be able to fit the distribution set parts on the disks.)
If you're using floppies that are formatted for
MS-DOS
by their manufacturers, they probably aren't bootable, and you can use
them out of the box.
Place all of the
set_name.
xx
files on the
MS-DOS
disks.
Once you have the files on MS-DOS disks, 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.
204.152.190.13
and the IPv6 address is
2001:4f8:3:7:230:48ff:fe31:43f2
(as of April, 2009).
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 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.
If you're making the tape on a UNIX-like system, the easiest way to do so is probably something like:
#
tar -cf tape_device dist_directories
where
tape_device
is the name of the tape device that
describes the tape drive you're using; possibly
/dev/rst0
,
or something similar, but it will vary from system to system.
(If you can't figure it out, ask your system administrator.)
In the above example,
dist_directories
are the
distribution sets' directories, for the distribution sets you
wish to place on the tape.
For instance, to put the
kern-GENERIC, base, and etc
distributions on tape (in
order to do the absolute minimum installation to a new disk),
you would do the following:
#
cd .../NetBSD-5.0_STABLE
#
cd macppc/binary
#
tar -cf tape_device kern-GENERIC base etc
Once you have the files on the tape, 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 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 documented below.
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 Support Downloads' web site at http://support.apple.com/downloads/ 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 image provided 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-5.0_STABLE.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/cdrtools/README.html
http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
# cdrecord -v speed=4 dev=/dev/cd1c macppccd-5.0_STABLE.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-5.0_STABLE 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
NetBSD5.0_STABLE
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/cdrtools/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/docs/bootcd.html
installation/ofwboot.xcf
and
binary/kernel/netbsd-GENERIC_MD.gz
into the window. You may also want to drag the
NetBSD5.0_STABLE
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/docs/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. See http://www.NetBSD.org/docs/network/netboot/nfs.html for details.
# 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-5.0_STABLE.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-5.0_STABLE.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-5.0_STABLE.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
Skip down to the section on Setting up Open Firmware 1 and 2 to boot NetBSD since the next several pages are instructions for MacOS models.
Unless you use a MacOS-based utility to set these variables correctly, you 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 `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 `input-device' and `output-device' variables to `ttyb' (which is the Printer serial port) or remove the internal modem.
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.
Now would be a good time to look at the NetBSD/macppc Model Support webpage to determine the issues with your model. http://www.NetBSD.org/ports/macppc/models.html
In particular, some models must use a serial console, or they will be unable to boot NetBSD at all. All models can be set to use a serial console, if you desire to bypass the keyboard and screen.
If, after re-reading the next several sections, you still need help figuring out your `input-device' and `output-device' settings, see the FAQ: http://www.NetBSD.org/ports/macppc/faq.html#ofw-input-output-devices
If you need to use a serial console, you can use a normal `printer' cable (mini-DIN 8 to mini-DIN 8) and a MacOS tool, such as ZTerm to connect a MacOS system to your NetBSD/macppc system. http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/comm/term/zterm-101.hqx http://homepage.mac.com/dalverson/zterm/
See the NetBSD Serial Port Primer for additional help and references: http://www.NetBSD.org/docs/Hardware/Misc/serial.html
All Open Firmware 1 and 2 macppc 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 MacOS 9 tool called System Disk, which patches most of these bugs. We 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.
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
Getting to Open Firmware (Harder, MacOS 7 thru 9)
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
# 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.
You should now see the Open Firmware command prompt on your screen:
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 >
If your screen is black, then your model has defaulted to using a serial console. You must hook up a serial console (38400 bps, 8 bits, no parity, 1 stop bit, no handshaking).
For a brief tutorial on how to use System Disk, see: http://www.NetBSD.org/ports/macppc/SystemDisk-tutorial/
Launch the MacOS System Disk tool. Click on ``Power User (Open Firmware)'' then click on the ``Advanced Options'' button. Now, click on the checkbox that says ``Stop Boot at Open Firmware prompt'' and select ``OK''. Click the ``Save'' button and reboot your system.
COMMAND-OPTION-P-R
keys during the boot chimes, or if you accidentally boot into
MacOS
9 or earlier.
If your
`output-device'
is
`/chaos/control
'
(i.e. you have a PowerMacintosh 7300 -- 8600 system), there is a chance that
your monitor will not sync.
See
http://www.NetBSD.org/ports/macppc/SystemDisk-tutorial/of105patch.html
You should now see the Open Firmware command prompt on your screen:
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 >
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 `Modem' port of your system (38400 bps, 8 bits, no parity, 1 stop bit, no handshaking).
0 > setenv auto-boot? false
0 > setenv use-nvramrc? false
0 > reset-all
ftp://ftp.NetBSD.org/pub/NetBSD/arch/macppc/macos-utils/bootvars/bootvars.sit.hqx
Look up the proper `output-device' for your model on the NetBSD/macppc Model Support webpage. http://www.NetBSD.org/ports/macppc/models.html If the NetBSD/macppc Model support webpage does not list an `output-device' for your model, then your system will default to using the on-board video. You needn't fill in the `output-device' and `input-device' variables.
Launch the MacOS BootVars tool. Uncheck the ``auto-boot?'' checkbox, then check on the ``All Variables'' checkbox and type kbd into the `input-device' box, and the proper device name into the `output-device' box. Click on the ``write'' button, and then reboot your system.
If your
`output-device'
is
`/chaos/control
'
(i.e. you have a PowerMacintosh 7300 -- 8600 system), there is a chance that
your monitor will not sync.
See
http://www.NetBSD.org/ports/macppc/SystemDisk-tutorial/of105patch.html
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 NetBSD/macppc Model Support webpage.
You should now see the Open Firmware command prompt on your screen:
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 >
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).
0 > setenv auto-boot? false
If you don't have 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.
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 or serial console:
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 >
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).
Now, set your system to always stop at the Open Firmware prompt.
0 > setenv auto-boot? false
To use your on-board video and keyboard, look up the proper
`output-device'
for your model on the
NetBSD/macppc
webpage
http://www.NetBSD.org/ports/macppc/models.html
Run the following commands to use your screen instead of
a serial console
(replace
`screen
'
with the correct
`output-device'
for your model):
0 > setenv output-device screen
0 > setenv input-device kbd
0 > reset-all
Now you should see the Open Firmware prompt on your screen.
If your
`output-device'
is
`/chaos/control
'
(i.e. you have a PowerMacintosh 7300 -- 8600 system), there is a chance that
your monitor will not sync.
See
http://www.NetBSD.org/ports/macppc/SystemDisk-tutorial/of105patch.html
Double-check your Open Firmware version:
0 > dev /openprom
0 > .properties
name openprom
model Open Firmware, 1.0.5
relative-addressing
ok
If your system has Open Firmware prior to version 3, then you must set some Open Firmware variables before NetBSD can boot. Do not run these commands on Open Firmware 3 machines, as you may overwrite your firmware requiring a trip to Apple for repairs.
0 > setenv load-base 600000
0 > setenv real-base F00000
0 > reset-all
The last command reboots your machine so that the settings are stored.
If you will be netbooting your system, you can look up your MAC address.
0 > dev enet
0 > .properties
[...]
local-mac-address CCCCCCCC CCCC
[...]
ok
You can check your Open Firmware settings with the
printenv
command:
0 > 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
real-base
environment variable to its default value (which prevents
NetBSD
from booting) if you boot into
MacOS 9
or earlier.
Therefore, to boot the
NetBSD
kernel, Open Firmware must first load a
`bootloader'
which knows how to load the
NetBSD
kernel.
Open Firmware 1 and 2 take either a two or three stage approach, depending
on the boot media. In the two step approach, Open Firmware loads
ofwboot.xcf
from the boot media, which then loads the kernel. In the three step
approach (used in the
`partition zero'
method), Open Firmware loads a primary bootloader
bootxx
from a disk which then loads the secondary bootloader
ofwboot
(which is functionally identical to
ofwboot.xcf
)
which then loads the 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 the primary bootloader
bootxx
located in the Apple Partition Map, which then loads the secondary
bootloader
ofwboot
which then loads the kernel. This is what
sysinst
will place on your hard drive during the installation procedure.
Additionally, the
NetBSD/macppc
CD-R images and boot floppies use this method, loading a kernel from
the floppy's FFS partition or the CD-R's ISO9660 partition.
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 an ISO9660 CD-ROM.
It can then load a
NetBSD
kernel from the ISO9660 CD-ROM.
Open Firmware 1.0.5 and 2.0.x machines will not boot from the ISO9660 file system if you create a hybrid HFS/ISO format CD-R. Make sure that the CD only has ISO9660 data and does not have an Apple Partition Map.
Once the bootloader is loaded, it can open the kernel from one of the following sources:
Such as the boot floppy, or an installed NetBSD partition.
In theory, Open Firmware 2.4 systems should be able to load the bootloader from an HFS or HFS+ partition or a hybrid CD-R, but users have reported that it doesn't work.
The boot floppy images provided have a
`partition zero'
bootloader and a
NetBSD
file system with an installation kernel.
The boot CD image provided 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.
You can use the instructions in this section to partition a disk that may
also be used with
MacOS,
although a disk prepared in this way
will not bootNetBSD.
That means, your root partition
(/
)
must be on a drive prepared with the
NetBSD
installer, but the partitions not necessary to boot (for example
/usr
,
/home
,
or
/export
)
may be on the same disk as
MacOS.
Unless you are planning to use partitions on the same disk as MacOS, skip forward to Preparing the Open Firmware 1 or 2 Bootable Media
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.
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-5.0_STABLE.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/cdrtools/README.html
http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
# cdrecord -v speed=4 dev=/dev/cd1c macppccd-5.0_STABLE.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
installation/floppy/boot1.fs
and
installation/floppy/boot2.fs
to two floppy disks.
# dd if=boot1.fs of=/dev/rfd0a bs=36k
# dd if=boot2.fs of=/dev/rfd0a bs=36k
Get either the rawrite.exe program from the NetBSD/i386 distribution or rawrite32.exe from http://www.duskware.com/rawrite32/
Get suntar from http://hyperarchive.lcs.mit.edu/HyperArchive/Archive/cmp/suntar-223.hqx
boot1.fs
and click
``Open''
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-5.0_STABLE 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.
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
NetBSD5.0_STABLE
distribution sets on the
disk.
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/cdrtools/README.html
http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
# mkisofs -o output.iso -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/docs/bootcd.html
installation/ofwboot.xcf
and
binary/kernel/netbsd-GENERIC_MD.gz
into the window. You may also want to drag the
NetBSD5.0_STABLE
distribution sets to this window as well.
Skip forward to Installing the NetBSD System
Unfortunately, the installation kernel is now too large to fit onto 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/docs/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. See http://www.NetBSD.org/docs/network/netboot/nfs.html for details.
# 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-5.0_STABLE.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
a
`partition zero'
bootloader which ultimately
loads the installation kernel from the ISO file system on the disk image.
# dd if=macppccd-5.0_STABLE.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-5.0_STABLE.iso
and click
``Open''
boot
boot-device
[boot-file]
[-as]
where the
boot-device
describes where to find the bootloader,
boot-file
describes where to find the
NetBSD
kernel, and the options specify how you want to boot.
You use the
boot-device
to tell Open Firmware where to find
ofwboot(8)
by listing the device, the partition (if it's a disk), and the filename
of the bootloader (if using
ofwboot.xcf
).
If the
boot-file
is on the same device and partition (if it's a disk) as the
boot-device
then you can just specify the kernel filename.
Otherwise, you need to specify the full Open Firmware path to the kernel.
The -a flag will ask you for the location of the next item to load (i.e. the bootloader will ask where the kernel is (if unspecified), or the kernel will ask where the root file system is). The -s flag will boot into `single-user' mode.
The exact command you will be using depends on which version of Open Firmware
your machine has and which device you will be booting from.
Sometimes you may have to guess as we don't know all of the combinations
of models, device names, and file names.
In general the format is:
device:[partition][,\filename]
.
Keep in mind for the future that you may be able to have your
boot-device
and
boot-file
on entirely different devices (such as the bootloader netbooted from
enet
and the kernel loaded from a hard drive on the
ultra0
ATA/IDE bus).
We'll try to walk you through the process of figuring out what Open Firmware calls your device, partition, and file names. To start with, Open Firmware keeps a ``device tree'' with all of the devices it finds in your system. You can get a listing of the nodes in this device tree with the dev and ls commands. dev is similar to the unix cd command and is used to change between the nodes in the Open Firmware device tree (similar to a file system). ls of course is similar to the unix ls command and is used to list the contents of the current device node. To get a listing of all the devices available in your system, use the following commands:
0 > dev /
0 > ls
Open Firmware has device aliases which are simple names for the full
hardware path to a device (similar to
alias
in
csh(1)
).
You can find out
what device aliases Apple created on your machine with the
devalias
command.
For example, here are the devaliases on a PowerMacintosh 7300:
0 > devalias
vci0 /chaos@F0000000
pci1 /bandit@F2000000
pci2 /bandit@F4000000
fd /bandit/gc/swim3
kbd /bandit/gc/via-cuda/adb/keyboard
ttya /bandit/gc/escc/ch-a
ttyb /bandit/gc/escc/ch-b
enet /bandit/gc/mace
scsi /bandit/gc/53c94
scsi-int /bandit/gc/mesh
ok
On most systems, you'll find the devices you're looking for. Typical aliases are:
hd |
Note that some of these items are the device itself, and some are a bus. When you only have the devalias to a bus, you need to specify which device on that bus you want to use. You can use the Open Firmware dev and ls commands. For example, here are the devices on the internal SCSI bus of a PowerMacintosh 7300:
0 > dev scsi-int
0 > ls
FF83C850: /sd@0,0
FF83D480: /st@0,0
ok
In this case, Open Firmware seems to be saying there are two devices, both at address zero (one is a SCSI disk `sd@0,0' and the other is a SCSI tape `st@0,0 ).' Unfortunately, older systems will only list the naming convention and not the actual devices currently connected, but that's OK -- we've got more tricks up our sleeve.
If you've got ATA/IDE drives, you have all the device information you need
(since Apple only ever ships drives as
``master''
which is typically something like
ata-disk@0
,
ATA-Disk@0
,
atapi-disk
, or
disk@0
).
You can find out the devices on your SCSI bus with the show-children command:
0 > dev scsi-int
0 > show-children
Target 0
Unit 0 Disk IBM DCAS-32160 S65A
Target 3
Unit 0 Removable Read Only device SONY CD-ROM CDU-8005 1.0j
ok
Open Firmware calls SCSI IDs
``Target
''.
The
``Unit
''
number is the Logical Unit Number (LUN).
This is almost always zero.
Thus, this PowerMacintosh system has an IBM hard drive (DCAS-32160) at
SCSI ID 0, and a Sony CD-ROM drive (CDU-8005) at SCSI ID 3.
Now, we've got enough information to construct the device name for
Open Firmware.
Just stick everything together to describe to Open Firmware what you want.
For example, Open Firmware calls the CD-ROM drive
in this system
scsi-int/sd@3
.
To determine if a device is bootable, type:
0 > dev scsi-int/sd@3
0 > words
load write read seek close open
write-blocks read-blocks max-transfer block-size dma-sync dma-map-out
dma-map-in dma-free dma-alloc
ok
If the
word ``open
''
is present in the list, then the device is almost certainly bootable.
Next, you need to figure out what partition Open Firmware thinks your
bootloader is located on if you're going to boot from a disk.
If you're using a
``partition zero''
bootloader, the answer is obvious: 0.
Thus, your
boot-device
for the
NetBSD/macppc
CD-R image on an Open Firmware 1.0.5 system would be
scsi-int/sd@3:0
since the image has a
`partition zero'
bootloader.
Other situations get a little trickier, as we know of no way to get a partition map from within Open Firmware, and it uses a different numbering scheme than either NetBSD or MacOS 9 (or earlier). You can use pdisk to get a listing of the partitions on a disk. See the Partitioning HOW-TO for help: http://www.NetBSD.org/ports/macppc/partitioning.html#pdisk
Typically, MS-DOS and ISO9660 formatted disks have their file systems at partition 1. Typically, Drive Setup formatted disks have their file systems starting at partition number 9. Often, if you omit the partition number, Open Firmware looks in the first partition it understands holding a valid file system.
Open Firmware uses a comma (,) to separate the partition number from the
filename.
It uses a backslash (the
\
character) to separate directories.
The bootloader uses forward slashes (the
/
character) to separate directories when specifying the
boot-file
.
Thus, to specify the top of the
file system on a CD-ROM in the example PowerMacintosh 7300 system, you'd
use:
scsi-int/sd@3:,\
Now, to confirm that you and Open Firmware are looking at the same files, you can get a directory listing of the file system on your device with the dir command. This command is only useful with file systems that Open Firmware understands and is able to boot from. On Open Firmware 1.0.5, 1.1.22, and 2.0.x systems, you can use dir on ISO9660 (not hybrid) and MS-DOS file systems. On Open Firmware 2.4, you can use it on HFS, HFS+, hybrid, ISO9960, and MS-DOS file systems. On Open Firmware 3, you can use it on HFS, HFS+, hybrid (not pure ISO9660), and MS-DOS file systems. The one exception to this rule is that Open Firmware cannot list files on a disk with a `partition zero' bootloader (including the NetBSD/macppc CD-R image and installation floppies).
0 > dir fd:,\
FINDER .DAT 022 2 2B8
DESKTOP . 022 0 0
RESOURCE.FRK 012 3 0
NETBSD~1.GZ 020 5 1FDFCA
TRASH . 010 B00 0
OFWBOOT .XCF 020 A75 D8F4
ok
NETBSD~1.GZ
and
OFWBOOT.XCF
.
Note that
MacOS
shortened
netbsd-GENERIC_MD.gz
to
NETBSD~1.GZ
since MS-DOS file systems can only natively hold 8 characters for the
filename.
;1
to the filename when using a ISO 9660 file system. This
``version number''
is part of the ISO 9660 specification and will show up in the directory
listing if it is present on the disk. For example:
0 > boot cd:,\OFWBOOT.XCF;1 NETBSD.MACPPC;1
If the
dir
command showed you the files you're looking for, then you've figure out
how to tell Open Firmware to look for your bootloader!
In this case, your
`boot-device
'
is
`fd:,\OFWBOOT.XCF
'
and your
`boot-file
'
is
`fd:,/NETBSD~1.GZ
'.
For additional help, see
ofwboot(8)
and the FAQ on topics like how to use the
Open Firmware command environment and how to boot from a device attached
to a PCI card which has Open Firmware support:
http://www.NetBSD.org/ports/macppc/faq.html#ofw-use
http://www.NetBSD.org/ports/macppc/faq.html#boot-pci
Here are some examples of what you might use to boot from CD-ROM (Apple usually sets their CD-ROM drives to SCSI ID 3):
0 > boot cd:0 NETBSD.MACPPC
0 > boot scsi-int/sd@3:0 NETBSD.MACPPC
0 > boot scsi/sd@3:0 NETBSD.MACPPC
0 > boot ata/atapi-disk:0 NETBSD.MACPPC
0 > boot ide1/disk@0:0 NETBSD.MACPPC
0 > boot cd:,\ofwboot.xcf netbsd.macppc
The first floppy disk has a `partition zero' bootloader. When it has loaded the kernel, it will ask you to insert the second floppy disk.
0 > boot fd:0
It is common to see ``READ TIMEOUT@'' from the floppy. This means that Open Firmware is having difficulty reading the media. See the section below on Common Problems and Error Messages for more information about this and what you can do to get a successful boot.
You can eject a floppy by typing:
0 > eject fd
MacOS drives have several system-level partitions reserved for MacOS drivers. You may find that your first HFS or HFS+ partition might be as high as partition 9. You may need to keep trying higher partition numbers until you find the one that has your bootloader. You can use pdisk to print out your partition map: http://www.NetBSD.org/ports/macppc/partitioning.html#pdisk
You should use the Open Firmware dir command to get a directory listing of the files on your hard drive.
If bootloader is on a different partition from the NetBSD kernel, you will need to specify where to find the kernel.
Remember, that SCSI Zip disks are usually ID 5 or 6. Internal hard drives are usually SCSI ID 0.
Here are some examples of what you might use to boot the installer kernel located on an HFS or HFS+ partition:
0 > boot hd:9,\ofwboot.xcf netbsd-GENERIC_MD.gz
0 > boot scsi/sd@0:9,\ofwboot.xcf netbsd-GENERIC_MD.gz
0 > boot ide0/disk@0:10,\ofwboot.xcf netbsd-GENERIC_MD.gz
0 > boot ultra1:9,ofwboot.xcf netbsd-GENERIC_MD.gz
Open Firmware doesn't understand long filenames (created with the RockRidge and Joliet extensions), so you may need to figure out what your file is called. You should use the Open Firmware dir command to get a listing of the files on your CD.
For instance,
Toast
for
MacOS
creates CDs with long filenames, but uses
MS-DOS
style short names
as well.
Instead of referencing
netbsd-GENERIC
you would need to open
NETBSD-G.ENE
The
mkisofs
program has a similar problem,
netbsd-GENERIC_MD.gz
becomes
NETBSD-GENERIC_MD.GZ
.
Another thing to note is that you must use the same case when specifying the filename to load that Open Firmware uses. Also, keep in mind what format your CD-R has to be for your version of Open Firmware (pure ISO versus hybrid ISO/HFS).
We'll assume that you've wisely renamed your kernel to
netbsd.gz
to avoid many of these name issues.
Here are some examples of what you might use to boot from CD-ROM
(Apple usually sets their CD-ROM drives to SCSI ID 3):
0 > boot cd:,\ofwboot.xcf netbsd.gz
0 > boot scsi-int/sd@3:,\OFWBOOT.XCF NETBSD.GZ
0 > boot scsi/sd@3:,\OFWBOOT.XCF NETBSD.GZ
0 > boot ata/atapi-disk:,\OFWBOOT.XCF NETBSD.GZ
0 > boot ide1/disk@0:,\OFWBOOT.XCF NETBSD.GZ
Use the Open Firmware
dir
command to get a listing of the files on the floppy.
Typically you'll find filenames like
OFWBOOT.XCF
and NETBSD~1.GZ
.
0 > boot fd:,\OFWBOOT.XCF NETBSD~1.GZ
You can eject a floppy by typing:
0 > eject fd
You can try the simple form (i.e. that you are booting from ethernet):
0 > boot enet:,ofwboot.xcf
Or you may be more specific, specifying the bootloader filename and the kernel name:
0 > boot enet:,ofwboot.xcf enet:,/netbsd-GENERIC_MD.gz
You can try the simple form (i.e. that you are booting from ethernet):
0 > boot enet:0
Or you may be more specific, specifying the bootloader filename and the kernel name:
0 > boot enet:0,ofwboot.xcf enet:0,/netbsd-GENERIC_MD.gz
You do not specify a file to load, since the `partition zero' booloader knows what to do. You would boot such a system if you have dumped the CD-R image to your drive, or if you have an already-installed NetBSD/macppc system
Remember, that SCSI Zip disks are usually ID 5 or 6. Internal hard drives are usually SCSI ID 0.
Here are some examples of what you might use to boot from such a drive:
0 > boot zip:0
0 > boot scsi-int/sd@0:0
0 > boot scsi/sd@0:0
0 > boot ata/ata-disk@0:0
0 > boot ata/ATA-Disk@0:0
0 > boot ide0/disk@0:0
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 > boot enet:,ofwboot.xcf netbsd-GENERIC_MD.gz
loading XCOFF
tsize=C280 dsize=14AC bsize=2620 entry=600000
SECTIONS:
.text 00600000 00600000 0000C280 000000E0
.data 0060D000 0060D000 000014AC 0000C360
.bss 0060E4B0 0060E4B0 00002620 00000000
loading .text, done..
loading .data, done..
clearing .bss, done..
>> NetBSD/macppc OpenFirmware Boot, Revision 1.3
>> (tsubai@mint.iri.co.jp, Sun Nov 26 01:41:27 JST 2000)
1701508+177748 [100+68176+55886]=0x1e9468
start=0x100000
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
The NetBSD Foundation, Inc. All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
The Regents of the University of California. All rights reserved.
NetBSD 1.5.1 (INSTALL) #0: Thu Mar 15 00:52:56 PST 2001
mw@al:/usr/src/sys/arch/macppc/compile/INSTALL
total memory = 192 MB
avail memory = 172 MB
using 2483 buffers containing 9932 KB of memory
[...]
erase ^H, werase ^W, kill ^U, intr ^C, status ^T
Terminal type? [vt100]
Erase is backspace.
(I)nstall, (S)hell or (H)alt ?
If your system is a PowerBook, NetBSD may have turned down the brightness of the backlight. Use the buttons to turn your brightness back up.
Otherwise, you need a serial console. See the section entitled Open Firmware 1 and 2 System Preparation
This means that your system is trying to boot MacOS. You might get to this state if you didn't properly enter Open Firmware, or if your Open Firmware boot command has bad syntax.
If you typed a bad boot command, Open Firmware tries to boot from the
value stored in the
boot-device
variable, whose default value is the MacOS ROM.
The grey screen with the icon is generated by the MacOS ROM. A flashing question-mark or broken folder means that your machine is looking for a bootable MacOS file system, but can't find one. A globe icon means that your machine is looking for a netboot server. A happy face or spinning disc means it's starting to boot MacOS.
The boot floppy does not have a bootable MacOS file system, it has a bootable NetBSD file system.
Reboot, re-enter Open Firmware and check your syntax carefully.
If you have a PowerMacintosh 7300 through 8600, then you need to read the section on System Disk and the patches it applies. See the section entitled Open Firmware 1 and 2 System Preparation
If you have a Twentieth Anniversary Macintosh, Open Firmware does not work with the internal display, you will need to set up a serial console.
DEFAULT CATCH!
''
This is a general message from Open Firmware to the effect that it had trouble loading a file.
If your machine is Open Firmware version 1.0.5, 2.0.x, or 2.4, this error does sometimes appear randomly. You might try the boot command a second time (this is known to work on some models). It's also an indication that either your floppy disk is bad, or the floppy drive is bad. Try doing a low-level format on the floppy, re-copy the files, and try again.
There are several models that cannot be booted while using the on-board video and keyboard. Try using a serial console.
CLAIM failed
''
This is a general message from Open Firmware to the effect that it failed to allocate some memory or memory is messed up.
First, make sure you have the Open Firmware variable
load-base
set correctly.
If your system is Open Firmware version 1.0.5, 1.1.22,
2.0.x, or 2.4, see the section above on
Setting up Open Firmware 1 and 2 to boot NetBSD
Do not change
load-base
on an Open Firmware 3 system.
Reset your system and try using a different boot command (this is the only way some people have gotten their Open Firmware 2.4 systems to work):
0 > 0 bootr boot-device boot-file
If you tried one boot command and it failed, then you tried a second and
got the
CLAIM
failed
message, then this is an indication that you should reboot between attempts.
Use the Open Firmware
reset-all
command.
Contradictorily, if your machine is Open Firmware version 1.0.5, 2.0.x or 2.4, this error does sometimes appear randomly. You might try the boot command a second time (this is known to work on some models).
There are several models that cannot be booted while using the on-board video and keyboard. Try using a serial console.
can't OPEN
''
Open Firmware either can't open the device you specified (because it is not present or the device path is mistyped) or the file you specified. Check your typing and check to make sure that the media has the files you think it has.
Use the NetBSD pdisk command to list the partition map and the Open Firmware dir command to verify that the file(s) you tried accessing are really there.
unrecognized Client Program formatstate not valid
''
This is a general Open Firmware error message indicating that the filename
you tried to open either doesn't exist or is in the wrong format.
For Open Firmware 1 and 2 machines, it must be an XCOFF file (such as
ofwboot.xcf
)
and for Open Firmware 3 machines, it must be either XCOFF or ELF (such as
a kernel).
Make sure that you have use binary mode to FTP the files, and
that they are properly uncompressed.
bad partition number, using 0no bootable HFS partition
''
If you're trying to boot an Open Firmware 1.0.5, 1.1.22, or 2.0.x system, this probably means that your media (i.e. hard drive or CD-ROM) has an HFS file system on it (such as a hybrid CD-R or a hard drive with MacOS partitions).
READ TIMEOUT@
''
Open Firmware is having trouble reading your floppy disk. Things to try:
As disk drives get older, especially with portables, they can get a little bit out of alignment so that they do not consistently read disks written on other floppy drives. Strongly consider writing the floppies on the same machine that will be reading them.
TFTP timeout
''
Either the server's TFTP server isn't running, or you're using a model
with Open Firmware 1.0.5 and not specifying the location of the bootloader.
Unfortunately, on the early models,
ofwboot.xcf
gets confused and doesn't work right unless you load it explicitly from the
boot-device
,
even if the bootp or DHCP server provides the correct information.
You need to boot with a command like:
0 > boot enet:,ofwboot.xcf
enet:,/netbsd.ram.gz: Inappropriate file type or format
''
Some systems booting over ethernet can't load compressed
kernels. Use
gunzip(1)
to uncompress the kernel before attempting to netboot.
You forgot to set
real-base
in Open Firmware or it got erased by your booting into
MacOS.
Make sure you have the Open Firmware variable
real-base
set correctly.
If your system is Open Firmware version 1.0.5, 1.1.22,
2.0.x, or 2.4, see the section above on
Setting up Open Firmware 1 and 2 to boot NetBSD
Do not set
real-base
on an Open Firmware 3 system.
Actually, this can have many causes. The most likely is a keyboard problem. First, try plugging the USB keyboard directly into the computer (i.e. not through a hub) and unplugging the mouse.
If you're trying a model that's not on the supported list (such as a new laptop model), they keyboard may not be supported yet.
Using sysinst, installing NetBSD is a relatively easy process. Still, you should read this document and have it in hand when doing the installation process. This document tries to be a good guide to the installation, and as such, covers many details for the sake of completeness. Do not let this discourage you; the install program is not hard to use.
The following is a walk-through of the steps you will take while
getting
NetBSD
installed on your hard disk.
sysinst
is a menu driven
installation system that allows for some freedom in doing the
installation.
Sometimes, questions will be asked and in many cases
the default answer will be displayed in brackets
(``[ ]'')
after the question.
If you wish to stop the installation, you may press
CONTROL-C
at any time, but if you do, you'll have to begin the installation
process again from scratch by running the
/sysinst
program from the command prompt.
It is not necessary to reboot.
First, let's describe a quick install. The other sections of this document go into the installation procedure in more detail, but you may find that you do not need this. If you want detailed instructions, skip to the next section. This section describes a basic installation, using a CD-ROM install as an example.
.***********************************************.
* NetBSD-5.0_STABLE Install System *
* *
*>a: Install NetBSD to hard disk *
* b: Upgrade NetBSD on a hard disk *
* c: Re-install sets or install additional sets *
* d: Reboot the computer *
* e: Utility menu *
* x: Exit Install System *
.***********************************************.
fstab
.
Now exit the shell, return to the main menu, and choose
Re-install.
Choose install for Open Firmware 1.0.5, 1.1.22, 2.0.x, and 2.4 systems.
root
and set a password for that account.
You are also advised to edit
/etc/rc.conf
to match your needs.
You may want to read the
boot messages, to notice your disk's name and capacity.
Its name will be something like
sd0
or
wd0
and the geometry will be
printed on a line that begins with its name.
As mentioned above, you may need your disk's geometry when creating
NetBSD's
partitions.
You will also need to know the name, to tell
sysinst
which disk to use.
The most important thing to know is that
wd0
is
NetBSD's
name for your first IDE disk,
wd1
the second, etc.
sd0
is your first SCSI disk,
sd1
the second, etc.
Once NetBSD has booted and printed all the boot messages, you will be presented with a welcome message and a main menu. It will also include instructions for using the menus.
If you do not intend to use networking during the installation, but you do want your machine to be configured for networking once it is installed, you should first go to the Utility menu and select the Configure network option. If you only want to temporarily use networking during the installation, you can specify these parameters later. If you are not using the Domain Name System (DNS), you can give an empty response when asked to provide a server.
Skip this step if you are installing NetBSD on an Open Firmware 1 or 2 system.
Go to the Utility Menu, and select the Run /bin/sh option which will give you a shell prompt. From this shell prompt, you will do some of the steps that the normal install procedure runs automatically. Unfortunately, at the moment, our install tools aren't smart enough to deal with drives with Apple Partition Maps and will overwrite important information describing your partitions.
You may need to type one of the following commands to get your delete key
to work properly, depending on your keyboard:
#
stty erase '^h'
#
stty erase '^?'
Type the following command (replacing
wd0
with the name of your destination hard drive):
#
disklabel wd0
This will print out the partition info that was generated by pdisk, Drive Setup, or Disk Utility. Note that, as discussed above in the Partitioning your hard drive for NetBSD section, your A/UX Root typically is the first partition (a) and your A/UX Swap typically is the second partition (b). You may also find that your A/UX User partition is the seventh partition (g). For example:
#
disklabel wd0
[...]
# size offset fstype [fsize bsize cpg/sgs]
a: 426613 837432 4.2BSD 0 0 0 # (Cyl. 1622*- 2449*)
b: 204800 632632 swap # (Cyl. 1226*- 1622*)
c: 2134305 0 unused 0 0 # (Cyl. 0 - 4136*)
d: 426616 1216 HFS # (Cyl. 2*- 829*)
e: 204800 427832 HFS # (Cyl. 829*- 1226*)
f: 21 2134284 unknown # (Cyl. 4136*- 4136*)
g: 870239 1264045 4.2BSD 0 0 0 # (Cyl. 2449*- 4136*)
disklabel: boot block size 0
disklabel: super block size 0
Now, you need to create file systems on the partitions that NetBSD will be using.
Do not modify any partitions labeled
HFS
,
UFS
,
or
unknown
.
The partitions you will be using have their
fstype
listed as
4.2BSD
.
Run the
newfs
command on the
4.2BSD
partitions:
#
newfs /dev/wd0a
newfs: /dev/wd0a: not a character-special device
Warning: 120 sector(s) in last cylinder unallocated
/dev/wd0a: 426612 sectors in 827 cylinders of 4 tracks, 129 sectors
208.3MB in 52 cyl groups (16 c/g, 4.03MB/g, 1024 i/g)
super-block backups (for fsck -b #) at:
32, 8432, 16832, 25232, 33056, 41456, 49856, 58256, 66080,
74480, 82880, 91280, 99104, 107504, 115904, 124304, 132128, 140528,
148928, 157328, 165152, 173552, 181952, 190352, 198176, 206576, 214976,
223376, 231200, 239600, 248000, 256400, 264224, 272624, 281024, 289424,
297248, 305648, 314048, 322448, 330272, 338672, 347072, 355472, 363296,
371696, 380096, 388496, 396320, 404720, 413120, 421520,
newfs: ioctl (WDINFO): Invalid argument
newfs: /dev/wd0a: can't rewrite disk label
`
not a character-special device'
,
`
sector(s) in last cylinder unallocated'
,
`
ioctl (WDINFO): Invalid argument'
,
and
`
can't rewrite disk label'
warnings.
Now you need to mount your destination root partition:
#
mount /dev/wd0a /mnt
Make an
fstab
file for your new system (right now, you only really need to include
/
,
/usr
,
and
swap
),
for example:
#
mkdir /mnt/etc
#
cat > /mnt/etc/fstab
/dev/wd0a / ffs rw 1 1
/dev/wd0b none swap sw 0 0
/dev/wd0g /usr ffs rw 1 2
If you mess up while typing, you can press
CONTROL-U
to erase everything on the current line, or
CONTROL-C
to cancel the file creation, so you can start over.
CONTROL-D
finishes and writes the file to disk.
Great, now create the mountpoints for the file systems you listed in the
fstab
:
#
mkdir /mnt/usr
Clean up and return to
sysinst:
#
cd /
#
umount /mnt
#
exit
To start the installation onto a dedicated NetBSD drive (Open Firmware 1 or 2), select Install NetBSD to hard disk from the main menu. To start the installation onto a drive with an Apple Partition Map (Open Firmware 3), select Re-install sets or install additional sets from the main menu.
The first thing is to identify the disk on which you want to
install
NetBSD.
sysinst
will report a list of disks it finds
and ask you for your selection.
You should see disk names like
wd0
,
wd1
,
sd0
or
sd1
.
If
sysinst
reports
I can not find any hard disk for use by NetBSD
or the drive you wish to install onto is missing, then you should look at
the FAQ entry
http://www.NetBSD.org/ports/macppc/faq.html#nodisk
The next step is to choose which distribution sets you wish to install. Options are provided for full, minimal, and custom installations. If you choose sets on your own, base, etc, and a kernel must be selected.
You can skip a few steps, down to `Getting the distribution sets', if you are installing onto a drive with an Apple Partition Map (Open Firmware 3), i.e. you selected Re-install sets or install additional sets from the main menu.
The partition table of the NetBSD part of a disk is called a disklabel. In actuality, NetBSD/macppc uses an Apple Partition Map. The installer creates something like a real Apple Partition Map, but it is not compatible with Mac OS or Open Firmware, which is one of the reasons why you cannot use this installer to partition a disk that can be used with Mac OS or Open Firmware 3 systems.
If your disk already has a disklabel written to it, you can choose Use existing partition sizes. Otherwise, select Set sizes of NetBSD partitions.
After you have chosen your partitions and their sizes (or if you opted to use the existing partitions), you will be presented with the layout of the NetBSD disklabel and given one more chance to change it. For each partition, you can set the type, offset and size, block and fragment size, and the mount point. The type that NetBSD uses for normal file storage is called 4.2BSD. A swap partition has a special type called swap. Some partitions in the disklabel have a fixed purpose.
a
/
)
b
c
d-p
g
is the partition mounted on
/usr
,
but this is historical practice and not a fixed value.
You will then be asked to name your disk's disklabel. The default response will be ok for most purposes. If you choose to name it something different, make sure the name is a single word and contains no special characters. You don't need to remember this name.
You are now at the point of no return. Nothing has been written to your disk yet, but if you confirm that you want to install NetBSD, your hard drive will be modified. If you are sure you want to proceed, select yes.
The install program will now label your disk and make the file systems you specified. The file systems will be initialized to contain NetBSD bootstrapping binaries and configuration files. You will see messages on your screen from the various NetBSD disk preparation tools that are running. There should be no errors in this section of the installation. If there are, restart from the beginning of the installation process. Otherwise, you can continue the installation program after pressing the return key.
ofwboot.xcf
on an HFS or HFS+ partition.
The NetBSD distribution consists of a number of sets that come in the form of gzipped tarfiles. At this point, you will be presented with a menu which enables you to choose from one of the following methods of installing the sets. Some of these methods will first load the sets on your hard disk, others will extract the sets directly.
For all these methods, the first step is making the sets available for extraction, and then do the actual installation. The sets can be made available in a few different ways. The following sections describe each of those methods. After reading the one about the method you will be using, you can continue to the section labeled `Extracting the distribution sets'.
When installing from a CD-ROM, you will be asked to specify
the device name for your CD-ROM drive
(usually cd0
),
and the directory name on the CD-ROM where the distribution files are.
sysinst will then check if the files are indeed available in the specified location, and proceed to the actual extraction of the sets.
To be able to install using ftp, you first need to configure
your network setup if you haven't already done so.
sysinst
will do this for you, asking you
if you want to use DHCP.
If you do not use DHCP, you can enter network configuration
details yourself.
If you do not have DNS set up for the machine that you
are installing on, you can just press
RETURN
in answer to this question, and DNS will not be used.
You will also be asked to specify the host that you want to transfer the sets from, the directory on that host, the account name and password used to log into that host using ftp, and optionally a proxy server to use. If you did not set up DNS, you will need to specify an IP address instead of a hostname for the ftp server.
sysinst will proceed to transfer all the default set files from the remote site to your hard disk.
To be able to install using NFS, you first need to configure
your network setup if you haven't already done so.
sysinst
will do this for you, asking you
if you want to use DHCP.
If you do not use DHCP, you can enter network configuration
details yourself.
If you do not have DNS set up for the machine that you
are installing on, you can just press
RETURN
in answer to this question, and DNS will not be used.
You will also be asked to specify the host that you want to transfer the sets from and the directory on that host that the files are in. This directory should be mountable by the machine you are installing on, i.e., correctly exported to your machine.
If you did not set up DNS, you will need to specify an IP address instead of a hostname for the NFS server.
In order to install from a local file system, you will
need to specify the device that the file system resides
on
(for example sd1e
)
the type of the file system,
and the directory on the specified file system where the sets are located.
sysinst
will then check if it
can indeed access the sets at that location.
Remember,
NetBSD/macppc
doesn't grok HFS or HFS+ partitions
This option assumes that you have already done some preparation yourself. The sets should be located in a directory on a file system that is already accessible. sysinst will ask you for the name of this directory.
Before extraction begins, you can elect to watch the files being extracted; the name of each file that is extracted will be shown. This can slow down the installation process considerably on machines with slow graphics consoles or serial consoles. Alternatively, you can choose to see a progress bar. This is the preferred option as it shows progress without significantly slowing down the installation process.
If you are installing using the
Re-install sets or install additional sets
option, then you will need to create the device nodes in
/dev
,
otherwise,
the device node files will be created.
If you have already configured networking, you will be asked if you want to
use this configuration for normal operation.
If so, these values will be installed in the network configuration files.
The next menu will allow you to select the time zone that you're in,
to make sure your clock has the right offset from UTC.
Finally you will be asked to select a password encryption algorithm
and can then set a password for the "root" account, to prevent
the machine from coming up without access restrictions.
If you are installing using the
Re-install sets or install additional sets
option, then you will need to create the device nodes in
/dev
now.
Otherwise, skip this step.
Go to the main installation menu, and select
Utility menu
and then select the
Run /bin/sh
option, which will give you a shell prompt.
You may need to type one of the following commands to get your delete key
to work properly, depending on your keyboard:
#
stty erase '^h'
#
stty erase '^?'
Type the following command (replacing
wd0a
with the partition name of your destination root partition):
Now you need to mount your destination root partition:
#
mount /dev/wd0a /mnt
#
cd /mnt/dev
#
sh MAKEDEV all
#
cd /
#
umount /mnt
#
exit
Congratulations, you have successfully installed NetBSD 5.0_STABLE.
boot-device
'
and
`
boot-file
'
variables to the values you just determined. Also, you might want to
enable the system to always boot
NetBSD
when powered on or reset. Once you set up auto-booting you can get to
the Open Firmware prompt again by using the
shutdown(8)
command to halt the system.
If you are not using a `partition zero' style boot scheme (e.g. Open Firmware 3 models), then you would type something like the following:
0 > setenv auto-boot? true
0 > setenv boot-device ide0/disk@0:8,\ofwboot.xcf
0 > setenv boot-file ide0/disk@0:13,/netbsd
0 > reset-all
The last command resets the system so that these settings are stored.
If you are using a `partition zero' style boot scheme, you would type something like the following:
0 > setenv auto-boot? true
0 > setenv boot-device scsi/sd@0:0
0 > setenv boot-file netbsd
0 > reset-all
Replace scsi/sd@0:0 with the actual device you will be booting from.
boot-command
'
settings:
0 > setenv boot-command catch 5000 ms boot
0 > setenv boot-command begin ['] boot catch 1000 ms cr again
Also, you may be able to pause a system at the Open Firmware prompt
if you have
`auto-boot?
'
set to
`true
'
by holding down any key while the system is resetting. Set the
following
`boot-command
'
(this may not work on system with Open Firmware 1.0.5) (this method should
interrupt booting, even when holding down any key while using a serial
console):
0 > setenv boot-command key? invert if boot then
boot-device
'
variable. So, instead of writing the
NetBSD
device path to Open Firmware, you'll store the paths to your operating
systems in NVRAM. Open Firmware cannot deal with nested
devalias
entries. You must, therefore, enter the
entire
path to your device. See the
NetBSD/macppc
nvedit
HOW-TO for more help:
http://www.NetBSD.org/ports/macppc/nvedit.html
0 > printenv boot-device
boot-device /pci@f2000000/mac-io@17/ata-4@1f000/@0:10,\\:tbxi
ok
0 > nvalias osx /pci@f2000000/mac-io@17/ata-4@1f000/@0:10,\\:tbxi
0 > nvalias bsd /pci@f2000000/mac-io@17/ata-4@1f000/@0:9,ofwboot.xcf
0 > nvstore
0 > setenv use-nvramrc? true
0 > reset-all
Now, when the system is reset, it will stop at the Open Firmware prompt and you can type one of the following to boot an operating system:
0 > boot osx
0 > boot bsd
For older systems, you're in for more hassle. Booting an Open Firmware 1.0.5, 2.0.x, or 2.4 system into MacOS 9 or earlier will erase some or all of your Open Firmware settings. Try it and see which Open Firmware variables survive.
If only
`real-base
'
is lost, you can compile a kernel that does not require changing the
`real-base
'.
Just build a kernel that is less than 4 MB uncompressed. This is easy if
you remove all of the USB devices from the config file. Once you've got
a smaller kernel, just follow the procedure in the section above on
Booting NetBSD and MacOS X or Darwin
If everything is lost when you boot into MacOS 9 or earlier, you will need to make a custom BootVars configuration that you run before trying to boot NetBSD/macppc since System Disk does not preserve enough information when it saves a configuration.
real-base
',
`
boot-device
',
`
boot-file
',
`
input-device
',
and
`
output-device
'.
shutdown(8)
command to halt the system at the Open Firmware prompt and use the
Open Firmware
``
bye
''
or
``
mac-boot
''
command to boot
MacOS.
Once you've got the operating system running, there are a few things you need to do in order to bring the system into a properly configured state. The most important steps are described below.
/etc/rc.conf
If you or the installation software haven't done any configuration of
/etc/rc.conf
(sysinst
usually will),
the system will drop you into single user mode on first reboot with the
message
/etc/rc.conf
is
not
configured.
Multiuser
boot
aborted.
and with the root file system
(/
)
mounted read-only.
When the system asks you to choose a shell, simply press
RETURN
to get to a
/bin/sh
prompt.
If you are asked for a terminal type, respond with
vt100
(or whatever is appropriate for your terminal type)
and press
RETURN
.
You may need to type one of the following commands to get your delete key
to work properly, depending on your keyboard:
#
stty erase '^h'
#
stty erase '^?'
At this point, you need to configure at least
one file in the
/etc
directory.
You will need to mount your root file system read/write with:
#
/sbin/mount -u -w /
Change to the
/etc
directory and take a look at the
/etc/rc.conf
file.
Modify it to your tastes, making sure that you set
rc_configured=YES
so that your changes will be enabled and a multi-user boot can
proceed.
Default values for the various programs can be found in
/etc/defaults/rc.conf
,
where some in-line documentation may be found.
More complete documentation can be found in
rc.conf(5)
.
When you have finished editing
/etc/rc.conf
,
type
exit
at the prompt to
leave the single-user shell and continue with the multi-user boot.
Other values that may need to be set in
/etc/rc.conf
for a networked environment are
hostname
and possibly
defaultroute.
You may also need to add an
ifconfig_int
for your
<int>
network interface,
where your on-board interfaces may be one of
mc0
,
bm0
,
tlp0
or
gem0
.
For example:
ifconfig_mc0="inet
192.0.2.123
netmask
255.255.255.0"
or, if you have
myname.my.dom
in
/etc/hosts
:
ifconfig_mc0="inet
myname.my.dom
netmask
255.255.255.0"
To enable proper hostname resolution, you will also want to add an
/etc/resolv.conf
file or (if you are feeling a little more adventurous) run
named(8)
.
See
resolv.conf(5)
or
named(8)
for more information.
Instead of manually configuring network and naming service,
DHCP can be used by setting
dhclient=YES
in
/etc/rc.conf
.
Other files in
/etc
that may require modification or setting up include
/etc/mailer.conf
,
/etc/nsswitch.conf
,
and
/etc/wscons.conf
.
After reboot, you can log in as
root
at the login prompt.
Unless you've set a password in
sysinst,
there
is no initial password.
You should create an account for yourself (see below) and protect it and the
``root''
account with good passwords.
By default, root login from the network is disabled (even via
ssh(1)
).
One way to become root over the network is to log in as a different
user that belongs to group
``wheel''
(see
group(5)
)
and use
su(1)
to become root.
Use the
useradd(8)
command to add accounts to your system.
Do not
edit
/etc/passwd
directly! See
vipw(8)
and
pwd_mkdb(8)
if you want to edit the password database.
If you installed the X Window System, you may want to read the chapter about X in the NetBSD Guide: http://netbsd.org/docs/guide/en/chap-x.html
If you wish to install any of the software freely available for UNIX-like systems you are strongly advised to first check the NetBSD package system, pkgsrc. pkgsrc automatically handles any changes necessary to make the software run on NetBSD. This includes the retrieval and installation of any other packages on which the software may depend.
macppc/5.0_STABLE/All
subdir.
You can install them with the following commands under
sh(1)
:
# PKG_PATH=ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/macppc/5.0_STABLE/All # export PKG_PATH # pkg_add -v tcsh # pkg_add -v bash # pkg_add -v perl # pkg_add -v apache # pkg_add -v kde # pkg_add -v firefox ...
If you are using
csh(1)
then replace the first two lines with the following:
# setenv PKG_PATH ftp://ftp.NetBSD.org/pub/pkgsrc/packages/NetBSD/macppc/5.0_STABLE/All
/pub/pkgsrc
directory.
If you would like to use such mirrors, you could also try the
/pub/NetBSD/packages/current-packages/NetBSD/macppc/5.0_STABLE/All
directory, which may have the same contents.
The above commands will install the Tenex-csh and Bourne Again shells, the Perl programming language, Apache web server, KDE desktop environment and the Firefox web browser as well as all the packages they depend on.
pkg_add(1)
command will complain about a version mismatch of packages with a message
like the following:
Warning:
package
`foo'
was
built
for
a
different
version
of
the
OS:
NetBSD/i386
M.N
(pkg)
vs.
NetBSD/i386
5.0_STABLE
(this
host)
,
/usr/pkgsrc
(though other locations work fine) with the commands:
#
cd /usr
#
tar -zxpf pkgsrc.tar.gz
After extracting, see the
doc/pkgsrc.txt
file in the extraction directory (e.g.,
/usr/pkgsrc/doc/pkgsrc.txt
)
for more information.
/etc/mail/aliases
to forward root mail to the right place.
Don't forget to run
newaliases(1)
afterwards.
/etc/postfix/main.cf
file will almost definitely need to be adjusted.
If you prefer a different MTA, then install it using
pkgsrc or by hand and adjust
/etc/mailer.conf
.
/etc/rc.local
to run any local daemons you use.
/etc
files are documented in section 5 of the manual; so just invoking
#
man 5 filename
is likely to give you more information on these files.
The easiest way to upgrade to NetBSD 5.0_STABLE is with binaries, and that is the method documented here.
To do the upgrade, you must boot the install kernel using one of
the methods described above.
You must also have at least the
base
and
kern
binary distribution sets available.
Finally, you must have sufficient disk space available to install the
new binaries.
Since files already installed on the system are overwritten in place,
you only need additional free space for files which weren't previously
installed or to account for growth of the sets between releases.
If you have a few megabytes free on each of your root
(/
)
and
/usr
partitions, you should have enough space.
Since upgrading involves replacing the kernel, boot blocks, and most of the system binaries, it has the potential to cause data loss. You are strongly advised to back up any important data on the NetBSD partition or on another operating system's partition on your disk before beginning the upgrade process. Since installation of the bootloader will prevent Mac OS from using the disk and will prevent Open Firmware 3 machines from booting, there is an option to bypass this step. Make sure you know whether or not to install the bootloader.
The upgrade procedure
is similar to an installation, but without the hard disk partitioning.
sysinst
will attempt to merge the settings stored in your
/etc
directory with the new version of
NetBSD.
Also, file systems are checked before unpacking the sets.
Fetching the binary
sets is done in the same manner as the installation procedure;
refer to the installation part of the document for help.
After a new kernel has been copied to your hard disk, your
machine is a complete
NetBSD
5.0_STABLE
system.
However, that doesn't mean that you're finished with the upgrade process.
You will probably want to update the set of device
nodes you have in
/dev
.
If you've changed the contents of
/dev
by hand, you will need to be careful about this, but if
not, you can just cd into
/dev
,
and run the command:
#
sh MAKEDEV all
Finally, you will want to delete old binaries that were part
of the version of
NetBSD
that you upgraded from and have since been removed from the
NetBSD
distribution.
Users upgrading from previous versions of NetBSD may wish to bear the following problems and compatibility issues in mind when upgrading to NetBSD 5.0_STABLE.
The pthread libraries from previous versions of
NetBSD
require that the
sysctl(3)
node
kern.no_sa_support
be set to
0
.
This affects the following environments:
The 5.0 kernel defaults to
0
for
kern.no_sa_support
,
which covers the first case.
However, please note that a full installation of 5.0
(either from scratch or through an upgrade)
will set
kern.no_sa_support
to 1 during the boot process.
This means that for the last two cases, you will have to manually set
kern.no_sa_support
to
0
,
using either the
sysctl(8)
command or through
sysctl.conf(5)
.
Note that sysinst will automatically invoke
postinstall fix
The following issues can generally be resolved by running postinstall with the etc set:
postinstall -s /path/to/etc.tgz check
postinstall -s /path/to/etc.tgz fix
Issues fixed by postinstall:
/etc
need upgrading.
These include:
/etc/defaults/*
/etc/mtree/*
/etc/daily
/etc/weekly
/etc/monthly
/etc/security
/etc/rc.subr
/etc/rc
/etc/rc.shutdown
/etc/rc.d/*
/etc/envsys.conf
The following issues need to be resolved manually:
postinstall -s /path/to/etc.tgz fix mailerconf
/etc/mailer.conf
file to use Postfix as the MTA. When using
sysinst
to upgrade the system, it will ask if you want this to be done.
Note that if you have a customized Sendmail setup, you need to set up Postfix in an equivalent way; there is no tool for automatic conversion of Sendmail configuration to a Postfix one.
Postfix will be started automatically when the system boots.
You may see messages like "$sendmail is not set properly" at boot.
You can suppress them by removing
/etc/rc.d/sendmail
and
/etc/rc.d/smmsp
.
Those files and other parts of sendmail configuration like files under
/usr/share/sendmail
are not removed by default
while upgrading for those who want to continue using sendmail from
outside the base system.
If you want to delete them,
postinstall
can be used:
postinstall -s /path/to/etc.tgz fix sendmail
The following issues can generally be resolved by running postinstall with the etc set:
postinstall -s /path/to/etc.tgz check
postinstall -s /path/to/etc.tgz fix
Issues fixed by postinstall:
/etc
need upgrading.
These include:
/etc/defaults/*
/etc/mtree/*
/etc/daily
/etc/weekly
/etc/monthly
/etc/security
/etc/rc.subr
/etc/rc
/etc/rc.shutdown
/etc/rc.d/*
/etc/envsys.conf
The following issues need to be resolved manually:
mount(8)
command now requires the
nosuid
and
nodev
options to be explicitly specified.
Previously, these options were automatically enforced even if they
were not explicitly specified.
Documentation is available if you installed the manual
distribution set.
Traditionally, the
``man pages''
(documentation) are denoted by
`name(section)
'.
Some examples of this are
intro(1)
,
man(1)
,
apropos(1)
,
passwd(1)
,
and
passwd(5)
.
The section numbers group the topics into several categories, but three are of primary interest: user commands are in section 1, file formats are in section 5, and administrative information is in section 8.
The man command is used to view the documentation on a topic, and is started by entering man [section] topic. The brackets [] around the section should not be entered, but rather indicate that the section is optional. If you don't ask for a particular section, the topic with the lowest numbered section name will be displayed. For instance, after logging in, enter
#
man passwd
to read the documentation for
passwd(1)
.
To view the documentation for
passwd(5)
,
enter
#
man 5 passwd
instead.
If you are unsure of what man page you are looking for, enter
#
apropos subject-word
where subject-word is your topic of interest; a list of possibly related man pages will be displayed.
If you've got something to say, do so! We'd like your input. There are various mailing lists available via the mailing list server at majordomo@NetBSD.org. To get help on using the mailing list server, send mail to that address with an empty body, and it will reply with instructions. See http://www.NetBSD.org/mailinglists/ for a web interface.
There are various mailing lists set up to deal with comments and questions about this release. Please send comments to: netbsd-comments@NetBSD.org.
To report bugs, use the
send-pr(1)
command shipped with
NetBSD,
and fill in as much information about the problem as you can.
Good bug reports include lots of details.
Bugs also can be submitted and queried with the web interface at http://www.NetBSD.org/support/send-pr.html
There are also port-specific mailing lists, to discuss aspects of each port of NetBSD. Use majordomo to find their addresses, or visit http://www.NetBSD.org/mailinglists/
If you're interested in doing a serious amount of work on a specific port, you probably should contact the `owner' of that port (listed below).
If you'd like to help with this effort, and have an idea as to how you could be useful, send us mail or subscribe to: netbsd-users@NetBSD.org.
As a favor, please avoid mailing huge documents or files to these mailing lists. Instead, put the material you would have sent up for FTP or WWW somewhere, then mail the appropriate list about it, or, if you'd rather not do that, mail the list saying you'll send the data to those who want it.
Keith Bostic Ralph Campbell Mike Karels Marshall Kirk McKusick
for their work on BSD systems, support, and encouragement.
(in alphabetical order)
All product names mentioned herein are trademarks or registered trademarks of their respective owners.
The following notices are required to satisfy the license terms of the software that we have mentioned in this document:
NetBSD is a registered trademark of The NetBSD Foundation, Inc.
In the following statement, the phrase ``this text'' refers to portions
of the system documentation.
Portions of this text are reprinted and reproduced in electronic form in
NetBSD, from IEEE Std 1003.1, 2004 Edition, Standard for
Information Technology -- Portable Operating System Interface (POSIX),
The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the
Institute of Electrical and Electronics Engineers, Inc and The Open Group.
In the event of any discrepancy between these versions and the original
IEEE and The Open Group Standard, the original IEEE and The Open Group
Standard is the referee document.
The original Standard can be obtained online at
http://www.opengroup.org/unix/online.html.
This notice shall appear on any product containing this material