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