2000-11-06 00:30:22 +03:00
|
|
|
.\" $NetBSD: prep,v 1.15 2000/11/05 21:30:22 pk Exp $
|
1999-01-13 10:30:01 +03:00
|
|
|
.
|
2000-10-29 17:08:04 +03:00
|
|
|
.Ss2 Configuring your PROM
|
2000-10-21 08:49:26 +04:00
|
|
|
.
|
2000-10-29 17:08:04 +03:00
|
|
|
Before you start, you should configure your PROM. There are three
|
|
|
|
categories of PROM:
|
|
|
|
.Dq sunmon
|
|
|
|
(sometimes called Restricted Prompt, sun monitor, or old command mode),
|
|
|
|
OpenBoot PROM 1, and OpenBoot PROM 2.
|
|
|
|
The sun4 machines only have sunmon. Some of the early sun4c models
|
|
|
|
default to sunmon but have OpenBoot PROM 1.
|
|
|
|
The later sun4c models and all sun4m models have OpenBoot PROM 2.
|
2000-10-21 08:49:26 +04:00
|
|
|
.Pp
|
2000-10-22 04:44:04 +04:00
|
|
|
First, you need to stop your system from automatically booting when
|
2000-10-29 17:08:04 +03:00
|
|
|
powered on. Pressing the
|
|
|
|
.Key STOP
|
2000-10-22 04:44:04 +04:00
|
|
|
key (sometimes called the
|
2000-10-29 17:08:04 +03:00
|
|
|
.Key L1
|
|
|
|
key, found on the left side of your keyboard) and the
|
|
|
|
.Key a
|
|
|
|
key will halt your system and give you a PROM prompt. If you are using a
|
2000-10-22 04:44:04 +04:00
|
|
|
Tadpole SPARCbook, you press the
|
2000-10-29 17:08:04 +03:00
|
|
|
.Key Pause
|
2000-10-22 04:44:04 +04:00
|
|
|
and
|
2000-10-29 17:08:04 +03:00
|
|
|
.Key a
|
|
|
|
keys. If you are using a serial console, send a
|
|
|
|
.Dq BREAK
|
2000-10-22 04:44:04 +04:00
|
|
|
signal from your terminal (the method of sending
|
2000-10-29 17:08:04 +03:00
|
|
|
.Dq BREAK
|
2000-10-22 04:44:04 +04:00
|
|
|
varies from terminal to terminal).
|
|
|
|
.Pp
|
|
|
|
Next, you should set your system to always use the OpenBoot PROM
|
2000-10-29 17:08:04 +03:00
|
|
|
(sometimes called
|
|
|
|
.Dq "new command mode" )
|
|
|
|
if it defaults to sunmon. The
|
2000-10-21 08:49:26 +04:00
|
|
|
.Nx
|
2000-10-29 17:08:04 +03:00
|
|
|
kernel relies on some of the functionality provided by the OpenBoot PROM.
|
2000-10-21 08:49:26 +04:00
|
|
|
If your machine gives you a `\*>' prompt instead of an `ok' prompt,
|
|
|
|
type:
|
|
|
|
.Pp
|
|
|
|
.Dl \*> Ic n
|
|
|
|
.Dl ok Ic setenv sunmon-compat? false
|
|
|
|
.Dl ok
|
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
Next, if you are using any security features of OpenBoot PROM, you should
|
|
|
|
turn them off - NetBSD can't deal well with this.
|
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
.Dl ok Ic setenv security-mode none
|
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
The OpenBoot PROM 1 machines (SPARCstation/server 1, SPARCstation/server 1+,
|
|
|
|
IPC, and SLC) have an odd SCSI quirk you should be aware of.
|
2000-10-21 08:49:26 +04:00
|
|
|
There are three SCSI addressing schemes used by your
|
2000-11-01 23:56:06 +03:00
|
|
|
system: SCSI target ID (set by physical jumpers on the device), PROM
|
|
|
|
.Sq unit
|
|
|
|
number (set by OpenBoot PROM 1, based on its SCSI target ID), and the name
|
|
|
|
you reference within an operating system (set by the kernel, based on the PROM
|
|
|
|
.Sq unit
|
|
|
|
number).
|
2000-10-21 08:49:26 +04:00
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
Sun shipped these systems with the internal drives set to SCSI target IDs
|
|
|
|
3 and 1. The default value of the OpenBoot PROM variable
|
2000-10-29 17:08:04 +03:00
|
|
|
.Sq Li sd-targets
|
|
|
|
is
|
|
|
|
.Sq Li 31204567.
|
2000-11-01 23:56:06 +03:00
|
|
|
This variable maps how the OpenBoot PROM 1 assigns
|
|
|
|
.Sq unit
|
|
|
|
numbers based on the SCSI target ID.
|
|
|
|
Thus the device at SCSI target ID 3 is considered
|
|
|
|
.Sq unit
|
|
|
|
0, and the SCSI device at target ID 0 is
|
|
|
|
.Sq unit
|
|
|
|
3. When you type
|
2000-10-29 17:08:04 +03:00
|
|
|
.Dq Ic boot scsi(0,0,0) ,
|
2000-11-01 23:56:06 +03:00
|
|
|
the OpenBoot PROM will boot from
|
|
|
|
.Sq unit
|
|
|
|
0 (which is SCSI target ID 3, the internal hard drive). The
|
2000-10-29 17:08:04 +03:00
|
|
|
.Tn SunOS
|
|
|
|
kernel is hard-wired to map
|
|
|
|
.Li sd0
|
|
|
|
to SCSI target 3, and
|
|
|
|
.Li sd3
|
|
|
|
to SCSI target 0.
|
2000-11-01 23:56:06 +03:00
|
|
|
.Bl -column -offset indent PROM\ Unit# SCSI\ Target SunOS\ name
|
|
|
|
.It Em PROM\ Unit# Ta Em SCSI\ Target Ta Em SunOS\ name
|
2000-10-21 08:49:26 +04:00
|
|
|
.It \~\~\~0 Ta \~\~\~3 Ta \~\~\~sd0
|
|
|
|
.It \~\~\~1 Ta \~\~\~1 Ta \~\~\~sd1
|
|
|
|
.It \~\~\~2 Ta \~\~\~2 Ta \~\~\~sd2
|
|
|
|
.It \~\~\~3 Ta \~\~\~0 Ta \~\~\~sd3
|
|
|
|
.It \~\~\~4 Ta \~\~\~4 Ta \~\~\~st0
|
|
|
|
.It \~\~\~5 Ta \~\~\~5 Ta \~\~\~st1
|
|
|
|
.It \~\~\~6 Ta \~\~\~6 Ta \~\~\~cdrom
|
1999-01-13 10:30:01 +03:00
|
|
|
.El
|
|
|
|
.Pp
|
2000-11-06 00:30:22 +03:00
|
|
|
The
|
2000-11-01 23:56:06 +03:00
|
|
|
.Nx*M
|
|
|
|
.Li GENERIC
|
2000-11-06 00:30:22 +03:00
|
|
|
kernel does not wire things down as does
|
2000-11-01 23:56:06 +03:00
|
|
|
.Tn SunOS .
|
|
|
|
It names the disks in the order
|
2000-11-06 00:30:22 +03:00
|
|
|
that the SCSI targets are probed (01234567). If you only have one disk,
|
|
|
|
it is always
|
2000-10-29 17:08:04 +03:00
|
|
|
.Li sd0
|
2000-11-01 23:56:06 +03:00
|
|
|
regardless of its SCSI target ID or its PROM
|
|
|
|
.Sq unit
|
|
|
|
number, and there are no problems. If you have two disks, one at
|
|
|
|
SCSI ID 2 (
|
|
|
|
.Sq unit
|
|
|
|
2) and SCSI ID 3 (
|
|
|
|
.Sq unit
|
|
|
|
0), then they are recognized as
|
2000-10-29 17:08:04 +03:00
|
|
|
.Li sd0
|
2000-11-06 00:30:22 +03:00
|
|
|
and
|
|
|
|
.Li sd1
|
2000-10-29 17:08:04 +03:00
|
|
|
respectively. This can be a problem if you are not
|
2000-10-21 08:49:26 +04:00
|
|
|
aware of it, particularly when creating an fstab.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
There are two approaches to fixing this problem: changing the
|
|
|
|
mapping that OpenBoot PROM 1 does, and changing the
|
2000-10-21 08:49:26 +04:00
|
|
|
.Nx
|
2000-11-06 00:30:22 +03:00
|
|
|
kernel configuration.
|
2000-11-01 23:56:06 +03:00
|
|
|
To get OpenBoot PROM 1 to number the SCSI
|
|
|
|
.Sq unit
|
|
|
|
numbers the same as the SCSI target IDs, you need to run this command:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
|
|
|
.Dl ok Ic "setenv sd-targets 01234567"
|
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
This may, however, cause problems if you were to later attempt to use
|
2000-10-29 17:08:04 +03:00
|
|
|
.Tn SunOS
|
|
|
|
on this machine or if you reset the OpenBoot PROM variables.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
The other approach is to use a
|
2000-10-21 08:49:26 +04:00
|
|
|
.Nx
|
2000-11-06 00:30:22 +03:00
|
|
|
kernel that matches the PROM's odd target mapping by treating
|
2000-11-01 23:56:06 +03:00
|
|
|
.Sq unit
|
|
|
|
0 (i.e. SCSI target ID 3) as
|
2000-11-06 00:30:22 +03:00
|
|
|
.Li sd0
|
2000-11-01 23:56:06 +03:00
|
|
|
and
|
|
|
|
.Sq unit
|
|
|
|
3 (i.e. SCSI target ID 0) as
|
2000-11-06 00:30:22 +03:00
|
|
|
.Li sd3 .
|
2000-10-29 17:08:04 +03:00
|
|
|
The
|
|
|
|
.Li GENERIC_SCSI3
|
2000-11-06 00:30:22 +03:00
|
|
|
kernel performs this target mapping, but the
|
2000-10-29 17:08:04 +03:00
|
|
|
.Li GENERIC
|
|
|
|
and
|
|
|
|
.Li INSTALL
|
|
|
|
kernels do not.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
|
|
|
.(Note
|
|
|
|
This is also a concern when you start building your own customised kernels.
|
|
|
|
.Note)
|
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
The machines with OpenBoot PROM 2 (SPARCstation/server 2,
|
2000-11-06 00:30:22 +03:00
|
|
|
ELC, IPX, and all sun4m models) have s similar SCSI target mapping in the
|
|
|
|
form of a
|
2000-11-01 23:56:06 +03:00
|
|
|
.Ic devalias
|
2000-11-06 00:30:22 +03:00
|
|
|
entry. That is, the device alias
|
|
|
|
.Ic disk
|
|
|
|
is shorthand for the disk at SCSI ID 3 on the internal SCSI controller.
|
|
|
|
Normally, the
|
|
|
|
.Ic disk
|
|
|
|
device alias is what the PROM uses as the default boot device, i.e. in the
|
|
|
|
absence of a
|
|
|
|
.Ar device
|
|
|
|
argument to the
|
|
|
|
.Ic boot
|
|
|
|
command.
|
|
|
|
Note that there are also pre-configured device alias entries for
|
|
|
|
.Ic disk0,
|
|
|
|
.Ic disk1,
|
|
|
|
.Ic disk2
|
|
|
|
and
|
|
|
|
.Ic disk3 ,
|
|
|
|
which are in fact a one-to-one mapping to the SCSI targets
|
|
|
|
.Ic 0
|
|
|
|
to
|
|
|
|
.Ic 3
|
|
|
|
.Pq all on the internal SCSI controller .
|
|
|
|
.Pp
|
|
|
|
Again, it may be advantageous to use a fixed
|
|
|
|
.Dq SCSI target
|
|
|
|
to
|
|
|
|
.Do
|
2000-11-01 23:56:06 +03:00
|
|
|
.Nx
|
2000-11-06 00:30:22 +03:00
|
|
|
disk unit
|
|
|
|
.Dc
|
|
|
|
mapping in your kernel configuration file (such as is done in the
|
2000-10-29 17:08:04 +03:00
|
|
|
.Li GENERIC_SCSI3
|
2000-11-06 00:30:22 +03:00
|
|
|
kernel) to ensure that your disks remain showing up at the same
|
|
|
|
.Nx
|
|
|
|
device unit numbers even if you add disks to your system at a later time.
|
2000-10-21 08:49:26 +04:00
|
|
|
.
|
2000-10-29 17:08:04 +03:00
|
|
|
.Ss2 Determining how to access your SCSI disk from the PROM
|
2000-10-21 08:49:26 +04:00
|
|
|
.
|
2000-10-29 17:08:04 +03:00
|
|
|
sunmon and OpenBoot PROM 1 use an archaic
|
|
|
|
.Li sd( Ns Ar c,u,p Ns Ic \&)
|
|
|
|
syntax to address SCSI devices. OpenBoot PROM 2 uses a more intuitive
|
2000-10-21 08:49:26 +04:00
|
|
|
syntax using device aliases.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
To calculate the parameters for sunmon and OpenBoot PROM 1:
|
|
|
|
.(tag xcc -offset indent
|
2000-10-21 08:49:26 +04:00
|
|
|
.It Ar c
|
|
|
|
specifies the SCSI controller number (first is 0, second is 1, ...)
|
|
|
|
.It Ar u
|
|
|
|
the hexadecimal number obtained from evaluating
|
2000-10-29 17:08:04 +03:00
|
|
|
the expression
|
|
|
|
.Em (8 * TARGET) + LUN
|
2000-10-21 08:49:26 +04:00
|
|
|
.It Ar p
|
2000-10-29 17:08:04 +03:00
|
|
|
the partition number from which to boot
|
|
|
|
.Po
|
|
|
|
.Sq Li 0
|
|
|
|
=
|
|
|
|
.Sq Li a ,
|
|
|
|
.Sq Li 1
|
|
|
|
=
|
|
|
|
.Sq Li b ,
|
|
|
|
etc.
|
|
|
|
.Pc
|
2000-10-21 08:49:26 +04:00
|
|
|
.tag)
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
Therefore, to boot from the swap partition on the internal hard drive
|
|
|
|
(first SCSI bus, target 0, lun 0, partition 1), one would use:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
.Dl ok Ic "boot sd(0,0,1)"
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
To boot from a CD-ROM (first SCSI bus, target 6,
|
|
|
|
lun 0, partition dynamically determined), one would use:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
.Dl ok Ic "boot sd(0,30,)"
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
And, to boot from a kernel named
|
|
|
|
.Li netbsd-GENERIC
|
|
|
|
on the fourth partition (
|
2000-10-29 17:08:04 +03:00
|
|
|
.Sq Li d ,
|
|
|
|
often the
|
2000-10-22 04:44:04 +04:00
|
|
|
.Pa /usr
|
|
|
|
partition) on an external hard drive (first SCSI bus, target 2, lun 0,
|
2000-10-21 08:49:26 +04:00
|
|
|
partition 3), one would use:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
.Dl ok Ic "boot sd(0,10,3)netbsd-GENERIC"
|
2000-10-21 08:49:26 +04:00
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
Now, for OpenBoot PROM 2, SCSI devices are specified by an OpenBOOT
|
|
|
|
.Ic devalias
|
|
|
|
which provides simple mnemonics for the full path to the device. Type
|
|
|
|
.Ic devalias
|
|
|
|
in OpenBoot PROM 2 to get a list of all of the available aliases.
|
2000-10-21 08:49:26 +04:00
|
|
|
Just the alias and partition are necessary when booting.
|
|
|
|
.Pp
|
|
|
|
Therefore, to boot from the swap partition on the internal hard drive
|
2000-10-29 17:08:04 +03:00
|
|
|
(OpenBoot PROM 2 assumes the internal hard drive is at target 3), one would
|
|
|
|
use:
|
|
|
|
.Pp
|
2000-10-21 08:49:26 +04:00
|
|
|
.Dl ok Ic "boot disk:b"
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
|
|
|
To boot from a CD-ROM (OpenBoot PROM 2 assumes the CD-ROM is at target 6),
|
2000-10-22 04:44:04 +04:00
|
|
|
one would use:
|
2000-10-29 17:08:04 +03:00
|
|
|
.Pp
|
|
|
|
.Dl ok Ic "boot cdrom"
|
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
And, to boot from a kernel named
|
|
|
|
.Li netbsd-GENERIC
|
|
|
|
on the fourth partition (
|
2000-10-29 17:08:04 +03:00
|
|
|
.Sq Li d ,
|
|
|
|
often the
|
|
|
|
.Pa /usr
|
|
|
|
partition) on an external hard drive (target 2, partition 3), one would use:
|
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
.Dl ok Ic "boot disk2:d netbsd-GENERIC"
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
The full device path specifier for OpenBoot PROM 2 depends on how OpenBoot
|
|
|
|
PROM 2 recognizes
|
|
|
|
your SCSI controller. Typically, one would use something like:
|
2000-10-21 08:49:26 +04:00
|
|
|
.Pa /sbus/esp/sd@ Ns Ar t,p
|
|
|
|
where t is the SCSI target and p is the partition number.
|
|
|
|
.
|
|
|
|
.Ss2 Deciding on partition sizes
|
|
|
|
.
|
2000-10-10 16:55:15 +04:00
|
|
|
If you're installing
|
|
|
|
.Nx*M
|
|
|
|
for the first time it's a good idea
|
1996-10-09 04:13:36 +04:00
|
|
|
to look at the partition sizes of disk you intend installing NetBSD on.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
2000-10-29 17:08:04 +03:00
|
|
|
Asumming a classic partition scheme with
|
|
|
|
.Pa /
|
|
|
|
(root) and
|
|
|
|
.Pa /usr
|
|
|
|
filesystems, a comfortable size for the NetBSD root filesystem partition is
|
|
|
|
about 20 MB; a good initial size for the swap partition is twice the amount
|
|
|
|
of physical memory in your machine (though, unlike
|
|
|
|
.Tn SunOS 4.x ,
|
|
|
|
there are no restrictions on the size of the swap partition that would render
|
|
|
|
part of your memory unusable). A full binary installation takes about 60 MB
|
|
|
|
in
|
|
|
|
.Pa /usr .
|
2000-11-03 05:18:50 +03:00
|
|
|
.Pp
|
2000-11-01 23:56:06 +03:00
|
|
|
Most sparc systems have trouble booting if the root partition extends
|
|
|
|
beyond the first 2 GB of your disk.
|
2000-10-21 08:49:26 +04:00
|
|
|
.
|
|
|
|
.Ss2 Configuration of network interfaces
|
|
|
|
.
|
2000-10-29 17:08:04 +03:00
|
|
|
Some network devices (i.e. the built-in
|
|
|
|
.Em le
|
|
|
|
interface on sun4m machines)
|
|
|
|
allow a choice between operating on a UTP or a AUI port. The
|
|
|
|
.Em le
|
|
|
|
driver supports automatic detection of the port which is actually connected to
|
|
|
|
the wire. Additionally, some of the Fast ethernet devices (such as
|
|
|
|
.Em be ,
|
|
|
|
.Em hme ,
|
|
|
|
.Em qec ,
|
|
|
|
and
|
|
|
|
.Em qfe )
|
|
|
|
support selection of various speeds and options.
|
2000-10-21 08:49:26 +04:00
|
|
|
The default is to attempt to automatically detect the speed.
|
1999-01-13 10:30:01 +03:00
|
|
|
.Pp
|
1997-07-14 18:59:23 +04:00
|
|
|
If automatic detection is not available or not working properly in your
|
|
|
|
environment, you may have to specify the type connection using the
|
2000-10-29 17:08:04 +03:00
|
|
|
.Ic media
|
|
|
|
parameter of
|
|
|
|
.Xr ifconfig 8 .
|
|
|
|
During installation, you'll get the opportunity to specify the appropriate
|
|
|
|
medium. Use
|
|
|
|
.Li 10base5
|
|
|
|
or
|
|
|
|
.Li AUI
|
|
|
|
to select the AUI connector, or
|
|
|
|
.Li 10baseT
|
|
|
|
or
|
|
|
|
.Li UTP
|
|
|
|
to select the UTP connector.
|
|
|
|
Fast ethernet interfaces default to
|
|
|
|
.Li auto ,
|
|
|
|
which usually does not detect properly and runs at
|
|
|
|
.Sq 10BaseT
|
|
|
|
speed.
|
|
|
|
The options are
|
|
|
|
.Li 10baseT ,
|
|
|
|
.Li 10baseTX ,
|
|
|
|
and
|
|
|
|
.Li auto .
|
|
|
|
The
|
|
|
|
.Em hme
|
|
|
|
and
|
|
|
|
.Em qfe
|
|
|
|
interfaces also allow
|
|
|
|
.Li 10baseT-FDX
|
|
|
|
and
|
|
|
|
.Li 100baseT-FDX .
|