xref: /netbsd-src/distrib/notes/alpha/install (revision 7c7c171d130af9949261bc7dce2150a03c3d239c)
1	$NetBSD: install,v 1.3 1998/01/09 18:45:34 perry Exp $
2
30. Introduction
4
5    This is the first release of NetBSD/alpha with regular packaging
6    and install tools, and the installation program is still rather
7    primitive. It also hasn't been tested very well, so there may
8    be bugs in both it and this document. However, if you have
9    problems, don't despair; most problems you might encounter are
10    very easy to fix. We strongly suggest you join the port-alpha
11    list (see the section on mailing lists on www.netbsd.org) and
12    ask questions there if you run into any problems. Also report
13    problem you've gotten around there or by using send-pr so that
14    they can be fixed for the next release.
15
161. General
17
18    The following is a walk-through of the steps you will take
19    while getting NetBSD installed on your hard disk. It's divided
20    into three basic components: booting NetBSD (section 2 below),
21    preparing the disk (section 3 below), and loading the operating
22    system files onto the disk (section 4 below).
23
242. Booting NetBSD
25
26    You have two choices of how to boot your machine. If you have a
27    floppy drive, you may boot from that. This is probably the simplest
28    way of getting started. If you don't have a floppy drive, you will
29    need to set yourself up for a boot from a file server on the
30    network, which is a little more complex.
31
322.1 Making and Booting a Floppy
33
34    The 3.5", 1.44 MB boot floppy image is found under the
35    NetBSD/alpha _VER distribution directory in the file
36    alpha/installation/floppy/floppy-144. You need to take this disk
37    image and put it on a floppy disk.
38
39    If you have a Unix system handy, you can do this with a command
40    like the following:
41
42        dd if=floppy-144 of=/dev/rfd0a
43
44    If the Unix system you are using is not a NetBSD system, you will
45    probably need to replace `/dev/rfd0a' with the name of the floppy
46    device on your particular system.
47
48    If you have an MS-DOS or Windows system available, you can use
49    the `rawrite.exe' utility to transfer the image to a floppy
50    disk. (Note that rawrite.exe doesn't work under many, if not
51    all, Windows NT systems.) This utility is provided with the
52    NetBSD/i386 install tools, under i386/installation/misc; a
53    documentation file, `rawrite.doc' is available there as well.
54
55    Once the floppy has been made, you simply need to put it in the
56    drive and type
57
58        boot dva0
59
60    Now you may skip to section 3.
61
622.2 Booting over the Network
63
64    Booting NetBSD/alpha _VER over a network requires a BOOTP server,
65    a TFTP server and an NFS server. (These are usually all run on
66    the same machine.) There are three basic stages to the boot:
67
68    1.The Alpha console software sends a BOOTP request to get its own
69    address, the address of the TFTP server and the file to
70    download. It downloads this file, which is the second stage
71    bootstrap, via TFTP and then executes it.
72
73    2.The second stage bootstrap uses further information in the BOOTP
74    packet that the console received to find the NFS server and path
75    and retreive the kernel (the file /netbsd). After loading the
76    kernel into memory, it executes it.
77
78    3.The kernel probes and configures the devices, and then sends
79    out another BOOTP request so it can find out its address, the NFS
80    server, and path. (The kernel probably should get this information
81    from the console, but it currently doesn't.) It then mounts its
82    root via NFS and continues.
83
842.2.1 Setting Up the Server
85
86    You will need to set up your server to serve BOOTP, TFTP and NFS.
87
88    The NFS setup is quite simple. If you want to run a full system
89    from the network, untar the NetBSD snapshot or distribution
90    into a directory on your server and NFS export that directory
91    to the client. (Make sure you put a kernel there as well, and
92    create the device nodes in /dev with `sh ./MAKEDEV all'. In
93    fact, see the full instructions available off the alpha port
94    page at www.netbsd.org.)
95
96    You'll want to map root to `root' (rather than the default
97    `nobody') when you export your root filesystem. A typical
98    /etc/exports line on a NetBSD system would be:
99
100        /usr/export/alpha -maproot=0 myclient.mydom.com
101
102    If you just want to get the install kernel loaded so that you
103    can download sets to the local hard drive of that machine, you
104    need nothing other than the install kernel in the NFS root
105    directory on your server.
106
107    For the TFTP setup, you need to copy the second stage bootstrap,
108    netboot, into an appropriately named file (I use boot.netbsd.alpha)
109    in the directory used by your TFTP server. If you extracted a full
110    snapshot, you can get the netboot program from /usr/mdec/netboot;
111    if not, you can get this from the installation/netboot directory
112    where you found the alpha distribution.
113
114    For the BOOTP server you need to specify the:
115
116         hardware type (Ethernet)
117         hardware address (Ethernet MAC address)
118         IP address of the client
119         subnet mask of the client
120         address of of the TFTP/NFS server
121         name of the second stage bootstrap loaded via TFTP
122         path to the root for the client (mounted via NFS)
123
124    Here's an example for a Unix system running bootpd:
125
126         myhost.mydom.com:\
127                 :ht=ethernet:ha=0000c0391ae4:\
128                 :ip=192.168.1.2:sm=255.255.255.0:\
129                 :sa=192.168.1.1:bf=boot.netbsd.alpha:rp=/usr/export/alpha:
130
131    And here's an example for a Unix system running dhcpd:
132
133        host axp {
134                hardware ethernet 0:0:c0:39:1a:e4;
135                fixed-address 192.168.1.2;
136                option host-name "myhost.mydom.com";
137                filename "boot.netbsd.alpha";
138                option root-path "/usr/export/alpha";
139                option domain-name-servers 192.168.1.1;
140                option broadcast-address 255.255.255.0;
141                option domain-name "my.domain";
142        }
143
1442.2.2 The Alpha Console
145
146    The only Ethernet device the console on most Alpha systems
147    knows how to boot from is the onboard Ethernet interface or a
148    DEC Tulip (21040, 21041, 21140) based PCI Ethernet card. Some
149    older SMC 100 Mbps card that use this chip have been known to
150    work as well. Many older systems will not be able to use the
151    newer 2.0 stepping of the 21140, however. If your system appears
152    not to be receiving packets, this may be the problem. (You may
153    or may not be able to update your firmware to fix this; see
154    the alpha port pages on www.netbsd.org for more information on
155    this.)
156
157    Once you're set up, you should be able to boot with:
158
159            boot -proto bootp ewa0
160
161    (The command may be different on some very old machines.)
162
1633. Preparing the Disk
164
165    If you're going to be running a diskless machine, the steps so
166    far have prepared you to run, and you can skip to section 5
167    ("Configuration") below.
168
169    If you are going to run NetBSD from a local hard drive, however,
170    this hard drive needs to be prepared. This preparation consists
171    of putting a label on the disk, which includes information on
172    the sizes and placement of the partition into which the disk
173    is divided, putting the boot blocks on the disk, and initialising
174    the filesystems on the partitions. This work is done by the
175    `install' script from the boot floppy (or boot kernel, if you
176    booted it via NFS with the INSTALL kernel).
177
1783.1 Running Install
179
180    When you first boot the INSTALL kernel you will be given the
181    options of `install' or `shell'. Choose `install' and the
182    install script will start.
183
184    If, at any time, you have made a mistake in the install script
185    and want to abort, press ^C. This will take you to a shell
186    prompt.  You can then restart the install script by typing
187    `/install', or halt the machine by typing `halt'.
188
1893.1 Answering the Install Questions
190
191    These will for the most part be fairly obvious. You may install
192    on either a SCSI or an IDE disk, and you will be prompted for
193    the disk to install on. The disks in your system will be numbered
194    starting at xd0 (where x is an `s' for SCSI disks, `w' for IDE
195    disks) based on the SCSI ID or IDE drive order; if you have
196    more than one disk, watch the boot messages carefully to see
197    which ones are probed as which numbers.
198
199    Once you've selected a disk to install on, you'll be prompted
200    for the geometry. This is also displayed in the boot messages,
201    and you'll be given a chance to review the boot messages again
202    to get the exact figures for the number of cylinders, heads
203    and sectors.
204
205    After this you must specify the size of your partitions.
206    Generally you'll be giving the sizes in cylinders; the install
207    program will tell you how many bytes there are in each cylinder.
208
209    The swap partition is the second thing you specify, after the
210    root partition. Regardless of the size of your disk, you'll
211    want to specify a swap partition that's at least as large as
212    the amount of RAM you have, and probably not less than 64 MB
213    in any case.
214
215    If you have a small disk (under 500 MB), it's probably best to
216    devote all of the disk (excepting 64 MB or more for the swap)
217    to the root partition.
218
219    If you have more space, we recommend devoting at least 32 MB,
220    and preferably 48 MB, to the root partition. /usr will need
221    150 MB or so if you're not installing X, 200 MB or so if you
222    are.
223
224    Once you've specified this information, the install script will
225    write the disklabel, install boot blocks to make the disk
226    bootable, initialise the filesystems, and mount them all under
227    /mnt. You're now ready to go on to the next step.
228
2294. Installing NetBSD
230
231    To install NetBSD you'll have to get access to the tar files
232    that contain the operating system, and extract them to your
233    disk.  You can get access to the tar files through either a
234    network or from a CD-ROM.
235
2364.1 Preparing to Install from a CD-ROM
237
238    All you need to do is mount the CD-ROM, which will generally
239    be device cd0. (The initial boot messages will tell you what
240    the CD-ROM drive as probed as.) This would be done with:
241
242        mount -r -t cd9660 /dev/cd0a /mnt2
243
2444.2 Preparing to Install from the Network
245
246    The first thing you need to do is configure the loopback network
247    interface, which is done with the command
248
249        ifconfig lo0 127.0.0.1
250
251    Then you will have to configure your Ethernet card. The command
252
253        ifconfig -l
254
255    will give you a list of the network interfaces on your system.
256    It will show you your ethernet cards first, followed by lo0
257    (the loopback interface that we configured above), ppp0 (the
258    PPP interface) and sl0 (the SLIP interface).
259
260    To configure your ethernet card, type
261
262        ifconfig <if> inet <addr> [netmask <netmask>] [media <media>]
263
264    Where <if> is the network card (interface), <addr> is the IP
265    address, the optional <netmask> parameter is the network mask,
266    and the optional <media> parameter is one of:
267
268        10base2         BNC connector, 10 Mbps
269        AUI             AUI connector, 10 Mbps
270        10baseT         Twisted pair connector, 10 Mbps
271        100baseTX       Twisted pair connector, 100 Mbps
272        100baseFX       Fibre-optic connector, 100 Mbps
273        100baseT4       T4 twisted pair interface, 100 Mbps
274
275    If the host you are getting the data files from is not on the
276    local network, you will also have to configure a gateway into
277    your system. Do this with
278
279        route add default <gateway-IP-address>
280
281    If you will need name services you can set up a /etc/resolv.conf
282    file for those with a `nameserver <ip-address>' line in it, e.g.:
283
284        echo "nameserver 198.41.0.4" >>/etc/resolv.conf
285
286    Once networking has been configured, you may mount the directory
287    with the install files via NFS, or download them via FTP.
288
289    To mount them via nfs, type
290
291        mount -t nfs <hostname:/path/to/nfs/volume> /mnt2
292
293    If this volume has been exported read-only, you may need the
294    `-r' option to mount.
295
296    To download the install sets with ftp, create a directory in
297    which to put them and then use the ftp client to download them.
298    A typical session might be:
299
300        mkdir /mnt/var/tmp
301        cd /mnt/var/tmp
302        ftp ftp.netbsd.org
303        [all the following commmands are given to the ftp program
304            after logging in]
305        prompt
306        cd /pub/NetBSD/NetBSD-1.3/alpha/binary/sets
307        mget *
308        cd /pub/NetBSD/NetBSD-1.3/alpha/binary/kernel
309        get netbsd-GENERIC.gz
310        cd /pub/NetBSD/NetBSD-1.3/alpha/binary/toolchain
311        get netbsd-GENERIC.gz
312        bye
313
314    Feel free, of course, to leave off the sets that you don't need
315    if you don't plan to install everything.
316
317    You are now ready to proceed to step 4.3.
318
3194.3 Extracting the Operating System Files
320
321    This is quite simple. Change to the root directory of your hard
322    drive (which is /mnt if you've used the standard install script
323    to this point) by typing
324
325        cd /mnt
326
327    Then extract the kernel with:
328
329        zcat /mnt/var/tmp/netbsd-GENERIC.gz >/mnt/netbsd
330
331    For this and the following commands, replace `/mnt/var/tmp/'
332    with the path to your NFS volume or CD-ROM if that's how you
333    chose to access your install files instead.
334
335    The sets are extracted with
336
337        for file in base comp etc games man misc text; do
338            tar --unlink -t -z -f /mnt/var/tmp/$file;
339            done
340
341    and the toolchain with
342
343        tar --unlink -t -z -f /mnt/var/tmp/toolchain.tar.gz
344
345    You will now be ready to reboot from your hard disk. Type `sync'
346    twice to make sure all the data is written out to disk and then
347    type `halt' to halt your system and go back to the monitor. At
348    this point you should be able to reboot your system with
349
350        boot dka0
351
352    (or `boot dka100' if your disk drive is on ID 1, etc.--you can
353    usually use `show device' to see a full list of bootable devices
354    in your system). Your system will come up in single-user mode,
355    ready for you to configure it.
356
3575. Configuring NetBSD
358
359    Configuring your NetBSD system requires editing the /etc/rc.conf
360    file. Most of this file is fairly self-explanatory, but you
361    can `man rc.conf' for further explanations. Remember to set
362    `rc_configured' to YES so you will boot multi-user, set `hostname'
363    and possibly `defaultroute', and add an ifconfig_int for your
364    interface <int>, along the lines of
365
366        ifconfig_de0="inet myname.my.dom 123.45.67.89 netmask 255.255.255.0"
367
368    You will also want either to run named or add an /etc/resolv.conf
369    file (`man resolv.conf' for information on this), use `vipw' to add
370    accounts to your system, edit /etc/aliases to forward root mail to
371    the right place (run `newaliases' afterwards) and edit /etc/rc.local
372    to run any local daemons you use.
373