2002-06-30 16:57:29 +04:00
|
|
|
.\" $NetBSD: install,v 1.4 2002/06/30 12:57:29 lukem Exp $
|
2001-12-18 00:39:51 +03:00
|
|
|
.\"
|
2002-06-30 16:57:29 +04:00
|
|
|
.\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
|
2001-12-18 00:39:51 +03:00
|
|
|
.\" 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.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the NetBSD
|
|
|
|
.\" Foundation, Inc. and its contributors.
|
|
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
|
|
.\" contributors may be used to endorse or promote products derived
|
|
|
|
.\" from this software without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
|
|
|
.
|
|
|
|
Installing
|
|
|
|
.Nx
|
|
|
|
is a relatively complex process, but if you have
|
|
|
|
this document in hand it should not be too difficult.
|
|
|
|
.Pp
|
|
|
|
There are several ways to install
|
|
|
|
.Nx
|
2002-06-30 16:57:29 +04:00
|
|
|
onto your disk.
|
|
|
|
If your machine has a tape drive the easiest way is
|
2001-12-18 00:39:51 +03:00
|
|
|
.Sx "Installing from tape"
|
2002-06-30 16:57:29 +04:00
|
|
|
(details below).
|
|
|
|
If your machine is on a network with a suitable NFS server, then
|
2001-12-18 00:39:51 +03:00
|
|
|
.Sx "Installing from NFS"
|
|
|
|
is the next best method.
|
|
|
|
Otherwise, if you have another
|
|
|
|
.Tn Sun
|
|
|
|
machine running
|
|
|
|
.Tn SunOS
|
|
|
|
you can initialize the disk on that machine and then move the disk.
|
|
|
|
(Installing from
|
|
|
|
.Tn SunOS
|
|
|
|
is not recommended.)
|
|
|
|
.
|
|
|
|
.Ss2 Installing from tape
|
|
|
|
.
|
|
|
|
Create the
|
|
|
|
.Nx*M
|
|
|
|
\*V boot tape as described in the section
|
|
|
|
entitled
|
2002-05-08 20:32:54 +04:00
|
|
|
.Sx "Creating boot/install tapes"
|
2002-06-30 16:57:29 +04:00
|
|
|
and boot the tape.
|
|
|
|
At the PROM monitor prompt, use one of the commands:
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
.Dl \*> Ns Ic "b st()"
|
|
|
|
.Dl \*> Ns Ic "b st(0,8,0)"
|
|
|
|
.Pp
|
|
|
|
The first example will use the tape on SCSI target 4, where the
|
2002-06-30 16:57:29 +04:00
|
|
|
second will use SCSI target 5.
|
|
|
|
The
|
2001-12-18 00:39:51 +03:00
|
|
|
.Li \*>
|
|
|
|
is the monitor prompt.
|
|
|
|
.Pp
|
|
|
|
After the tape loads, you should see many lines of configuration
|
|
|
|
messages, and then the following
|
|
|
|
.Sq "welcome"
|
|
|
|
screen:
|
|
|
|
.(disp
|
|
|
|
Welcome to the NetBSD/\*M RAMDISK root!
|
|
|
|
|
|
|
|
This environment is designed to do only three things:
|
|
|
|
1: Partition your disk (use the command: edlabel /dev/rsd0c)
|
|
|
|
2: Copy a miniroot image into the swap partition (/dev/rsd0b)
|
|
|
|
3: Reboot (using the swap partition, i.e. /dev/sd?b).
|
|
|
|
|
|
|
|
Note that the sun2 firmware cannot boot from a partition located
|
|
|
|
more than 1 GB from the beginning of the disk, so the swap partition
|
|
|
|
should be completely below the 1 GB boundary.
|
|
|
|
|
|
|
|
Copying the miniroot can be done several ways, allowing
|
|
|
|
the source of the miniroot image to be on any of these:
|
|
|
|
boot tape, NFS server, TFTP server, rsh server
|
|
|
|
|
|
|
|
The easiest is loading from tape, which is done as follows:
|
|
|
|
mt -f /dev/nrst0 rewind
|
|
|
|
mt -f /dev/nrst0 fsf 2
|
|
|
|
dd bs=32k if=/dev/nrst0 of=/dev/rsd0b
|
|
|
|
(For help with other methods, please see the install notes.)
|
|
|
|
|
|
|
|
To reboot using the swap partition, first use "halt",
|
|
|
|
then at the PROM monitor prompt use a command like:
|
|
|
|
b sd(,,1) -s
|
|
|
|
|
|
|
|
To view this message again, type: cat /.welcome
|
|
|
|
.disp)
|
|
|
|
.Pp
|
|
|
|
Copy the miniroot as described in the welcome message, and
|
2002-06-30 16:57:29 +04:00
|
|
|
reboot from that just installed miniroot.
|
|
|
|
See the section entitled
|
2001-12-18 00:39:51 +03:00
|
|
|
.Sx Booting the miniroot
|
|
|
|
for details.
|
|
|
|
.
|
|
|
|
.Ss2 Installing from NFS
|
|
|
|
.
|
|
|
|
Before you can install from NFS, you must have already configured
|
|
|
|
your NFS server to support your machine as a diskless client.
|
|
|
|
Instructions for configuring the server are found in the section
|
|
|
|
entitled
|
|
|
|
.Sx Getting the NetBSD System onto Useful Media
|
|
|
|
above.
|
|
|
|
.Pp
|
|
|
|
First, at the
|
|
|
|
.Tn Sun
|
|
|
|
PROM monitor prompt, enter a boot command
|
2002-06-30 16:57:29 +04:00
|
|
|
using the network interface as the boot device.
|
|
|
|
If your machine has Intel Ethernet, this is
|
2001-12-18 00:39:51 +03:00
|
|
|
.Em ie ,
|
|
|
|
and if it has 3Com Ethernet, this is
|
|
|
|
.Em ec .
|
|
|
|
Examples:
|
|
|
|
.Pp
|
|
|
|
.Dl \*> Ns Ic "b ie() -s"
|
|
|
|
.Dl \*> Ns Ic "b ec() -s"
|
|
|
|
.Pp
|
|
|
|
After the boot program loads the RAMDISK kernel, you should
|
|
|
|
see the welcome screen as shown in the
|
|
|
|
.Sx Installing from tape
|
2002-06-30 16:57:29 +04:00
|
|
|
section above.
|
|
|
|
You must configure the network interface before you
|
|
|
|
can use any network resources.
|
|
|
|
For example the command:
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
.Dl ssh\*> Ic "ifconfig ie0 inet 192.233.20.198 up"
|
|
|
|
.Pp
|
2002-06-30 16:57:29 +04:00
|
|
|
will bring up the network interface with that address.
|
|
|
|
The next step is to copy the miniroot from your server.
|
|
|
|
This can be done using either NFS or remote shell.
|
|
|
|
(In the examples that follow, the server has IP address 192.233.20.195.)
|
|
|
|
You may then need to
|
2001-12-18 00:39:51 +03:00
|
|
|
add a default route if the server is on a different subnet:
|
|
|
|
.Pp
|
|
|
|
.Dl ssh\*> Ic "route add default 192.233.20.255 1"
|
|
|
|
.Pp
|
|
|
|
You can look at the route table using:
|
|
|
|
.Pp
|
|
|
|
.Dl ssh\*> Ic "route show"
|
|
|
|
.Pp
|
|
|
|
Now mount the NFS file system containing the miniroot image:
|
|
|
|
.Pp
|
2002-03-22 02:41:32 +03:00
|
|
|
.Dl ssh\*> Ic "mount -o rdonly,-r=1024 192.233.20.195:/server/path /mnt"
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
2002-05-08 20:32:54 +04:00
|
|
|
The procedure is simpler and much faster if you have space for an expanded
|
2002-06-30 16:57:29 +04:00
|
|
|
(not compressed) copy of the miniroot image.
|
|
|
|
In that case:
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
2002-05-08 20:32:54 +04:00
|
|
|
.Dl ssh\*> Ic "dd if=/mnt/miniroot.fs of=/dev/rsd0b bs=8k"
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
Otherwise, you will need to use
|
|
|
|
.Ic zcat
|
2002-06-30 16:57:29 +04:00
|
|
|
to expand the miniroot image while copying.
|
|
|
|
This is tricky because the
|
2001-12-18 00:39:51 +03:00
|
|
|
.Ic ssh
|
|
|
|
program
|
|
|
|
(small shell) does not handle
|
|
|
|
.Xr sh 1
|
2002-06-30 16:57:29 +04:00
|
|
|
pipeline syntax.
|
|
|
|
Instead,
|
2001-12-18 00:39:51 +03:00
|
|
|
you first run the reader in the background with its input set
|
|
|
|
to
|
|
|
|
.Pa /dev/pipe
|
|
|
|
and then run the other program in the foreground with its output to
|
|
|
|
.Pa /dev/pipe .
|
|
|
|
The result looks like this:
|
|
|
|
.Pp
|
|
|
|
.Dl ssh\*> Ic "run -bg dd if=/dev/pipe of=/dev/rsd0b obs=8k"
|
2002-05-08 20:32:54 +04:00
|
|
|
.Dl ssh\*> Ic "run -o /dev/pipe zcat /mnt/install/miniroot.fs.gz"
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
To load the miniroot using rsh to the server, you would use a
|
2002-06-30 16:57:29 +04:00
|
|
|
pair of commands similar to the above.
|
|
|
|
Here is another example:
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
.Dl ssh\*> Ic "run -b dd if=/dev/pipe of=/dev/rsd0b obs=8k"
|
2002-05-08 20:32:54 +04:00
|
|
|
.Dl ssh\*> Ic "run -o /dev/pipe rsh 192.233.20.195 zcat miniroot.fs.gz"
|
|
|
|
.Pp
|
|
|
|
Note that decompression on a sun2 is
|
|
|
|
.Em extremely
|
2002-06-30 16:57:29 +04:00
|
|
|
slow, be prepared to wait.
|
|
|
|
For this reason, expanding the miniroot
|
2002-05-08 20:32:54 +04:00
|
|
|
image on the NFS server is highly recommended.
|
|
|
|
.Pp
|
|
|
|
Once the miniroot has been copied using one of the above methods,
|
2002-06-30 16:57:29 +04:00
|
|
|
you reboot from that just installed miniroot.
|
|
|
|
See the section entitled
|
2002-05-08 20:32:54 +04:00
|
|
|
.Sx Booting the miniroot
|
|
|
|
for details.
|
2001-12-18 00:39:51 +03:00
|
|
|
.
|
|
|
|
.Ss2 Installing from SunOS
|
|
|
|
.
|
|
|
|
To install
|
|
|
|
.Nx*M
|
|
|
|
onto a machine already running
|
|
|
|
.Tn SunOS ,
|
|
|
|
you
|
2002-05-08 20:32:54 +04:00
|
|
|
will need the miniroot image (miniroot.fs.gz) and some means to
|
2001-12-18 00:39:51 +03:00
|
|
|
decompress it.
|
|
|
|
.Pp
|
|
|
|
First, boot
|
|
|
|
.Tn SunOS
|
|
|
|
and place the miniroot file onto the hard drive.
|
|
|
|
If you do not have
|
|
|
|
.Ic gzip
|
|
|
|
for
|
|
|
|
.Tn SunOS ,
|
|
|
|
you will need to decompress
|
|
|
|
the image elsewhere before you can use it.
|
|
|
|
.Pp
|
|
|
|
Next, bring
|
|
|
|
.Tn SunOS
|
|
|
|
down to single user mode to insure that nothing
|
2002-06-30 16:57:29 +04:00
|
|
|
will be using the swap space on your drive.
|
|
|
|
To be extra safe, reboot
|
2001-12-18 00:39:51 +03:00
|
|
|
the machine into single-user mode rather than using the
|
|
|
|
.Ic shutdown
|
|
|
|
command.
|
|
|
|
.Pp
|
|
|
|
Now copy the miniroot image onto your swap device (here
|
|
|
|
.Pa /dev/rsd0b )
|
|
|
|
with the command
|
|
|
|
.Pp
|
2002-05-08 20:32:54 +04:00
|
|
|
.Dl Ic "gzip -dc miniroot.fs.gz | dd of=/dev/rsd0b obs=32k"
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
or if you have already decompressed the miniroot
|
|
|
|
.Pp
|
2002-05-08 20:32:54 +04:00
|
|
|
.Dl Ic "dd if=miniroot.fs of=/dev/rsd0b obs=32k"
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
2002-05-08 20:32:54 +04:00
|
|
|
Finally, reboot the machine and instruct the PROM to boot from
|
2001-12-18 00:39:51 +03:00
|
|
|
the swap device as described in the next section.
|
|
|
|
.
|
|
|
|
.Ss2 Booting the Miniroot
|
|
|
|
.
|
2002-05-08 20:32:54 +04:00
|
|
|
If the machine is not already at the PROM monitor, run the
|
|
|
|
.Pa halt
|
|
|
|
command.
|
|
|
|
.Pp
|
2001-12-18 00:39:51 +03:00
|
|
|
If the miniroot was installed on partition
|
|
|
|
.Sq Li b
|
|
|
|
of the disk with
|
|
|
|
SCSI target ID=0 then the PROM boot command would be:
|
|
|
|
.Pp
|
|
|
|
.Dl \*> Ns Ic "b sd(0,0,1) -s"
|
|
|
|
.Pp
|
|
|
|
With SCSI target ID=2, the PROM is:
|
|
|
|
.Pp
|
|
|
|
.Dl \*> Ns Ic "b sd(0,10,1) -s"
|
|
|
|
.Pp
|
|
|
|
The numbers in parentheses above are:
|
|
|
|
.(enum -compact -offset indent
|
|
|
|
controller (usually zero)
|
|
|
|
.It
|
|
|
|
unit number (SCSI-ID * 8, in hexadecimal)
|
|
|
|
.It
|
|
|
|
partition number
|
|
|
|
.enum)
|
|
|
|
.
|
|
|
|
.Ss2 Miniroot install program
|
|
|
|
.
|
2002-06-30 16:57:29 +04:00
|
|
|
The miniroot's install program is very simple to use.
|
|
|
|
It will guide you through the entire process, and is well automated.
|
|
|
|
Additional improvements are planned for future releases.
|
2001-12-18 00:39:51 +03:00
|
|
|
.Pp
|
|
|
|
The miniroot's install program will:
|
|
|
|
.(bullet -offset indent
|
|
|
|
Allow you to place disklabels on additional disks.
|
|
|
|
The disk we are installing on should already have
|
|
|
|
been partitioned using the RAMDISK kernel.
|
|
|
|
.It
|
|
|
|
Create file systems on target partitions.
|
|
|
|
.It
|
|
|
|
Allow you to set up your system's network configuration.
|
|
|
|
Remember to specify host names without the domain name
|
2002-06-30 16:57:29 +04:00
|
|
|
appended to the end.
|
|
|
|
For example use
|
2001-12-18 00:39:51 +03:00
|
|
|
.Li foo
|
|
|
|
instead of
|
|
|
|
.Li foo.bar.org .
|
|
|
|
If, during the process of configuring
|
|
|
|
the network interfaces, you make a mistake, you will
|
|
|
|
be able to re-configure that interface by simply selecting
|
|
|
|
it for configuration again.
|
|
|
|
.It
|
2002-06-30 16:57:29 +04:00
|
|
|
Mount target file systems.
|
|
|
|
You will be given the opportunity
|
2001-12-18 00:39:51 +03:00
|
|
|
to manually edit the resulting
|
|
|
|
.Pa /etc/fstab .
|
|
|
|
.It
|
|
|
|
Extract binary sets from the media of your choice.
|
|
|
|
.It
|
|
|
|
Copy configuration information gathered during the
|
|
|
|
installation process to your root file system
|
|
|
|
.Pq Pa / .
|
|
|
|
.It
|
|
|
|
Make device nodes in your root file system under
|
|
|
|
.Pa /dev .
|
|
|
|
.It
|
|
|
|
Copy a new kernel onto your root partition
|
|
|
|
.Pq Pa / .
|
|
|
|
.It
|
|
|
|
Install a new boot block.
|
|
|
|
.It
|
|
|
|
Check your file systems for integrity.
|
|
|
|
.bullet)
|
|
|
|
.Pp
|
|
|
|
First-time installation on a system through a method other than the
|
|
|
|
installation program is possible, but strongly discouraged.
|