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