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