install revision 1.8 1 Installing NetBSD is a relatively complex process, but if you have
2 this document in hand and are careful to read and remember the
3 information which is presented to you by the install program, it
4 shouldn't be too much trouble.
5
6 Before you begin, you should know the geometry of your hard disk, i.e.
7 the sector size (note that sector sizes other than 512 bytes are not
8 currently supported), the number of sectors per track, the number of
9 tracks per cylinder (also known as the number of heads), and the
10 number of cylinders on the disk. The NetBSD kernel will try to
11 discover these parameters on its own, and if it can it will print them
12 at boot time. If possible, you should use the parameters it prints.
13 (You might not be able to because you're sharing your disk with
14 another operating system, or because your disk is old enough that the
15 kernel can't figure out its geometry.)
16
17 If NetBSD will be sharing the disk with DOS or another operating
18 system, you should have already completed the section of these notes
19 that instructed you on how to prepare your hard disk. You should know
20 the size of the NetBSD area of the disk and its offset from the
21 beginning of the disk. You will need this information when setting up
22 your NetBSD partitions.
23
24 You should now be ready to install NetBSD. It might be handy for you
25 to have a pencil, some paper, and a calculator handy.
26
27 The following is a walk-through of the steps you will take while
28 getting NetBSD installed on your hard disk. If any question has a
29 default answer, it will be displayed in brackets ("[]") after the
30 question. If you wish to stop the installation, you may hit Control-C
31 at any time, but if you do, you'll have to begin the installation
32 process again from scratch.
33
34 Boot your machine using of the appropriate installation
35 floppy. The boot loader will start, and will print a
36 countdown and begin booting. You will likely see one "file not
37 found" warning from the boot loader -- ignore this as it is
38 normal, and indicates the boot loader failed to find a normal
39 kernel to boot before trying to boot a compressed kernel.
40
41 If the boot loader messages do not appear in a reasonable
42 amount of time, you either have a bad boot floppy or a
43 hardware problem. Try writing the install floppy image to
44 a different disk, and using that.
45
46 If that doesn't work, try booting after disabling your CPU's
47 internal and external caches (if any). If it still doesn't
48 work, NetBSD probably can't be run on your hardware. This can
49 probably be considered a bug, so you might want to report it.
50 If you do, please include as many details about your system
51 configuration as you can.
52
53 It will take a while to load the kernel from the floppy,
54 probably around a minute or so.
55
56 You will then be presented with the NetBSD kernel boot
57 messages. You will want to read them, to determine your
58 disk's name and geometry. Its name will be something like
59 "sd0" or "wd0" and the geometry will be printed on a line that
60 begins with its name. As mentioned above, you will need your
61 disk's geometry when creating NetBSD's partitions. You will
62 also need to know the name, to tell the install tools what
63 disk to install on.
64
65 Note that, once the system has finished booting, you need no
66 longer leave the floppy in the disk drive. Earlier version of
67 the NetBSD install floppies mounted the floppy as the system's
68 root partition, but the new installation floppies use a
69 ramdisk file system and are no longer dependent on the floppy
70 once it has booted.
71
72 While booting, you will probably see several warnings. You
73 should be warned that no swap space is present, and that
74 init(8) cannot find /etc/rc. Do not be alarmed, these are
75 completely normal. When you reach the prompt asking you for a
76 shell name, just hit return.
77
78 You will be presented with a welcome message and a prompt,
79 asking if you wish to proceed with the installation process.
80 If you wish to proceed, enter "y" and hit return.
81
82 You will be asked what type of disk driver you have. The
83 valid options are listed by the install program, to make sure
84 you get it right. If you're installing on an ST-506 or ESDI
85 drive, you'll be asked if your disk supports automatic sector
86 forwarding. If you are SURE that it does, reply
87 affirmatively. Otherwise, the install program will
88 automatically reserve space for bad144 tables.
89
90 The install program will then tell you which disks of that
91 type it can install on, and ask you which it should use.
92 Reply with the name of your disk. (The first disk of the type
93 you selected, either "wd0" for ST-506/ESDI/IDE disks, or "sd0"
94 for SCSI disks, is the default.)
95
96 You will then be asked to name your disk's disklabel. The
97 default response is "mywd" or "mysd" depending on the type of
98 your disk, and for most purposes it will be OK. If you choose
99 to name it something different, make sure the name is a single
100 word and contains no special characters. You don't need to
101 remember this name.
102
103 You will be prompted for your disk's geometry information,
104 i.e. the number of bytes per sector, cylinders on the disk,
105 tracks per cylinder (heads), and sectors per track. Enter
106 them when they are requested. If you make a mistake, hit
107 Control-C and when you get to the shell prompt, restart the
108 install process by running the "install" command. Once you
109 have entered this data, the install program will tell you the
110 total size of your disk, in both sectors, and cylinders.
111 Remember this number; if you're installing on the whole disk,
112 you'll need it again soon.
113
114 When describing your partitions, you will have the option of
115 entering data about them in units of disk sectors or
116 cylinders. If you choose to enter the information in units of
117 sectors, remember that, for optimal performance, partitions
118 should begin and end on cylinder boundaries. You will be
119 asked about which units you wish to use, and you should reply
120 with "c" for cylinders, or "s" for sectors.
121
122 You will be asked for the size of the NetBSD portion of the
123 disk. If you're installing on the whole disk, reply with the
124 size of the disk, as printed earlier by the install program.
125 If you're using only part of the disk, reply with the size
126 that you specified in the partition editor. (Don't forget to
127 enter the size in the units you specified in the last step!)
128
129 If you are not installing on the whole disk, you will be asked
130 fro the offset of the NetBSD partition from the beginning of
131 the disk. Reply with the appropriate offset (again, in
132 whichever units you specified), as determined by how you
133 set up your disk using the partition editor.
134
135 You will be asked to enter the size of your NetBSD root
136 partition. It should be at least 13M, but if you are going to
137 be doing development, 14-16M is a more desirable size. This
138 size should be expressed in units of sectors or cylinders,
139 depending on which you said you wanted to use.
140
141 Next, you will be asked for the size of your swap partition.
142 You should probably allocate twice as much swap space as you
143 have real memory. Systems that will be heavily used should
144 have more swap space allocated, and systems that will be
145 lightly used can get by with less. If you want the system to
146 be able to save crash dumps when it panics, you will need at
147 least as much swap space as you have RAM. Again, this number
148 should be expressed in units of sectors or cylinders, as
149 appropriate.
150
151 The install program will then ask you for information about
152 the rest of the partitions you want on your disk. For most
153 purposes, you will want only one more partition, "/usr".
154 (Machines used as servers will probably also want /var as a
155 separate partition. That can be done with these installation
156 tools, but is not covered here.) The install program will
157 tell you how much space there is left to be allocated in the
158 NetBSD area of the disk, and, if you only want one more
159 partition ("/usr"), you should enter it at the prompt when the
160 installer asks you how large the next partition should be.
161 It will then ask you for the name of the mount point for that
162 partition. If you're doing a basic installation, that is
163 "/usr".
164
165 YOU ARE NOW AT THE POINT OF NO RETURN. Nothing has been
166 written to your disk yet, but if you confirm that you want to
167 install NetBSD, your hard drive will be modified, and its
168 contents may be scrambled at the whim of the install program.
169 This is especially likely if you have given the install
170 program incorrect information. If you are sure you want to
171 proceed, enter "yes" at the prompt.
172
173 The install program will now label your disk and make the file
174 systems you specified. The filesystems will be initialized to
175 contain NetBSD bootstrapping binaries and configuration files.
176 It will also create an /etc/fstab for your system, and mount
177 all of the file systems under /mnt. (In other words, your root
178 partition will be mounted on /mnt, your /usr partition on
179 /mnt/usr, and so on.) There should be no errors in this
180 section of the installation. If there are, restart from the
181 beginning of the installation process.
182
183 You will be placed at a shell prompt ("#"). The task is to
184 install the distribution sets. The flow of installation
185 differs depending on your hardware resources, and on what
186 media the distribution sets reside.
187
188 NOTE: In previous versions of NetBSD, the kernel from the
189 install floppy was copied onto the hard drive in a special
190 step. In the new install system, the kernel on the floppy is
191 unsuited to being copied onto the hard drive. Instead, a new
192 set, "kern", has been added which contains a generic kernel to
193 be unloaded onto the drive. It must be extracted in addition
194 to "base" and "etc" in order to have a minimally functioning
195 system.
196
197 To install from floppy:
198 The first thing you should do is pick a temporary
199 directory where the distribution files can be stored.
200 To do this, enter the command "Set_tmp_dir", and enter
201 the name of the temporary directory. (Don't forget
202 that if your disk is still mounted under /mnt; you
203 should probably pick a directory under /mnt/usr.)
204
205 After you have picked a temporary directory, enter the
206 "Load_fd" command, to load the distribution sets from
207 your floppies.
208
209 You will be asked which floppy drive to use. Enter
210 "0" (zero) if you're using the first floppy drive
211 (i.e. what DOS would call "A:"), or enter "1" if
212 you're using the second (i.e. what DOS would call
213 "B:")
214
215 You will be prompted to insert a floppy into the drive,
216 to have its contents copied to your hard disk. Do so,
217 and hit return to begin copying. When that is done,
218 read the remainder of the floppies that contain the
219 distribution sets that you want to install, one by
220 one. When the last is read, and you are being
221 prompted for another, hit Control-C.
222
223 Run the "Extract" command once for each distribution
224 set you wish to install. For instance, if you wish to
225 install the "kern12D" distribution set, followed by the
226 "base12" distribution set, and finally the "etc12"
227 distribution set, use the commands:
228 Extract kern12D
229 Extract base12
230 Extract etc12
231
232 For each extraction, it will ask you if the extraction
233 should be verbose. If you reply affirmatively, it
234 will print out the name of each file that's being
235 extracted.
236
237 (Note: if you know that you will be running low on
238 disk space when installing NetBSD, you can load and
239 extract one distribution set at a time. To do this,
240 load only the floppies which contain the files for the
241 first distribution set, extract them, and then change
242 to the temporary directory and remove them with the
243 command "rm set_name.??".)
244
245 Once you are finished extracting all of the sets that
246 you wish to install, you should proceed to the
247 instructions below (after the last install medium
248 type-specific instructions), that explain how you
249 should configure your system.
250
251 To install from tape:
252 The first thing you should do is pick a temporary
253 directory where the distribution files can be stored.
254 To do this, enter the command "Set_tmp_dir", and enter
255 the name of the temporary directory. (Don't forget
256 that your disk is mounted under /mnt; you should
257 probably pick a directory under /mnt/usr.) The
258 default is /mnt/usr/distrib.
259
260 After you have picked a temporary directory, enter the
261 "Load_tape" command, to load the distribution sets from
262 tape.
263
264 You will be asked which tape drive to use. The
265 default is "rst0", which is correct if you're using
266 the SCSI tape drive with the lowest SCSI ID number.
267 (For the SCSI tape drive with the next lowest SCSI ID
268 number, you should use "rst1", and so on.)
269
270 You will be prompted to hit return when you have
271 inserted the tape into the tape drive. When you do,
272 the contents of the tape will be extracted into the
273 temporary directory, and the names of the files being
274 extracted will be printed.
275
276 After the tape has been extracted, to go the directory
277 containing the first distribution set you wish to
278 install. (Depending on how you made the tape, it's
279 probably a subdirectory of the temporary directory you
280 specified above.) Once there, run the "Set_tmp_dir"
281 command again, and accept its default answer by
282 hitting return at the prompt.
283
284 Use the "Extract" command to extract the distribution
285 set. For instance, if you're extracting the "base12"
286 set, use the command:
287 Extract base12
288 You will be asked if you wish the extraction to be
289 verbose. If you reply affirmatively, the name of each
290 file being extracted will be printed.
291
292 Repeat the previous two steps for each distribution
293 set you wish to install. Change to the set's
294 directory, run "Set_tmp_dir", and then run
295 "Extract <set_name>" to extract the set.
296
297 Once you are finished extracting all of the sets that
298 you wish to install, you should proceed to the
299 instructions below (after the last install medium
300 type-specific instructions), that explain how you
301 should configure your system.
302
303 To install via FTP or NFS:
304 The first thing you should do is pick a temporary
305 directory where the distribution files can be stored.
306 To do this, enter the command "Set_tmp_dir", and enter
307 the name of the temporary directory. (Don't forget
308 that your disk is mounted under /mnt; you should
309 probably pick a directory under /mnt/usr.) The
310 default is /mnt/usr/distrib.
311
312 Configure the appropriate ethernet interface (e.g.
313 ed0, ep0, etc.) up, with a command like:
314
315 ifconfig <ifname> <ipaddr> [netmask <netmask>]
316
317 where "<ifname>" is the interface name, like those
318 listed above, and "<ipaddr>" is the numeric IP address
319 of the interface. If the interface has a special
320 netmask, supply the word "netmask" at and that netmask
321 at the end of the command line. (The brackets
322 indicate that those arguments are optional.) For
323 instance, to configure interface ed0 with IP address
324 129.133.10.10, use the command:
325
326 ifconfig ed0 129.133.10.10
327
328 and to configure interface ep0 with IP address
329 128.32.240.167 and a special netmask, 0xffffff00, use
330 the command:
331
332 ifconfig ep0 128.32.240.167 netmask 0xffffff00
333
334 If your board selects software selection of the
335 ethernet interface to use, you might have to add
336 special flags to the "ifconfig" command you use.
337 Consult the table below for the appropriate flags:
338
339 Interface Type Connector Flags
340 --------- ---- --------- -----
341 ed with WD/SMC* BNC [none necessary]
342 ed with WD/SMC* UTP [none necessary]
343 ed with WD/SMC* AUI link0
344 ed with 3c503 BNC [none necessary]
345 ed with 3c503 AUI link0
346 ep BNC [none necessary]
347 ep AUI link0
348 ep UTP link0 link1
349
350 * Older WD boards do not support software configuration,
351 and must be configured via jumpers. These flags
352 will have no effect on them.
353
354 In other words, if, in the last example, the AUI port
355 of the board were being used, you would use the
356 command:
357
358 ifconfig ep0 128.32.240.167 netmask 0xffffff00 link0
359
360 If the NFS server or FTP server is not on a directly-
361 connected network, you need to set up a route to it
362 using a command like:
363
364 route add default <gate_ipaddr>
365
366 where <gate_ipaddr> is your gateway's numeric IP
367 address.
368
369 If you are NFS-mounting the distribution sets, mount
370 them on the temporary directory with a command like:
371
372 mount -t nfs <serv_ipaddr>:<dist_dir> <tmp_dir>
373
374 where <serv_ipaddr> is the server's numeric IP address,
375 <dist_dir> is the path to the distribution files on
376 the server, and <tmp_dir> is the name of the local
377 temporary directory.
378
379 Once this is done, proceed as if you had loaded the
380 files from tape, changing to the appropriate
381 directories, running "Set_tmp_dir", and running
382 "Extract" as appropriate.
383
384 If you are retrieving the distribution sets using ftp,
385 change into the temporary directory, and execute the
386 command:
387
388 ftp <serv_ipaddr>
389
390 where <serv_ipaddr> is once again the server's numeric
391 IP address. Get the files with FTP, taking care to
392 use binary mode when transferring the files.
393
394 Once you have all of the files for the distribution
395 sets that you wish to install, you can proceed using
396 the instructions above, as if you had installed from a
397 floppy. (Note that as with the floppy install, if
398 you're short on disk space, you can transfer only one
399 set at a time, extract it, then delete it, to save
400 space.)
401
402 Completing your installation:
403 Once you have finished extracting all of the distribution sets
404 that you wish to install, and are back at the "#" prompt, you
405 are ready to configure your system. The configuration utility
406 expects that you have installed the "kern12D", "base12" and
407 "etc12" distribution sets. If you have not, you will not be
408 able to run it successfully (nor will you have a functional
409 system, in any case). To configure your newly-installed
410 NetBSD system, run the command "Configure". It will ask you
411 for the system's host name, domain name, and other network
412 configuration information. It will set up your configuration
413 files and make the device nodes for the newly-installed
414 system.
415
416
417 Congratulations, you have successfully installed NetBSD 1.2D. When you
418 reboot into NetBSD, you should log in as "root" at the login prompt.
419 There is no initial password, but if you're using the machine in a
420 networked environment, you should create yourself an account and
421 protect it and the "root" account with good passwords.
422
423 Some of the files in the NetBSD 1.2D distribution might need to be
424 tailored for your site. In particular, the /etc/sendmail.cf file will
425 almost definitely need to be adjusted, and other files in /etc will
426 probably need to be modified, as well. If you are unfamiliar with
427 UN*X-like system administration, it's recommended that you buy a book
428 that discusses it.
429