347 lines
13 KiB
Plaintext
347 lines
13 KiB
Plaintext
|
|
||
|
0. Introduction
|
||
|
|
||
|
This is the first release of NetBSD/alpha, and the installation
|
||
|
program is still rather primitive. It also hasn't been tested
|
||
|
very well, so there may be bugs in it. However, if you have
|
||
|
problems, don't despair; most problems you might encounter are
|
||
|
very easy to fix. We suggest you join the port-alpha list (see
|
||
|
the section on mailing lists on www.netbsd.org) and ask questions
|
||
|
there. Also report problem you've gotten around there or by using
|
||
|
send-pr so that they can be fixed for the next release.
|
||
|
|
||
|
1. General
|
||
|
|
||
|
The following is a walk-through of the steps you will take
|
||
|
while getting NetBSD installed on your hard disk. It's divided
|
||
|
into three basic components: booting NetBSD (section 2 below),
|
||
|
preparing the disk (section 3 below), and loading the operating
|
||
|
system files onto the disk (section 4 below).
|
||
|
|
||
|
2. Booting NetBSD
|
||
|
|
||
|
You have two choices of how to boot your machine. If you have a
|
||
|
floppy drive, you may boot from that. This is probably the simplest
|
||
|
way of getting started. If you don't have a floppy drive, you will
|
||
|
need to set yourself up for a boot from a file server on the
|
||
|
network, which is a little more complex.
|
||
|
|
||
|
2.1 Making and Booting a Floppy
|
||
|
|
||
|
The 3.5", 1.44 MB boot floppy image is found under the
|
||
|
NetBSD/alpha _VER distribution directory in the file
|
||
|
alpha/installation/floppy/floppy-144. You need to take this disk
|
||
|
image and put it on a floppy disk.
|
||
|
|
||
|
If you have a Unix system handy, you can do this with a command
|
||
|
like the following:
|
||
|
|
||
|
dd if=floppy-144 of=/dev/rfd0a
|
||
|
|
||
|
If the Unix system you are using is not a NetBSD system, you will
|
||
|
probably need to replace `/dev/rfd0a' with the name of the floppy
|
||
|
device on your particular system.
|
||
|
|
||
|
If you have an MS-DOS or Windows system available, you can use the
|
||
|
`rawrite.exe' utility to transfer the image to a floppy disk. This
|
||
|
utility is provided with the NetBSD/i386 install tools, under
|
||
|
i386/installation/misc; a documentation file, `rawrite.doc' is
|
||
|
available there as well.
|
||
|
|
||
|
Once the floppy has been made, you simply need to put it in the
|
||
|
drive and type
|
||
|
|
||
|
boot dva0
|
||
|
|
||
|
Now you may skip to section 3.
|
||
|
|
||
|
2.2 Booting over the Network
|
||
|
|
||
|
Booting NetBSD/alpha _VER over a network requires a BOOTP server,
|
||
|
a TFTP server and an NFS server. (These are usually all run on
|
||
|
the same machine.) There are three basic stages to the boot:
|
||
|
|
||
|
1.The Alpha console software sends a BOOTP request to get its own
|
||
|
address, the address of the TFTP server and the file to
|
||
|
download. It downloads this file, which is the second stage
|
||
|
bootstrap, via TFTP and then executes it.
|
||
|
|
||
|
2.The second stage bootstrap uses further information in the BOOTP
|
||
|
packet that the console received to find the NFS server and path
|
||
|
and retreive the kernel (the file /netbsd). After loading the
|
||
|
kernel into memory, it executes it.
|
||
|
|
||
|
3.The kernel probes and configures the devices, and then sends
|
||
|
out another BOOTP request so it can find out its address, the NFS
|
||
|
server, and path. (The kernel probably should get this information
|
||
|
from the console, but it currently doesn't.) It then mounts its
|
||
|
root via NFS and continues.
|
||
|
|
||
|
2.2.1 Setting Up the Server
|
||
|
|
||
|
You will need to set up your server to serve BOOTP, TFTP and NFS.
|
||
|
|
||
|
The NFS setup is quite simple. If you want to run a full system
|
||
|
from the network, untar the NetBSD snapshot or distribution into
|
||
|
a directory on your server and NFS export that directory to the
|
||
|
client. (Make sure you put a kernel there as well.)
|
||
|
|
||
|
You'll want to map root to `root' (rather than the default
|
||
|
`nobody') when you export your root filesystem. A typical
|
||
|
/etc/exports line on a NetBSD system would be:
|
||
|
|
||
|
/usr/export/alpha -maproot=0 myclient.mydom.com
|
||
|
|
||
|
If you just want to get the install kernel loaded so that you
|
||
|
can download sets to the local hard drive of that machine, you
|
||
|
need nothing other than the install kernel in the NFS root
|
||
|
directory on your server.
|
||
|
|
||
|
For the TFTP setup, you need to copy the second stage bootstrap,
|
||
|
netboot, into an appropriately named file (I use boot.netbsd.alpha)
|
||
|
in the directory used by your TFTP server. If you extracted a full
|
||
|
snapshot, you can get the netboot program from /usr/mdec/netboot;
|
||
|
if not, you can get this from the installation/netboot directory
|
||
|
where you found the alpha distribution.
|
||
|
|
||
|
For the BOOTP server you need to specify the:
|
||
|
|
||
|
hardware type (Ethernet)
|
||
|
hardware address (Ethernet MAC address)
|
||
|
IP address of the client
|
||
|
subnet mask of the client
|
||
|
address of of the TFTP/NFS server
|
||
|
name of the second stage bootstrap loaded via TFTP
|
||
|
path to the root for the client (mounted via NFS)
|
||
|
|
||
|
Here's an example for a Unix system running bootpd:
|
||
|
|
||
|
myhost.mydom.com:\
|
||
|
:ht=ethernet:ha=0000c0391ae4:\
|
||
|
:ip=192.168.1.2:sm=255.255.255.0:\
|
||
|
:sa=192.168.1.1:bf=boot.netbsd.alpha:rp=/usr/export/alpha:
|
||
|
|
||
|
2.2.2 The Alpha Console
|
||
|
|
||
|
The only Ethernet device the console on most Alpha systems knows
|
||
|
how to boot from is the onboard Ethernet interface or a DEC Tulip
|
||
|
(21040, 21041, 21140) based PCI Ethernet card. I've tested an
|
||
|
older SMC 100 Mbps card that uses this chip and it works fine.
|
||
|
Many older systems will not be able to use the newer 2.0 stepping
|
||
|
of the 21140, however. If your system appears not to be receiving
|
||
|
packets, this may be the problem.
|
||
|
|
||
|
Once you're set up, you should be able to boot with:
|
||
|
|
||
|
boot ewa0
|
||
|
|
||
|
3. Preparing the Disk
|
||
|
|
||
|
If you're going to be running a diskless machine, the steps so
|
||
|
far have prepared you to run, and you can skip to section 5
|
||
|
("Configuration") below.
|
||
|
|
||
|
If you are going to run NetBSD from a local hard drive, however,
|
||
|
this hard drive needs to be prepared. This preparation consists
|
||
|
of putting a label on the disk, which includes information on
|
||
|
the sizes and placement of the partition into which the disk
|
||
|
is divided, putting the boot blocks on the disk, and initialising
|
||
|
the filesystems on the partitions. This work is done by the
|
||
|
`install' script from the boot floppy (or boot kernel, if you
|
||
|
booted it via NFS with the INSTALL kernel).
|
||
|
|
||
|
3.1 Running Install
|
||
|
|
||
|
When you first boot the INSTALL kernel you will be given the
|
||
|
options of `install' or `shell'. Choose `install' and the
|
||
|
install script will start.
|
||
|
|
||
|
If, at any time, you have made a mistake in the install script
|
||
|
and want to abort, press ^C. This will take you to a shell
|
||
|
prompt. You can then restart the install script by typing
|
||
|
`/install', or halt the machine by typing `halt'.
|
||
|
|
||
|
3.1 Answering the Install Questions
|
||
|
|
||
|
These will for the most part be fairly obvious. You may install
|
||
|
on either a SCSI or an IDE disk, and you will be prompted for
|
||
|
the disk to install on. The disks in your system will be numbered
|
||
|
starting at xd0 (where x is an `s' for SCSI disks, `w' for IDE
|
||
|
disks) based on the SCSI ID or IDE drive order; if you have
|
||
|
more than one disk, watch the boot messages carefully to see
|
||
|
which ones are probed as which numbers.
|
||
|
|
||
|
Once you've selected a disk to install on, you'll be prompted
|
||
|
for the geometry. This is also displayed in the boot messages,
|
||
|
and you'll be given a chance to review the boot messages again
|
||
|
to get the exact figures for the number of cylinders, heads
|
||
|
and sectors.
|
||
|
|
||
|
After this you must specify the size of your partitions.
|
||
|
Generally you'll be giving the sizes in cylinders; the install
|
||
|
program will tell you how many bytes there are in each cylinder.
|
||
|
|
||
|
The swap partition is the second thing you specify, after the
|
||
|
root partition. Regardless of the size of your disk, you'll
|
||
|
want to specify a swap partition that's at least as large as
|
||
|
the amount of RAM you have, and probably not less than 64 MB
|
||
|
in any case.
|
||
|
|
||
|
If you have a small disk (under 500 MB), it's probably best to
|
||
|
devote all of the disk (excepting 64 MB or more for the swap)
|
||
|
to the root partition.
|
||
|
|
||
|
If you have more space, we recommend devoting at least 32 MB,
|
||
|
and preferably 48 MB, to the root partition. /usr will need
|
||
|
150 MB or so if you're not installing X, 200 MB or so if you
|
||
|
are.
|
||
|
|
||
|
Once you've specified this information, the install script will
|
||
|
write the disklabel, install boot blocks to make the disk
|
||
|
bootable, initialise the filesystems, and mount them all under
|
||
|
/mnt. You're now ready to go on to the next step.
|
||
|
|
||
|
4. Installing NetBSD
|
||
|
|
||
|
To install NetBSD you'll have to get access to the tar files
|
||
|
that contain the operating system, and extract them to your
|
||
|
disk. You can get access to the tar files through either a
|
||
|
network or from a CD-ROM.
|
||
|
|
||
|
4.1 Preparing to Install from a CD-ROM
|
||
|
|
||
|
All you need to do is mount the CD-ROM, which will generally
|
||
|
be device cd0. (The initial boot messages will tell you what
|
||
|
the CD-ROM drive as probed as.) This would be done with:
|
||
|
|
||
|
mount -r -t cd9660 /dev/cd0a /mnt2
|
||
|
|
||
|
4.2 Preparing to Install from the Network
|
||
|
|
||
|
The first thing you need to do is configure the loopback network
|
||
|
interface, which is done with the command
|
||
|
|
||
|
ifconfig lo0 127.0.0.1
|
||
|
|
||
|
Then you will have to configure your Ethernet card. The command
|
||
|
|
||
|
ifconfig -l
|
||
|
|
||
|
will give you a list of the network interfaces on your system.
|
||
|
It will show you your ethernet cards first, followed by lo0
|
||
|
(the loopback interface that we configured above), ppp0 (the
|
||
|
PPP interface) and sl0 (the SLIP interface).
|
||
|
|
||
|
To configure your ethernet card, type
|
||
|
|
||
|
ifconfig <if> inet <addr> [netmask <netmask>] [media <media>]
|
||
|
|
||
|
Where <if> is the network card (interface), <addr> is the IP
|
||
|
address, the optional <netmask> parameter is the network mask,
|
||
|
and the optional <media> parameter is one of:
|
||
|
|
||
|
10base2 BNC connector, 10 Mbps
|
||
|
AUI AUI connector, 10 Mbps
|
||
|
10baseT Twisted pair connector, 10 Mbps
|
||
|
100baseTX Twisted pair connector, 100 Mbps
|
||
|
100baseFX Fibre-optic connector, 100 Mbps
|
||
|
100baseT4 T4 twisted pair interface, 100 Mbps
|
||
|
|
||
|
If the host you are getting the data files from is not on the
|
||
|
local network, you will also have to configure a gateway into
|
||
|
your system. Do this with
|
||
|
|
||
|
route add default <gateway-IP-address>
|
||
|
|
||
|
If you will need name services you can set up a /etc/resolv.conf
|
||
|
file for those with a `nameserver <ip-address>' line in it, e.g.:
|
||
|
|
||
|
echo "nameserver 198.41.0.4" >>/etc/resolv.conf
|
||
|
|
||
|
Once networking has been configured, you may mount the directory
|
||
|
with the install files via NFS, or download them via FTP.
|
||
|
|
||
|
To mount them via nfs, type
|
||
|
|
||
|
mount -t nfs <hostname:/path/to/nfs/volume> /mnt2
|
||
|
|
||
|
If this volume has been exported read-only, you may need the
|
||
|
`-r' option to mount.
|
||
|
|
||
|
To download the install sets with ftp, create a directory in
|
||
|
which to put them and then use the ftp client to download them.
|
||
|
A typical session might be:
|
||
|
|
||
|
mkdir /mnt/var/tmp
|
||
|
cd /mnt/var/tmp
|
||
|
ftp ftp.netbsd.org
|
||
|
[all the following commmands are given to the ftp program
|
||
|
after logging in]
|
||
|
prompt
|
||
|
cd /pub/NetBSD/NetBSD-1.3/alpha/binary/sets
|
||
|
mget *
|
||
|
cd /pub/NetBSD/NetBSD-1.3/alpha/binary/kernel
|
||
|
get netbsd-GENERIC.gz
|
||
|
cd /pub/NetBSD/NetBSD-1.3/alpha/binary/toolchain
|
||
|
get netbsd-GENERIC.gz
|
||
|
bye
|
||
|
|
||
|
Feel free, of course, to leave off the sets that you don't need
|
||
|
if you don't install everything.
|
||
|
|
||
|
You are now ready to proceed to step 4.3.
|
||
|
|
||
|
4.3 Extracting the Operating System Files
|
||
|
|
||
|
This is quite simple. Change to the root directory of your hard
|
||
|
drive (which is /mnt if you've used the standard install script
|
||
|
to this point) by typing
|
||
|
|
||
|
cd /mnt
|
||
|
|
||
|
Then extract the kernel with:
|
||
|
|
||
|
zcat /mnt/var/tmp/netbsd-GENERIC.gz >/mnt/netbsd
|
||
|
|
||
|
For this and the following commands, replace `/mnt/var/tmp/'
|
||
|
with the path to your NFS volume or CD-ROM if that's how you
|
||
|
chose to access your install files instead.
|
||
|
|
||
|
The sets are extracted with
|
||
|
|
||
|
for file in base comp etc games man misc text; do
|
||
|
tar --unlink -t -z -f /mnt/var/tmp/$file;
|
||
|
done
|
||
|
|
||
|
and the toolchain with
|
||
|
|
||
|
tar --unlink -t -z -f /mnt/var/tmp/toolchain.tar.gz
|
||
|
|
||
|
You will now be ready to reboot from your hard disk. Type `sync'
|
||
|
twice to make sure all the data is written out to disk and then
|
||
|
type `halt' to halt your system and go back to the monitor. At
|
||
|
this point you should be able to reboot your system with
|
||
|
|
||
|
boot dka0
|
||
|
|
||
|
(or `boot dka100' if your disk drive is on ID 1, etc.). Your
|
||
|
system will come up in single-user mode, ready for you to
|
||
|
configure it.
|
||
|
|
||
|
5. Configuring NetBSD
|
||
|
|
||
|
Configuring your NetBSD system requires editing the /etc/rc.conf
|
||
|
file. Most of this file is fairly self-explanatory, but you
|
||
|
can `man rc.conf' for further explanations. Remember to set
|
||
|
`rc_configured' to YES so you will boot multi-user, set `hostname'
|
||
|
and possibly `defaultroute', and add an ifconfig_int for your
|
||
|
interface <int>, along the lines of
|
||
|
|
||
|
ifconfig_de0="inet myname.my.dom 123.45.67.89 netmask 255.255.255.0"
|
||
|
|
||
|
You will also want either to run named or add an /etc/resolv.conf
|
||
|
file (`man resolv.conf' for information on this), use `vipw' to add
|
||
|
accounts to your system, edit /etc/aliases to forward root mail to
|
||
|
the right place (run `newaliases' afterwards) and edit /etc/rc.local
|
||
|
to run any local daemons you use.
|