.\"	$NetBSD: install,v 1.10.50.1 2019/11/21 19:28:42 martin Exp $
.\"
.\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.
.Pp
To install or upgrade
.Nx ,
you need to first boot an installation
program and then interact with the screen-menu program
.Ic sysinst .
The installation program actually consists of the
.Nx
kernel plus
an in-memory file system of utility programs.
.Pp
The installation methods are:
.(enum
Installation from an existing
.Nx
or
.Tn IRIX
system by booting the
install kernel from an existing file system.
.if 0 \{\
.It
Copying a bootable diskimage onto the beginning of a disk and installing
onto that disk.
See the
.Sx Diskless installation
section later in these INSTALL notes.
.\}
.It
Installation in a diskless environment.
This means that you will install
your entire system onto a remotely shared disk.
.It
Booting the install kernel over the network and installing onto a local disk.
The beginning of the procedure is similar to diskless installation,
but you will eventually end up writing the system onto your local disk.
.if 0 \{\
.It
Using a helper machine with a SCSI controller to copy the bootable diskimage
onto the beginning of a disk, and moving the disk to the target machine.
See the
.Sx Install via diskimage
section later in these INSTALL notes.
.\}
.enum)
.Pp
You should familiarize yourself with the console PROM environment
and the hardware configuration.
A good place to study PROM tricks is the IRIX "prom" manual page.
Be sure you know how to print the configuration of your machine,
and how to boot from disk or network, as appropriate.
.Pp
To boot from disk, use:
.Pp
.(bullet
.Ic "All machine types:"
.Pp
.Dl "\*[Gt]\*[Gt] setenv systempartition scsi(0)disk(X)rdisk(0)partition(8)"
.Dl "\*[Gt]\*[Gt] setenv osloadpartition scsi(0)disk(X)rdisk(0)partition(0)"
.Dl "\*[Gt]\*[Gt] setenv osloadfilename netbsd"
.Dl "\*[Gt]\*[Gt] setenv osloadoptions auto"
.Dl "\*[Gt]\*[Gt] setenv osloader boot"
.bullet)
.Pp
For all
drives (including all SCSI-2 drives), the kernel should correctly detect
the disk geometry.
.Pp
If you're installing
.Nx*M
for the first time it's a very
good idea to pre-plan partition sizes for the disks onto which you're
installing
.Nx .
Changing the size of partitions after you've
installed is difficult.
If you do not have a spare bootable disk, it may be simpler to re-install
.Nx
again from scratch.
.Pp
To be able to boot from local disk an
SGI Volume Header partition is required.
This special partition is accessed by the PROM to load the
.Nx*M
boot program.
The partition should be about 2 MB in size, but can be reduced somewhat.
The minimum size can approach 150k, but this doesn't leave room for
upgrade boot programs.
.
.Ss2 Install via a bootable CD-ROM
.
The
.Nx*M
CD-ROM is not ISO-formatted.
Since SGI PROMs can not boot from an ISO/CD-9660 filesystem,
the CD-ROM image is generated with an SGI Volume Header for the bootstrap loader
and an ISO/CD-9660-formatted partition for the distribution.
.Pp
To install from a
.Nx*M
CD-ROM, enter the PROM command-line environment and execute one of the following
commands, replacing
.Ar X
with the SCSI-ID of the CD-ROM:
.Pp
(for most Indigo2 (IP22) and Indy (IP24) machines)
.(tag 12n -offset indent -compact
.It Ic "\*[Gt]\*[Gt] boot -f scsi(0)cdrom(X)rdisk(0)partition(8)ip2xboot"
.tag)
(for Indigo (IP20) and Indigo2/Indy machines with old PROMs)
.(tag 12n -offset indent -compact
.It Ic "\*[Gt]\*[Gt] boot -f scsi(0)cdrom(X)rdisk(0)partition(8)aoutboot"
.tag)
(for O2 (IP32) machines)
.(tag 12n -offset indent -compact
.It Ic "\*[Gt]\*[Gt] boot -f pci(0)scsi(0)cdrom(X)rdisk(0)partition(8)ip3xboot"
.tag)
.Pp
.Ss2 Installation for diskless configurations
This section assumes you know how to configure DHCP, TFTP,
and NFS services on your server.
.Pp
.(enum
Place the kernel into the TFTP server's download area.
If the kernel has a
.Dq .gz
suffix, you must first uncompress it using the
.Pa gunzip
program.
You must also decide which kernel you need to boot.
Because of differences in SGI hardware between different machines,
the kernel load addresses differ.
You will need GENERIC32_IP2x for the Indy and Indigo2,
GENERIC32_IP2x.ecoff for the Indigo (and Indy/Indigo2 machines with old PROMs),
and GENERIC32_IP3x for the O2.
.Pp
.Dl server# Ic gzip -d -c netbsd-GENERIC32_IP2x.gz \*[Gt] /tftpboot/netbsd-sgimips
or
.Dl server# Ic gzip -d -c netbsd-GENERIC32_IP2x.ecoff.gz \*[Gt] /tftpboot/netbsd-sgimips
or
.Dl server# Ic gzip -d -c netbsd-GENERIC32_IP2x.gz \*[Gt] /tftpboot/netbsd-sgimips
.
.Pp
Note that your DHCP server must be configured to specify
this file as the boot file for the client.
.It
Unpack the distribution sets into the client's root directory
on the server.
.Pp
.Dl server# Ic cd /export/client/mipseb
.Dl server# Ic gzcat .../base.\*[setsuffix] | tar xvpf -
.Dl server# Ic gzcat .../etc.\*[setsuffix] | tar xvpf -
.Dl "[ repeat for all sets you wish to unpack ]"
.It
Load the kernel from the TFTP server:
.Pp
.Dl "\*[Gt]\*[Gt] setenv SystemPartition bootp():"
.Dl "\*[Gt]\*[Gt] setenv netaddr your.ip.here.please"
.Dl "\*[Gt]\*[Gt] boot"
.enum)
.Pp
The installation of your diskless
.Nx*M
system is now complete!
You may now skip ahead to any post-installation instructions.
.Pp
.Ss2 Installation to local disk from the network
This section is a subset of the above section, and also assumes that
you know how to configure DHCP and TFTP services on your server.
.Pp
.(enum
Place the install kernel into the TFTP server's download area.
Just as above, you need to place the correct bootable kernel into the
TFTP server's download area.  However, instead of a GENERIC kernel,
you must use the correct INSTALL kernel.  This kernel contains a
ramdisk with the installation tools and will allow you to proceed with
installation without further setup.
.Pp
If the kernel has a
.Dq .gz
suffix, you must first uncompress it using the
.Pa gunzip
program.
As above, you must choose either the netbsd-INSTALL32_IP2x, 
netbsd-INSTALL32_IP2x.ecoff, or netbsd-INSTALL32_IP3x kernel.
.Pp
Note that your DHCP server must be configured to specify
this file as the boot file for the client.
.It
Load the kernel from the TFTP server:
.Pp
.Dl "\*[Gt]\*[Gt] setenv SystemPartition bootp():"
.Dl "\*[Gt]\*[Gt] setenv netaddr your.ip.here.please"
.Dl "\*[Gt]\*[Gt] boot"
.enum)
.Pp
.Ss2 Once you've booted the diskimage
.
Once you've booted the installation kernel you will need to
select your terminal type.
Use
.\" .Ic iris-ansi
.\" for an SGI graphics console,
.Ic vt100
for a serial console with a vt100-compatible terminal, or
.Ic xterm
or
.Ic xterms
for a
.Xr tip 1
or
.Xr cu 1
connection running in an
.Xr xterm 1 .
.Pp
The system will then start the
.Ic sysinst
program.
.so ../common/sysinst
