1 .\" $NetBSD: prep,v 1.25 2008/11/20 20:52:17 jdc Exp $
3 .Ss2 Configuring your PROM
5 Before you start, you should configure your PROM. There are three
8 (sometimes called Restricted Prompt, sun monitor, or old command mode),
9 OpenBoot PROM 1, and OpenBoot PROM 2.
10 The sun4 machines only have sunmon. Some of the early sun4c models
11 default to sunmon but have OpenBoot PROM 1.
12 The later sun4c models and all sun4m models have OpenBoot PROM 2.
14 First, you need to stop your system from automatically booting when
15 powered on. Pressing the
17 key (sometimes called the
19 key, found on the left side of your keyboard) and the
21 key will halt your system and give you a PROM prompt. If you are using a
22 Tadpole SPARCbook, you press the
26 keys. If you are using a serial console, send a
28 signal from your terminal (the method of sending
30 varies from terminal to terminal).
32 If the ethernet address of your \*M system is
33 .Li ff:ff:ff:ff:ff:ff ,
34 then your NVRAM battery is dead and you will have trouble using
35 ethernet (among other problems). Read the Sun NVRAM/Hostid FAQ.
36 .Lk http://www.squirrel.com/squirrel/sun-nvram-hostid.faq.html
38 If you have a valid ethernet address and you plan to netboot, write down
39 your system's ethernet address.
41 Next, you should set your system to always use the OpenBoot PROM
43 .Dq "new command mode" )
44 if it defaults to sunmon. The
46 kernel relies on some of the functionality provided by the OpenBoot PROM.
47 If your machine gives you a `\*[Gt]' prompt instead of an `ok' prompt,
52 .No ok Ic "setenv sunmon-compat? false"
56 Next, if you are using any security features of OpenBoot PROM, you should
59 can't deal well with this.
62 .No ok Ic "setenv security-mode none"
65 If you are using a serial console, the
67 installer defaults to using 9600 bps, 8N1 settings. You may want to
68 configure your system and serial terminal like this prior to booting the
69 installer. Additionally, a new installation of
71 will default to these settings as well.
73 The OpenBoot PROM 1 machines (SPARCstation/server 1, SPARCstation/server 1+,
74 IPC, and SLC) have an odd SCSI quirk you should be aware of.
75 There are three SCSI addressing schemes used by your
76 system: SCSI target ID (set by physical jumpers on the device), PROM
78 number (set by OpenBoot PROM 1, based on its SCSI target ID), and the name
79 you reference within an operating system (set by the kernel, based on the PROM
83 Sun shipped these systems with the internal drives set to SCSI target IDs
84 3 and 1. The default value of the OpenBoot PROM variable
88 This variable maps how the OpenBoot PROM 1 assigns
90 numbers based on the SCSI target ID.
91 Thus the device at SCSI target ID 3 is considered
93 0, and the SCSI device at target ID 0 is
96 .Dq Ic boot scsi(0,0,0) ,
97 the OpenBoot PROM will boot from
99 0 (which is SCSI target ID 3, the internal hard drive). The
101 kernel is hard-wired to map
103 to SCSI target 3, and
106 .Bl -column -offset indent PROM\ Unit# SCSI\ Target SunOS\ name
107 .It Em PROM\ Unit# Ta Em SCSI\ Target Ta Em SunOS\ name
108 .It \~\~\~0 Ta \~\~\~3 Ta \~\~\~sd0
109 .It \~\~\~1 Ta \~\~\~1 Ta \~\~\~sd1
110 .It \~\~\~2 Ta \~\~\~2 Ta \~\~\~sd2
111 .It \~\~\~3 Ta \~\~\~0 Ta \~\~\~sd3
112 .It \~\~\~4 Ta \~\~\~4 Ta \~\~\~st0
113 .It \~\~\~5 Ta \~\~\~5 Ta \~\~\~st1
114 .It \~\~\~6 Ta \~\~\~6 Ta \~\~\~cdrom
120 kernel does not wire things down as does
122 It names the disks in the order
123 that the SCSI targets are probed (01234567). If you only have one disk,
126 regardless of its SCSI target ID or its PROM
128 number, and there are no problems. If you have two disks, one at
133 0), then they are recognized as
137 respectively. This can be a problem if you are not
138 aware of it, particularly when creating an fstab.
140 There are two approaches to fixing this problem: changing the
141 mapping that OpenBoot PROM 1 does, and changing the
143 kernel configuration.
144 To get OpenBoot PROM 1 to number the SCSI
146 numbers the same as the SCSI target IDs, you need to run this command:
149 .No ok Ic "setenv sd-targets 01234567"
152 This may, however, cause problems if you were to later attempt to use
154 on this machine or if you reset the OpenBoot PROM variables.
156 The other approach is to use a
158 kernel that matches the PROM's odd target mapping by treating
160 0 (i.e. SCSI target ID 3) as
164 3 (i.e. SCSI target ID 0) as
168 kernel performs this target mapping, but the
175 This is also a concern when you start building your own customised kernels.
178 The machines with OpenBoot PROM 2 (SPARCstation/server 2,
179 ELC, IPX, and all sun4m models) have a similar SCSI target mapping in the
182 entry. That is, the device alias
184 is shorthand for the disk at SCSI ID 3 on the internal SCSI controller.
187 device alias is what the PROM uses as the default boot device, i.e. in the
193 Note that there are also pre-configured device alias entries for
199 which are in fact a one-to-one mapping to the SCSI targets
203 .Pq all on the internal SCSI controller .
205 Again, it may be advantageous to use a fixed
209 mapping in your kernel configuration file (such as is done in the
211 kernel) to ensure that your disks remain showing up at the same
213 device unit numbers even if you add disks to your system at a later time.
215 .Ss2 Determining how to access your SCSI disk from the PROM
217 sunmon and OpenBoot PROM 1 use an archaic
218 .Li sd( Ns Ar c,u,p Ns Ic \&)
219 syntax to address SCSI devices. OpenBoot PROM 2 uses a more intuitive
220 syntax using device aliases.
222 To calculate the parameters for sunmon and OpenBoot PROM 1:
223 .(tag xcc -offset indent
225 specifies the SCSI controller number (first is 0, second is 1, ...)
227 the hexadecimal number obtained from evaluating
229 .Em (8 * TARGET) + LUN
231 the partition number from which to boot
241 Therefore, to boot from the swap partition on the internal hard drive
242 (first SCSI bus, target 0, lun 0, partition 1), one would use:
245 .No ok Ic "boot sd(0,0,1)"
248 To boot from a CD-ROM (first SCSI bus, target 6,
249 lun 0, partition dynamically determined), one would use:
252 .No ok Ic "boot sd(0,30,)"
255 And, to boot from a kernel named
257 on the fourth partition
261 partition) on an external hard drive (first SCSI bus, target 2, lun 0,
262 partition 3), one would use:
265 .No ok Ic "boot sd(0,10,3)netbsd-GENERIC"
268 Now, for OpenBoot PROM 2, SCSI devices are specified by an OpenBOOT
270 which provides simple mnemonics for the full path to the device. Type
272 in OpenBoot PROM 2 to get a list of all of the available aliases.
273 Just the alias and partition are necessary when booting.
275 Therefore, to boot from the swap partition on the internal hard drive
276 (OpenBoot PROM 2 assumes the internal hard drive is at target 3), one would
280 .No ok Ic "boot disk:b"
283 To boot from a CD-ROM (OpenBoot PROM 2 assumes the CD-ROM is at target 6),
287 .No ok Ic "boot cdrom"
290 And, to boot from a kernel named
292 on the fourth partition
296 partition) on an external hard drive (target 2, partition 3), one would use:
299 .No ok Ic "boot disk2:d netbsd-GENERIC"
302 The full device path specifier for OpenBoot PROM 2 depends on how OpenBoot
304 your SCSI controller. Typically, one would use something like:
305 .Pa /sbus/esp/sd@ Ns Ar t,p
306 where t is the SCSI target and p is the partition number.
308 .Ss2 Determining how to boot from an SBUS card
310 Some SBUS cards have firmware that lets you use them as a boot device.
311 These cards do not automatically create a
313 entry, so you must traverse the device tree to figure out what the
314 OpenBoot PROM calls your card. You will be using OpenBoot PROM commands
315 at the `ok' prompt. First `cd' to the top of the device tree and list the
316 nodes there. The following is the procedure to boot from an HME card in a
321 ffd3b790 TI,TMS390S10@0,f8fffffc
322 ffd2d254 virtual-memory@0,0
325 ffd2b310 iommu@0,10000000
331 Usually, you can simply type in the name before the at (@) sign and the
332 OpenBoot PROM will fill in the rest.
336 ffd2b454 sbus@0,10001000
340 ffd42a1c SUNW,hme@1,8c00000
342 ffd40d28 ledma@4,8400010
343 ffd40c9c SUNW,bpp@4,c800000
344 ffd40c00 audio@4,1300000
345 ffd3dc68 espdma@4,8400000
346 .No ok Ic "cd SUNW,hme"
349 /iommu@0,10000000/sbus@0,10001000/SUNW,hme@1,8c00000
351 OK, now we know the path to the HME device in this example. Now, we need
352 to determine if it's capable of booting. If it is, it will have the
357 reset seek load open close
358 watch-net selftest obp-selftest write read
359 preamble-32 enable-link-pulse disable-link-pulse
360 force-speeds reset-transceiver use-bit-bang-mode
361 use-frame-mode dump-phys transfer-speed=10
362 transfer-speed=100 mii-write mii-read
366 Also, in case you're interested in further details about your
367 hardware, you can use the `.attributes' command.
369 .No ok Ic ".attributes"
374 intr 00000037 00000000
376 address-bits 00000030
377 max-frame-size 00004000
378 reg 00000001 08c00000 00000108
379 00000001 08c02000 00002000
380 00000001 08c04000 00002000
381 00000001 08c06000 00002000
382 00000001 08c07000 00000020
386 So, when it's time to type in a boot command, use the shortened version of the
388 command. In this example, you'd type:
390 .No ok Ic "boot /iommu/sbus/SUNW,hme"
392 And when the kernel is done booting, it may not automatically use your
393 card as the root device -- you may need to type in the
398 root on sd0a dumps on sd0b
399 no file system for sd0 (dev 0x700)
400 cannot mount root, error = 79
401 .No "root device (default sd0a):" Ic "?"
402 use one of: fd0[a-h] le0 le1 hme0 sd0[a-h] halt
403 .No "root device (default sd0a):" Ic "hme0"
404 .No "dump device:" Ic "hme0"
405 .No "file system (default generic):" Ic "nfs"
409 .Ss2 Deciding on partition sizes
413 for the first time it's a good idea
414 to look at the partition sizes of disk you intend installing
418 A minimal installation of
420 requires about 100 MB.
421 A full installation requires considerably more.
422 A good initial size for the swap partition is twice the amount
423 of physical memory in your machine (unlike
425 there are no restrictions on the size of the swap partition that would render
426 part of your memory unusable).
428 Note that there are limitations on the size of the root partition for
431 On sun4 machines, the
433 sparc boot loader can only boot from RAID partitions that start at the
434 beginning of the disk.
436 On sun4 and early PROM version sun4c machines, the PROM can only boot from
437 the first 1Gb of the disk.
439 On later PROM version sun4c and early PROM version sun4m machines, the PROM
440 can only boot from the first 2Gb of the disk.
442 On later PROM version sun4m machines, the PROM can only boot from the first
445 .Ss2 Configuration of network interfaces
447 Some network devices (i.e. the built-in
449 interface on sun4m machines)
450 allow a choice between operating on a UTP or a AUI port once the
452 kernel is running. The
454 driver supports automatic detection of the port which is actually connected to
455 the wire. Additionally, some of the Fast ethernet devices (such as
461 support selection of various speeds and options.
462 The default is to attempt to automatically detect the speed.
464 If automatic detection is not available or not working properly in your
465 environment, you may have to specify the type connection using the
469 During installation, you'll get the opportunity to specify the appropriate
474 to select the AUI connector, or
478 to select the UTP connector.
479 Fast ethernet interfaces default to
481 which usually does not detect properly and runs at
493 interfaces also allow