411 lines
11 KiB
Plaintext
411 lines
11 KiB
Plaintext
.\" $NetBSD: install,v 1.16 2001/06/11 01:50:50 wiz Exp $
|
|
.\"
|
|
.\" Copyright (c) 1999, 2000 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.
|
|
.\" 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.
|
|
.\"
|
|
.
|
|
(If you already have
|
|
.Nx*M
|
|
installed and you only want to update
|
|
your system, see the next section.)
|
|
.Pp
|
|
To install
|
|
.Nx*M ,
|
|
there are several things you need to know.
|
|
First,
|
|
.Nx
|
|
.Dq autoconfig 's
|
|
the SCSI devices.
|
|
.Pa floppy-144.fs
|
|
has only
|
|
support for disks configured into the kernel. Starting the search at
|
|
SCSI address 0, lun 0 and increasing, the first disk found will be
|
|
.Li sd0
|
|
regardless of the address, the second will be sd1.
|
|
.Tn KLONDIKE
|
|
for example has the following devices installed:
|
|
.Pp
|
|
.(tag "sd0xx" -offset indent -compact
|
|
.It Li sd0
|
|
ID 0 LUN 0: Quantum LP52S hard disk drive
|
|
.It Li sd1
|
|
ID 1 LUN 0: Micropolis 4110 hard disk drive
|
|
.It Li sd2
|
|
ID 2 LUN 0: Teac FC-1, 3.5" floppy disk drive
|
|
.It Li sd3
|
|
ID 2 LUN 1: Teac FC-1, 5.25" floppy disk drive
|
|
.It Li cd0
|
|
ID 3 LUN 0: Toshiba XM-4101TA CD-ROM drive
|
|
.It Li st0
|
|
ID 4 LUN 0: Tandberg TDC3600 QIC tape drive
|
|
.tag)
|
|
.Pp
|
|
Only
|
|
.Li sd0
|
|
-
|
|
.Li sd3
|
|
are supported by the
|
|
.Pa floppy-144.fs
|
|
kernel.
|
|
.Pp
|
|
Next you need to know what the install script wants to do. This install
|
|
is script on the ram disk root that can do most of the work of configuring
|
|
your disk.
|
|
.(enum
|
|
The script assumes your are using the first n sectors of your
|
|
disk, where you can specify n. It will allow you to create
|
|
up to 5 file system partitions, one swap partition and one
|
|
boot partition.
|
|
.It
|
|
You should know how many total sectors are on your disk. The
|
|
configure will report a head, track, and cylinder count, but
|
|
we have found that on some of our disks, it reports something that
|
|
makes a smaller disk than we really had.
|
|
.It
|
|
It is possible to have the install script make a partition
|
|
over your save area AND not make a new file system, thus
|
|
preserving what is there. Then, later you can make a new
|
|
file system after you no longer need the stuff there. You
|
|
will need to do only one boot to get things working from
|
|
the disk.
|
|
.enum)
|
|
.
|
|
.Ss2 The install procedure
|
|
.(enum
|
|
Adjust your console device settings.
|
|
The floppy-144.fs kernel will come up with 9600 baud, 7 bits,
|
|
even parity and one stop bit. Adjust your terminal to match
|
|
these settings. The monitor's baud rate can be changed with
|
|
.Ic "baud d'9600" .
|
|
.
|
|
.It
|
|
Get floppy-144.fs and boot the kernel from...
|
|
.
|
|
.(tag Serial\ line
|
|
.It Em Floppy
|
|
From Floppy: (and using the autoboot monitor)
|
|
If you have a 1.44 meg SCSI floppy drive, you can put floppy-144.fs
|
|
onto a 3.5" floppy disk. Insert the disk into your floppy
|
|
drive and use the monitor's boot command to boot the default
|
|
image from the floppy. The image booted will ask you for a
|
|
kernel to load. Answer
|
|
.Pp
|
|
.Dl Ic "sd" Ns Ar X Ns Ic "a:/netbsd"
|
|
.Pp
|
|
Replace
|
|
.Ar X
|
|
with your drive number. For KLONDIKE,
|
|
.Ar X
|
|
would be
|
|
.Ic 2 .
|
|
.
|
|
.It Em Tape
|
|
You will need to load a copy of
|
|
.Pa floppy-144.fs
|
|
into RAM.
|
|
.Pp
|
|
.(enum -offset indent -compact
|
|
load the
|
|
.Pa floppy-144.fs
|
|
at
|
|
.Li 0x260000
|
|
.It
|
|
run at
|
|
.Li 0x3BE020
|
|
.enum)
|
|
.Pp
|
|
The boot program will ask you now for a kernel to load. Answer
|
|
.Li md0a:/netbsd.gz
|
|
.
|
|
.It Em Serial Line
|
|
Provided with the distribution is source for program called
|
|
download
|
|
.Pq Pa download.c .
|
|
This program when used as
|
|
.Dq "download file"
|
|
will read the contents of the file and
|
|
output to standard output a byte sequence used by the \*M
|
|
ROM monitor to download a binary file into RAM. Using this
|
|
program on a computer connected to the \*M, one can
|
|
load a copy of
|
|
.Pa floppy-144.fs
|
|
into RAM at
|
|
.Li 0x260000 .
|
|
The boot sequence is now the same as with tape.
|
|
.tag)
|
|
.It
|
|
The
|
|
.Pa floppy-144.fs
|
|
will run the new
|
|
.Ic sysinst
|
|
utility as the standard
|
|
setup. It assumes a VT100 compatible terminal. If you don't want
|
|
to try using
|
|
.Ic sysinst
|
|
or you don't have a VT100, type f followed by
|
|
the return. Then following these instructions for installation.
|
|
If you want to use
|
|
.Ic sysinst ,
|
|
read the i386 INSTALL instructions to
|
|
learn about
|
|
.Ic sysinst .
|
|
.(Note
|
|
.Ic sysinst
|
|
does not support SLIP or PPP
|
|
connections.
|
|
.Note)
|
|
.It
|
|
Choose a disk geometry. For me, the reported geometry left
|
|
some sectors
|
|
.Sq "unallocated" .
|
|
That is, the autoconfig message
|
|
said the disk had 2428 cylinders, 9 heads, and 93 sectors/track.
|
|
This gives a total of 2032236 sectors, but we knew that we had
|
|
2053880 sectors.
|
|
.Pp
|
|
To help in this process, there is a program
|
|
.Ic factor
|
|
that is on the
|
|
.Pa floppy-144.fs .
|
|
The usage is
|
|
.Ic "factor number"
|
|
and it lists the prime factors of number.
|
|
For example, with the 2053880 sector disk we got:
|
|
.Pp
|
|
.Dl $ Ic "factor 2053880"
|
|
.Dl 2053880: 2 2 2 5 51347
|
|
.Pp
|
|
Not many to choose from, so we tried ...
|
|
.Pp
|
|
.Dl $ Ic "factor 2053820"
|
|
.Dl 2053820: 2 2 5 103 997
|
|
.Pp
|
|
Now we'd like to get about a megabyte per track:
|
|
.Pp
|
|
.Dl $ Ic "echo \&"2 * 997\&"|bc"
|
|
.Dl 1994
|
|
.Pp
|
|
Now we need the number of tracks (or cylinders):
|
|
.Pp
|
|
.Dl $ Ic "echo \&"2 * 5 * 103\&"|bc"
|
|
.Dl 1030
|
|
.Pp
|
|
So we ended up choosing 1030 cylinders, 1 head, 1994 sectors/track.
|
|
We
|
|
.Dq lost
|
|
only 60 sectors, but got a
|
|
.Dq reasonable
|
|
geometry.
|
|
.It
|
|
Run
|
|
.Ic install ;
|
|
it will ask you for the disk geometry and other
|
|
questions. It will ask you for the geometry and then ask you
|
|
how many of those sectors you want to use for
|
|
.Nx .
|
|
It also
|
|
wants to know the size of your boot partition (to be used with
|
|
the auto-boot monitor), your root partition
|
|
.Pq Pa / ,
|
|
your swap partition,
|
|
and then any other partitions you may want. For the
|
|
.Sq other
|
|
partitions, it will ask for a mount point. The mount point will
|
|
be
|
|
.Dq "relative to /"
|
|
and should not include the leading
|
|
.Sq / .
|
|
Also, if you do not want the partition to have newfs run on it (that is
|
|
it might be the last one and have a copy of
|
|
.Pa floppy-144.fs )
|
|
enter
|
|
.Sq Ic NO
|
|
to the mount point and it will not run
|
|
.Ic newfs
|
|
on the partition.
|
|
It will enter the partition into the disklabel.
|
|
.It
|
|
look around, if you want ... and then halt
|
|
.Nx .
|
|
.It
|
|
reboot the machine. Using the autoboot monitor, all you should have
|
|
to do is give the ROM monitor command
|
|
.Ic boot .
|
|
The secondary
|
|
UFS boot program eventually times out and auto-loads
|
|
.Pa /netbsd .
|
|
You can get it to do it faster by pressing return.
|
|
.Pp
|
|
If you are not using the autoboot monitor, you will have to
|
|
figure out the starting sector of the boot images partition
|
|
and manually load the
|
|
.Nx
|
|
boot loader from the disk using
|
|
the
|
|
.Ic read
|
|
command. If you would rather use the autoboot monitor
|
|
you can get source and ROM images from the URL
|
|
.Lk ftp://ftp.cs.wwu.edu/pub/\*M/mon.auto.tar.gz
|
|
.It
|
|
Now it is time to load all the other files of the distribution:
|
|
You can do this via -
|
|
.(bullet
|
|
a TCP/IP link (slip, ppp or plip)
|
|
you have ifconfig, slattach, route, netstat,
|
|
hostname and ftp on the mini-root. You can even
|
|
use nfs...
|
|
Plip is only an option if you have installed a
|
|
centronics port in your \*M.
|
|
You do have access to vi to edit your network
|
|
files.
|
|
.Pq Pa /etc/resolv.conf , ...
|
|
.It
|
|
floppy disk
|
|
.It
|
|
tape
|
|
.It
|
|
cd-rom (If you have a CD with
|
|
.Nx*M ,
|
|
which most likely
|
|
won't happen for a while after \*V release.)
|
|
.Pp
|
|
.Dl Ic "mount -rt cd9660 /dev/cd0a /mnt"
|
|
.Pp
|
|
Get the .tgz files from the cd-rom
|
|
.It
|
|
Use the ROM compatible
|
|
.Ic download
|
|
program. The program
|
|
download is included in the initial installation and
|
|
can be used as the receive end of the download by
|
|
using it as
|
|
.Ic "download -r file_to_write" .
|
|
If the CRC is correct, the file is retained. If the CRC is not
|
|
correct, the file is deleted.
|
|
.bullet)
|
|
.It
|
|
Load the .tgz files. Choose a place to put them. We suggest making
|
|
a directory
|
|
.Pa /gz.files
|
|
and put them there. If you are
|
|
.Dq short on space,
|
|
you might want to load them and extract them one
|
|
at a time. A minimum installation is
|
|
.Sy base
|
|
and
|
|
.Sy etc .
|
|
It takes about 32 Megs installed + 20 Megs for the
|
|
.Pa base.tgz .
|
|
.It
|
|
Extract the tar files in
|
|
.Pa / .
|
|
For example, if your
|
|
.Pa *.tgz
|
|
files were in a directory
|
|
.Pa /gz.files ,
|
|
to extract
|
|
.Pa base.tgz
|
|
you would:
|
|
.Pp
|
|
.Dl Ic "cd /"
|
|
.Dl Ic "tar --unlink -zxpf /gz.files/base.tgz"
|
|
.Pp
|
|
Add v to the flags if you want a verbose extract.
|
|
The
|
|
.Ic --unlink
|
|
is to make sure that the install versions
|
|
of sh, init, ... are replaced by their proper versons
|
|
in base.tgz. We think it is wise to include the
|
|
.Ic --unlink
|
|
for other things.
|
|
.It
|
|
Extract at least
|
|
.Sy base ,
|
|
.Sy etc
|
|
and
|
|
.Sy kern
|
|
for a new installation.
|
|
For
|
|
.Dq update
|
|
extracts, move
|
|
.Pa /etc
|
|
to
|
|
.Pa /etc.old
|
|
and then extract
|
|
.Sy etc .
|
|
You should extract
|
|
.Sy etc
|
|
for upgrades. For
|
|
.Dq full
|
|
installations, extract all files.
|
|
.It
|
|
Edit the information in
|
|
.Pa /etc
|
|
.(tag resolv.conf
|
|
.It Pa rc.conf
|
|
Many things can be configured here
|
|
.It Pa hosts
|
|
host name and address information
|
|
.It Pa resolv.conf
|
|
which nameserver to use
|
|
.It Pa ttys
|
|
make sure the console entry has the correct speed
|
|
.It Pa gettytab
|
|
You may find that
|
|
.Dq ap
|
|
instead of
|
|
.Dq ep
|
|
in the default entry works better for you.
|
|
.It Pa fstab
|
|
make sure it includes all partitions you want mounted
|
|
.tag)
|
|
.Pp
|
|
Now you can adjust the kernel's default baud rate to match your
|
|
monitor's default baud rate. Do the following:
|
|
.Pp
|
|
.Dl # Ic "gdb -w /netbsd"
|
|
.Dl (gdb) Ic "set scndefaultrate = " Em your_baud_rate
|
|
.Dl (gdb) Ic quit
|
|
.Pp
|
|
where
|
|
.Ar your_baud_rate No is the actual value, 19200, 38400 or
|
|
something slower than 9600.
|
|
If you set scndefaultrate to something bogus, you'll probably
|
|
not be able to reboot... So be carefull!
|
|
.It
|
|
Reboot the machine and it should come up in multi-user mode
|
|
.Em if
|
|
you got it configured correctly.
|
|
.It
|
|
Enjoy! And help fix bugs and improve
|
|
.Nx*M !
|
|
.enum)
|