xref: /openbsd/distrib/notes/macppc/prep (revision 771fbea0)
1dnl	$OpenBSD: prep,v 1.24 2017/03/04 22:46:20 tj Exp $
2To be able to boot the OpenBSD/MACHINE installation program, you will
3need to acquire some limited knowledge of Open Firmware, the low-level
4process that controls the microprocessor after hardware initialization
5and diagnostics are performed but before control is handed to the
6operating system.
7
8To access Open Firmware, you should simultaneously hold down the
9Command, Option, O, and F keys immediately upon booting.  (On a PC keyboard,
10use the Windows key instead of the Command key and use Alt instead of the
11Option key).  You will be presented with information and a ">" prompt that
12will look something like this (example taken from a Power Macintosh G4):
13
14Apple PowerMac3,1 2.4f1 BootROM built on 02/18/00 at 09:44:35
15Copyright 1994-2000 Apple Computer, Inc.
16All Rights Reserved
17
18Welcome to Open Firmware
19To continue booting, type "mac-boot" and press return
20To shut down, type "shut-down" and press return
21
22 ok
230 >
24
25If you are installing OpenBSD/MACHINE on an Xserve, you will need
26to do so in headless mode.  This means you must remove the graphics
27card and use the serial console.  To bring up Open Firmware via
28the serial console, hold down the System Identifier button while
29pressing the Power button.  When the upper LED bank begins lighting
30up in sequence (similar to KITT from Knight Rider), repeatedly
31press the System Identifier button until the seventh LED from
32the right is highlighted on the lower bank.  Now hold the
33System Identifier button for two seconds.  For more details, read:
34http://support.apple.com/kb/TA26930
35
36dnl XXX Move the boot commands to install in sections (booting from network,
37dnl XXX booting from cd-rom, etc)
38Important Open Firmware command examples:
39
40boot cd:,ofwboot /OSREV/MACHINE/bsd.rd
41		(boot from an appropriately prepared
42		OpenBSD CD-ROM in the CD/DVD drive)
43
44boot enet:,ofwboot /bsd.rd
45		(netboot from a pre-configured dhcp/tftp/nfs
46		server; "ofwboot" will be obtained from the tftp server,
47		while "bsd.rd" will be obtained from the NFS server,
48		as specified by the "next-server" and "root-path" dhcp
49		options)
50
51boot ide1:,ofwboot /bsd
52		(After installation, boot /bsd from the slave
53		 device on the second ATA bus)
54
55mac-boot	(boot into Mac OS)
56reset-all	(reboot the machine)
57shut-down	(halt the machine; shutdown)
58printenv	(print current machine variables)
59setenv		(set a machine variable)
60devalias	(list device aliases; useful for locating other
61		devices in the machine such as hard drives, etc)
62
63As seen above, device aliases typically take the form of "ide", "cd",
64etc.  To boot to an alternative device, you may substitute them
65with entries from this list (example devices taken from a Power
66Macintosh G4):
67
68ultra0 = hd = master device, primary ATA bus (factory-installed drive)
69ultra1 =      slave device, primary ATA bus
70ide0   = cd = master device, secondary ATA bus (CD/DVD drive)
71ide1   =      slave device, secondary ATA bus (Zip drive, if installed)
72enet   =      motherboard Ethernet device
73
74
75Other Open Firmware command examples:
76
77setenv auto-boot? false
78		(force the machine to wait at Open Firmware
79		for user input at next reboot; options are true/false)
80
81setenv boot-device hd:,ofwboot
82		(force the machine to boot into OpenBSD
83		automatically at next reboot)
84
85dev /		(change to root level of the device tree)
86pwd		(show current location in the device tree)
87ls		(show items at current location in the device tree)
88words		(show methods of items at current location in the device
89		tree)
90.properties	(show properties of items at current location in the
91		device tree)
92
93
94To reset a Power Macintosh to the factory-configured Open Firmware settings,
95simultaneously hold down the Command, Option, P, and R keys immediately upon
96booting.  Typically the machine will then attempt to load Mac OS, if
97available.
98
99
100Autobooting OpenBSD/MACHINE
101
102It is possible to automatically boot into OpenBSD (selectably into Mac OS)
103by setting up the following:
104
105setenv auto-boot? true
106setenv boot-device hd:,ofwboot
107
108[to save the results into NVRAM]
109reset-all
110
111These settings assume that the master of the first IDE bus has OpenBSD
112installed on it, either in MBR format or in shared mode with ofwboot
113copied into the first HFS(+) partition. It is not necessary to specify
114'/bsd' on the boot line or in the boot-device variable, since it is the
115default.
116
117To boot in Mac OS with this setup (works on most supported machines),
118press and hold down the Alt/Option key during reboot, and select which
119(Mac OS/Mac OS X) partition to boot in the graphical boot selector
120presented. Note that OpenBSD does not currently show up in this boot
121selector except for the installation image. This works on most machines
122this has been tested with, but does not work on a Rev C (333MHz) iMac;
123perhaps this feature was added to the Open Firmware ROM after that
124machine.
125
126
127Sharing a disk with Mac OS:
128
129OpenBSD/MACHINE is capable of booting either from a dedicated disk using
130an MBR partitioned disk or sharing a disk with Mac OS.
131
132If the disk is to be shared between Mac OS and OpenBSD, it is necessary
133to reformat and install the Mac OS partitions first, using "Drive Setup",
134leaving space on the disk as an "Unused" partition.
135If the disk was previously partitioned, it is possible to reuse a partition
136for OpenBSD, as long as it is not the first partition on the disk.
137The bootloader is expected to be found in that first (HFS) partition.
138
139For dedicated disks, MACHINE port boots off a boot program in
140an MSDOS filesystem. This is set up by the install program
141and no special setup is required.
142