NetBSD/distrib/notes/pc532/install

229 lines
9.2 KiB
Plaintext

(IF you already have NetBSD/pc532 installed and you only want to update
your system, see the next section.)
To install NetBSD/pc532, there are several things you need to know.
First, NetBSD "autoconfigs" the scsi devices. netbsd.rd.x is expecting
up to two scsi disks and one scsi tape. Starting the search at SCSI address
0 and increasing, the first disk found will be sd0 regardless of the
address, the second will be sd1. All devices are assumed to be at lun of 0.
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.
a) 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 and one swap partition.
b) You should know how many total sectors are on your disk. The
configure will report a head, track, and cylinder count, but
I have found that on my disks, it reports something that makes
a smaller disk than I really had.
c) You may want to save some of your disk at the end of the disk for
raw monitor operations to save a copies of the netbsd.* and
the ram.root and other files. 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 at least two boots to
get things working from the disk.
d) util.tar.gz includes two text editors, /usr/bin/vi and
/usr/local/bin/mg. This should help both "vi users" and "emacs
users". (mg is actually mg2. If you want source for it
just ask phil@cs.wwu.edu.)
The Install Procedure:
a) Get netbsd.rd (uncompressed) and ram.root (uncompressed) into
memory (and on disk for "safe keeping")
- load ram.root at 0x200000
- load netbsd.rd at 0x2000
- run at 0x2020 (NOTE! NOT AT 0x2000)
b) Choose a disk geometry. For me, the reported geometry left
some sectors "unallocated". That is, the autoconfig message
said the disk had 834 cylinders, 3 heads, and 32 sectors/track.
This gives a total of 80064 sectors, but I knew that I had
82028 sectors.
To help in this process, there is a program "factors" that is
on the ram.root. The usage is "factors number" and it lists
pairs of numbers. (This in not the prime factors program "factor".)
For example, with the 82028 sector disk I got:
---->~/sd1
steelhead[3]$ factors 82028
2 41014 4 20507
Not many to choose from, so I tried ...
---->~/sd1
steelhead[4]$ factors 82026
2 41013 3 27342 6 13671 7 11718 9 9114 14 5859 18 4557 21 3906
27 3038 31 2646 42 1953 49 1674 54 1519 62 1323 63 1302 93 882
98 837 126 651 147 558 186 441 189 434 217 378 279 294 294 279
I then used factors to factor 11718 and ended up choosing ...
558 cylinders, 7 heads, and 21 sectors/track. I "lost" only two
sectors, but got a "resonable geometry".
c) run "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 NetBSD. It also
wants to know the size of your boot partition (to be used with
the auto-boot monitor), your root partition, your swap partition,
and then any other partitions you may want. For the "other"
partitions, it will ask for a mount point. The mount point will
be "relative to /" and should not include the leading "/". Also,
IF you do now want the partition to have newfs run on it (that is
it might be the last one and have a copy of ram.root and your
kernels) enter "NO" to the mount point and it will not run newfs
on the partition. It will enter the partition into the disklabel.
** Expect to see some errors about "no disklabel" and "can't write
rewrite disklabel" ... but it does work. (At least on my disk :)
d) look around, if you want ... and then halt NetBSD.
e) "finish the installation of a small root file system":
This is done by extracting files from util.tar.gz.
One way to do this is to boot netbsd.rd with the scsi disk as
the root and have util.tar.gz loaded in the ram disk. This
is done by:
- load util.tar.gz (compressed) at 0x200000 (to the ram disk)
- load netbsd.rd at 0x2000
- edit 0x2030 (byte) and put a 1 in that location
- run at 0x2020
- at the prompt, reply 1 or 2 (1 for /dev/sd0a root, 2 for /dev/sd1a
root.)
- This should now have the hard disk as root and your partitions
mounted as you requested. You should have a shell running in
single user mode. You now can extract util.tar.gz by the
following:
cd /
tar xzvpf /dev/rd
Include the "v" option only if you want it in verbose mode.
(You could also make sure that util.tar.gz is at the start of
a partition for which you specified "NO" for the mount point,
and you can extract it directly from that partition instead
of loading it to the ram disk.)
g) Now it is time to load all the other files of the distribution:
You can do this via --
a) a SLIP link
you have ifconfig, slattach, route, netstat, rcp,
hostname, domainname, and ftp on the mini-root.
There is also a copy of chat from ppp, which I
use to make my SLIP connections.
b) using kermit. (See the notes at the end of this file.)
c) some other method? (Let me know about it.)
g) Load a kernel for your system. Choose the proper netbsd.sdX.Y
that matches your hardware. Load it and rename it /netbsd.
h.a) If you are using the autoboot monitor, it is time to configure
your boot partition.
- /sbin/bim /dev/sdXc (X is 0 or 1, same as the X in g)
It will ask if you want to initialize your boot partition.
Answer yes and then put the UFS boot program in your
boot partition and make it the default by the commands:
add /boot boot
default 0
h.b) If you are NOT using the autoboot monitor, you must have a way
to load /netbsd to run the kernel.
i) reboot the machine. Using the autoboot monitor, all you should have
to do is give the ROM monitor command "boot". The secondary
UFS boot program eventually times out and auto-loads /netbsd.
You can get it to do it faster by hitting "return".
j) Load the tar.gz files. Choose a place to put them. I would make
a directory /gz.files and put them there. If you are "short
on space," you might want to load them and extract them one
at a time. A minimum installation is "base" and "etc". It
takes about 32 Megs installed + 15 Megs for the base.tar.gz.
k) Extract the tar files in /. For example, if your *.tar.gz were
in a directory /gz.files, to extract base.tar.gz you would:
- cd /
- tar -xpzf /gz.files/base.tar.gz --unlink
Add v to the flags if you want a verbose extract.
The --unlink is to make sure that the "ram.root" versions
of sh, init, ... are replaced by their full featured versons
in base.tar.gz. I think it is wise to include the --unlink
for other things.
l) Extract at least "base" and "etc" for a new installation. For
"update" extracts, don't extract "etc" directly unless you
have saved your current /etc tree. For "full" installations,
extract all files.
m) Edit the information in /etc
- hosts - host name and address information
- myname - your host name
- mygate - hostname of gateway (assuming you have one)
- resolv.conf - which nameserver to use
- hostname.{sl0,ppp0} - interface hostname
- netstart - configures the network and says if sendmail should
be started
- ttys - make sure the console entry has the correct speed
- gettytab - I find "ap" instead of "ep" in the default entry
works better for me.
- fstab - make sure it includes all partitions you want mounted
- localtime - this is usually a link into /usr/share/zoneinfo
n) Reboot the machine and it should come up in multi-user mode *IF*
you got it configured correctly.
m) Enjoy! And help fix bugs and improve NetBSD/pc532!
For those who choose to use kermit to help in getting NetBSD/pc532
installed:
The following is the Kermit copyright:
Copyright (C) 1985, 1994, Trustees of Columbia University in the
City of New York. The C-Kermit software may not be, in whole or
in part, licensed or sold for profit as a software product
itself, nor may it be included in or distributed with commercial
products or otherwise distributed by commercial concerns to their
clients or customers without written permission of the Office of
Kermit Development and Distribution, Columbia University. This
copyright notice must not be removed, altered, or obscured.
Due to this copyright, we can not include kermit with the standard
NetBSD/pc532 distribution.
The Office of Kermit Development and Distribution of Columbia
University in the City of New York has given permission for
us to distribute a NetBSD/pc532 binary. It is available primarily
for bootstrapping purposes and therefore is not a complete package,
lacking source code, various supporting text files, and the user
manual. Users who wish to use C-Kermit after the bootstrapping
process should obtain the full package, including the manual
"Using C-Kermit", from Columbia University.
The NetBSD/pc532 binary is available via ftp from
iceberg.cs.wwu.edu in the directory pub/NetBSD/pc532 as the file
kermitbin.tar.gz.