NetBSD/distrib/notes/alpha/install

693 lines
20 KiB
Plaintext

.\" $NetBSD: install,v 1.16 1999/04/19 23:38:38 ross Exp $
.\"
.\" Copyright (c) 1999 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.
.\"
.Pp
Installation of NetBSD/alpha is now easier than ever!
For the latest news, problem reports, and discussion, join
the port-alpha mainlist by mailing a line saying
.Dl subscribe port-alpha
to
.Mt majordomo@netsbd.org .
Also, see
.Lk http://www.netbsd.org
for more information.
.Pp
If you encounter any problems, please report them via the mailing list or the
.Xr send-pr 1
program so that they can be fixed for the next release.
.Pp
To install or upgrade NetBSD, 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 NetBSD kernel plus
an in-memory file system of utility programs.
.Pp
The usual procedure is to write the installation system to a floppy
disk set and then boot from the floppies, however, there
are now six ways to boot the NetBSD/alpha installation system! Each approach
loads the exact same installation bits.
The six paths are:
.Pp
.
.Bl -enum -compact -offset indent
.It
Floppy disk boot
.It
CD boot
.It
Hard Drive Boot
.It
Magnetic Tape Boot
.It
Existing Root FS Boot
.It
Network boot
.El
.
.Pp
In all cases, you need to transfer a
bootable image of the installation system
from the NetBSD CD or from an ftp site to the chosen media type.
Although booting from floppy is the usual path, the
hard drive boot is useful if you have another operating system (and a spare
drive) already installed, or if you don't mind swapping hard drives from
box to box. CD and tape boots are nice and fast if you have a CD writer
or a tape format in common with another previously installed Unix-like
system. Finally, most versions of SRM can locate the NetBSD boot program
.Ic netboot
via bootp and download it via tftp,
.Ic netboot
then mounts the root file system via NFS and loads the kernel.
.
.
.Bl -enum -compact
.Pp
.It
Floppy disk boot
.Pp
The 3.5", 1.44 MB boot floppy set is found under the
NetBSD/alpha \*V distribution directory in
.Pa alpha/installation/floppy/
as two files called
.Pa disk1of2
and
.Pa disk2of2 .
You need to put these two disk images on two floppy disks.
.Pp
If you have a Unix system handy, you can do this with commands
like the following:
.Bd -literal -offset indent
dd if=disk1of2 of=/dev/rfd0a bs=18k
dd if=disk2of2 of=/dev/rfd0a bs=18k
.Ed
.Pp
If the Unix system you are using is not a NetBSD system, you will
probably need to replace
.Li /dev/rfd0a
with the name of the floppy device on your particular system.
.Pp
If you have an MS-DOS or Windows system available, you can use
the
.Ic rawrite.exe
utility to transfer the image to a floppy
disk. This utility is provided with the NetBSD/i386 install
tools, under
.Pa i386/installation/misc ;
a documentation file,
.Ic rawrite.doc
is available there as well.
.Pp
Once the floppy has been made, you simply need to put it in the
drive and type
.Dl \*>\*>\*> B DVA0
.Pp
.It
CD boot
.It
Hard Drive boot
.It
Magnetic Tape Boot
.Pp
All three of these media types use the same initial image:
.Dl \&.../installation/diskimage/cdhdtape
The image can be written to a hard drive partition with a command
like:
.Dl "dd if=cdhdtape bs=16k of=/dev/rsd0c"
To boot from a magnetic tape device such as
.Tn DAT
or
.Tn DLT ,
it is important
to create the tape image with 512-byte records. Use a command like:
.Dl "dd if=cdhdtape bs=512 of=/dev/rst0"
If the host system is not NetBSD, the names of the destination devices
are likely to be different. Be sure to use a
.Dq "raw partition"
device that doesn't skip over labels!
.Pp
The use of CD-R devices varies greatly depending on the host OS
and host software; it isn't possible to give typical instructions here.
.Pp
.It
Existing Root FS Boot
.Pp
The installation subdirectory
.Pa instkernel/
contains
.Pa netbsd.gz ;
this is the same install kernel but without a bootable filesystem
image wrapped around it. You can perform an complete reinstall
by beginning it as an upgrade, and booting this kernel in the
normal way off the root file system of a previous installation.
.Pp
The gzipped image can be booted directly; it is not necessary to
uncompress it first.
.Pp
.It
Network Boot
.Pp
Booting NetBSD/alpha \*V over a network requires a BOOTP or
DHCP 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:
.Pp
.
.
.Bl -bullet
.It
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.
.It
The secondary boot program resends the BOOTP request, this
time also locating the NFS server and root path. It mounts the
root path via NFS and reads in and transfers to the kernel:
.Pa /netbsd .
.It
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. It then mounts its root via NFS and continues.
.El
.
.
.Pp
You will need to set up servers for BOOTP, TFTP and NFS.
.Pp
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, and
create the device nodes in
.Pa /dev
with
.Ic sh ./MAKEDEV all .
Detailed instructions on netbooting can be found by visiting the
.Nx
Alpha platform page:
.Pp
\~\~\~\~\~
.Lk http://www.NetBSD.org/Ports/alpha
.Pp
At the time of this
release, the URL for the netbooting instructions is:
.Pp
\~\~\~\~\~
.Lk http://www.netbsd.org/Ports/alpha/netboot.html
.Pp
You'll want to map root to
.Li root
(rather than the default
.Li nobody )
when you export your root filesystem. A typical
.Pa /etc/exports
line on a NetBSD system would be:
.Dl /usr/export/alpha -maproot=0 myclient.mydom.com
.Pp
One option is to load just the install kernel over the network but then
proceed to a normal disk-based install and disk-based operation.
(Perhaps the Alpha doesn't have a floppy drive, or you just don't
want to use a Micro$oft Window$ system to make the floppy; we
understand.)
.Pp
For this case, you still need to export an NFS root, but
the only thing it needs to have in it is the
.Li instkernel
image from the distribution.
.Pp
The gzipped image can be booted directly; it is not necessary to
uncompress it first.
.Pp
The console will be using TFTP to load the NetBSD boot program,
so for the TFTP setup, you need to copy the second stage bootstrap,
.Ic netboot ,
into an appropriately named file such as
.Li boot.netbsd.alpha
in the directory used by your TFTP server. If you extracted a full
snapshot, you can get the netboot program from
.Pa /usr/mdec/netboot ;
if not, you can get this from the
.Pa installation/netboot
directory where you found the alpha distribution.
.Pp
For the BOOTP server you need to specify the:
.Pp
.
.Bl -bullet -compact
.It
hardware type (Ethernet)
.It
hardware address (Ethernet MAC address)
.It
IP address of the client
.It
subnet mask of the client
.It
address of of the TFTP/NFS server
.It
name of the second stage bootstrap loaded via TFTP
.It
path to the root for the client (mounted via NFS)
.El
.
.Pp
Here's an example for a Unix system running bootpd:
.Bd -literal -offset indent
myhost.mydom.com:\
:ht=ethernet:ha=0000c0391ae4:\e
:ip=192.168.1.2:sm=255.255.255.0:\e
:sa=192.168.1.1:bf=boot.netbsd.alpha:rp=/usr/export/alpha:
.Ed
And here's an example for a Unix system running the ISC dhcpd:
.Bd -literal -offset indent
host axp {
hardware ethernet 0:0:c0:39:1a:e4;
fixed-address 192.168.1.2;
option host-name "myhost.mydom.com";
filename "boot.netbsd.alpha";
option root-path "/usr/export/alpha";
option domain-name-servers 192.168.1.1;
option broadcast-address 255.255.255.0;
option domain-name "my.domain";
}
.Ed
.Pp
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) PCI Ethernet card. Some
older SMC 100 Mbps cards that use this chip have been known to
work as well. 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. (You may
or may not be able to update your firmware to fix this; see
the alpha port pages on www.netbsd.org for more information on
this.) In general, 10 Mb cards from manufacturers other than
.Tn DEC
will work, and 100 Mb cards not from
.Tn DEC
will not.
.Pp
Once you're set up, you should be able to boot with:
.Dl "\*>\*>\*> boot -proto bootp ewa0"
.Pp
You should permanently set your protocol to
.Tn BOOTP
with:
.Dl "\*>\*>\*> set ewa0_protocols bootp"
.Pp
The 3000 series of Turbochannel systems and certain other models use
.Em old SRM ,
do not have a
.Fl Ic proto
option and use different device names. They also tend to not netboot very
well so you probably don't need to worry about this section. However, if you
want to give it a try, note the following differences:
.Bl -bullet -offset indent
.It
There is no
.Fl Ar proto
argument, or
.Ic ewa0_protocols
variable. Old SRM uses bootp if the device name is given as
.Sy ez0 .
.It
The use of the
.Xr setnetbootinfo 8
program will probably also be necessary, as it is unlikely that an SRM
from that era will properly communicate the ethernet HW address to the
boot program.
.It
Example:
.Dl \*>\*>\*>\ boot\ ez0
.El
.El
.
.
.Pp
.so ../common/sysinst
.
.Ss2 "Manual and Script-Assisted Installation"
.
All of the installation procedures consist of
putting a label on the disk to provide information on
the sizes and placement of the partitions into which the disk
is divided, putting the boot blocks on the disk, creating the
filesystems on the partitions, and unpacking the distribution
tar archives.
.
.
.Bl -enum
.It
Disk prep: label, boot block, and file system setup
.
.
.Bl -tag -width 3n
.It A.
Manual Install from the Shell Prompt
.Pp
The normal installation involves running the install shell script
and interactively configuring the file systems, and then simply
unpacking the tar files into these followed by running MAKEDEV.
.Pp
However, as stated above it is also possible to do the installation yourself
from the shell, and in any case it is helpful to understand
what the install script does. The procedure is:
.Pp
.
.
.Bl -bullet -compact
.It
create
.Pa /etc/disktab ,
see
.Xr disktab 5
.It
run
.Xr disklabel 8 ,
.It
run
.Xr newfs 8
.It
.Xr mount 8
the new root on
.Pa /mnt
.It
cd to
.Pa /usr/mdec
and run
.Xr installboot 8
.El
.
.
.Pp
If you are reviewing man pages on NetBSD platforms other than
alpha, be sure that when reading
.Xr installboot 8
you read the alpha
version by typing: "man 8 alpha/installboot".
.Pp
At this point you need only unpack the distribution sets by running
.Xr tar 1
as described below.
.It B.
.Li /install
and
.Li /upgrade
traditional installation scripts
.Pp
The
.Li install
and
.Li upgrade
scripts are still there, so by exiting the sysinst program you can type
.Li install
or
.Li upgrade
at the shell prompt and run them as you did in the good old days.
.Pp
You may install
on either a SCSI or an IDE disk; 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.
.Pp
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.
.Pp
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.
.Pp
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.
.Pp
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.
.Pp
If you have more space, we recommend devoting at least 32 MB,
and preferably 48 MB, to the root partition.
.Pa /usr
will need 150 MB or so if you're not installing X, 200 MB or so if you
are. A typical organization is 50 MB for root, 150-250 MB for
swap, and the remaining space for
.Pa /usr .
With enough swap space configured, you can make
.Pa /tmp
a nice, fast mfs. See
.Xr mount_mfs 8 ,
and note that the mfs will require swap space for
the largest planned amount of
.Pa /tmp
storage. It doesn't return
space when files are deleted, but just keeps it its own freelist
so the swap space required is equal to the highwater mark of
.Pa /tmp
use, plus space required to back up main memory and store inactive images.
.Pp
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
.Pa /mnt .
You are now ready to go on to the next step.
.
.
.El
.
.
.It
Configuration: arranging access to the distribution sets
.Pp
After doing the disk and file system setup with either
shell commands or the script assist, you then need only
unpack the distribution sets with the
.Xr tar 1
command.
To do this you will need access from the target host
to the tar files
that contain the operating system in order to extract them to your
disk. This is done via an NFS or FTP transfer over a network,
via a CD-ROM archive, a tape archive, or by preloading an accessible hard
drive with the necesary tar files.
.
.
.Bl -bullet
.It
Preparing to Install from a CD-ROM
.Pp
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 is probed as.) This would be done with:
.Dl "mount -r -t cd9660 /dev/cd0a /mnt2"
.It
Preparing to Install from the Network
.Pp
The first thing you need to do is configure the loopback network
interface, which is done with the command
.Dl "ifconfig lo0 127.0.0.1"
Then you will have to configure your Ethernet card. The command
.Dl "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).
.Pp
To configure your ethernet card, type
.Ic ifconfig Ar if Li inet
.Ar addr
.Op Li netmask
.Op Li media Ar media
where
.Ar if
is the network card (interface), almost always
.Li de0 ,
.Ar addr
is the IP address, the optional
.Ar netmask
parameter is the network mask,
and the optional
.Ar media
parameter is one of:
.
.
.Bl -column "10baseT/UTPxx" "T4 twisted pair interfacexx" "100 Mbpsxxxx" \
-offset indent
.It 10base2 Ta BNC connector Ta 10 Mbps
.It AUI Ta AUI connector Ta 10 Mbps
.It 10baseT/UTP Ta Twisted pair connector Ta 10 Mbps
.It 100baseTX Ta Twisted pair connector Ta 100 Mbps
.It 100baseFX Ta Fibre-optic connector Ta 100 Mbps
.It 100baseT4 Ta T4 twisted pair interface Ta 100 Mbps
.El
.
.
.Pp
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
.Dl route add default \*<gateway-IP-address\*>
One improvement over the good old days is that the resolver is now
present; by configuring
.Pa /etc/resolv.conf
you can get name resolution during any install NFS or FTP operations.
.Pp
Once networking has been configured, you may mount the directory
with the install files via NFS, or download them via FTP.
.Pp
To mount them via nfs, type
.Dl 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.
.Pp
To download the install sets with ftp, create a directory in
which to put them and then use the ftp client to download them.
Mirror sites are listed at:
.Lk http://www.netbsd.org/Sites/net.html
A typical session might be:
.Bd -literal -offset indent
mkdir /mnt/usr/release
cd /mnt/usr/release
ftp ftp.netbsd.org
.Ed
[the following commmands are given to the ftp program
after logging in]
.Bd -literal offset indent
prompt
cd /pub/NetBSD/NetBSD-\*V/alpha/binary/sets
mget *
bye
.Ed
.Pp
Feel free, of course, to leave off the sets that you don't need
if you don't plan to install everything.
.
.
.El
.
.
.It
Unpack distribution sets: Extracting the Operating System Files
.
.Pp
Change to the root directory of your hard
drive (which is
.Pa /mnt
if you've used the standard install script
to this point) by typing
.Dl cd /mnt
For this and the following commands, replace
.Pa /mnt/usr/release/
with the path to your NFS volume or CD-ROM if that's how you
chose to access your install files instead.
.Pp
The sets and kernel are extracted with
.
.(disp
cd /mnt
for i in base kern comp etc games man misc text; do
tar xpzf /mnt/usr/release/$i.tgz;
done
.disp)
.
or perhaps:
.
.(disp
cd /mnt
for i in /mnt/usr/release/*.tgz; do
echo $i
tar xpzf $i
done
.disp)
.
Now make the device nodes:
.(disp
cd /mnt/dev
sh ./MAKEDEV all
.disp)
.
.
.It
Restart your system
.Pp
Unmount the file systems and halt. The exact instructions to
type here will depend on the file systems you created, but
typically the commands are:
.(disp
cd /
umount /mnt/usr
umount /mnt
sync # not needed but traditional
halt
.disp)
.Pp
You should now be at the SRM console's \*>\*>\*> prompt and can reboot
into the new configuration (possibly after an optional power cycle)
with a command such as:
.Dl boot dka0
This command might be:
.Ic boot dka100
if your drive is on ID 1.
You can usually use
.Ic show device
to see a full list of bootable
devices in your system. Your system will come up in single-user
mode, ready for you to configure it.
.
.El
.
.
.Pp
You can create the floppy needed for installation
under DOS or Windows. Supposing your 1.44M floppy
drive is drive A:, and your CD is drive
.Ic E: ,
do the following from an MS-DOS command prompt:
.D1 Ic "e:\&
.D1 Ic "cd \eNetBSD-\*V\einstallation\emisc
.D1 Ic "rawrite
When asked for a source filename, answer
.D1 Ic "\&...\efloppy\edisk1of2
When asked for a destination drive answer
.D1 Ic \&a
.Pp
(Repeat the procedure for
.Pa installation/floppy/disk2of2 . )