install revision 1.12.2.5 1
2 0. Introduction
3
4 Using "sysinst", installing NetBSD is a relatively easy process. You
5 still should read this document and have it in hand when doing the
6 installation process. This document tries to be a good guideline
7 for the installation and as such covers many details to be complete.
8 Do not let this discourage you, the install program is not hard
9 to use.
10
11 0.1 Possible PCMCIA issues
12
13 There is a serious bug that may make installation of NetBSD on PCMCIA
14 machines difficult. This bug does not make USE of PCMCIA difficult
15 once a machine is installed. If you do not have PCMCIA on your
16 machine (PCMCIA is only really used on laptop machines), you
17 can skip this section, and ignore the "[PCMCIA]" notes.
18
19 This will explains how to work around the installation problem.
20 It is anticipated that this bug will be fixed by NetBSD 1.4
21
22 What is the bug: The kernel keeps careful track of what interrupts
23 and i/o ports are in use during autoconfiguration. It then allows
24 the PCMCIA devices to pick unused interrupts and ports.
25 Unfortunately, not all devices are included in the INSTALL
26 kernels in order to save space. Let's say your laptop has a
27 soundblaster device built in. The INSTALL kernel has no sound
28 support. The PCMCIA code might allocate your soundblaster's IRQ
29 and i/o ports to PCMCIA devices, causing them not to work. This
30 is especially bad if one of the devices in question is your
31 ethernet card.
32
33 This problem will impact some, but not all, users of PCMCIA. If
34 this bug is hurting you, watch the "[PCMCIA]" notes that will
35 appear in this document.
36
37 1. General
38
39 The following is a walk-through of the steps you will take while
40 getting NetBSD installed on your hard disk. sysinst is a menu driven
41 installation system that allows for some freedom in doing the
42 installation. Sometimes, questions will be asked and in many cases
43 the default answer will be displayed in brackets ("[]") after the
44 question. If you wish to stop the installation, you may hit Control-C
45 at any time, but if you do, you'll have to begin the installation
46 process again from scratch.
47
48 2. Quick install
49
50 First, let's describe a quick install. The other sections of
51 this document go into the installation procedure in more
52 detail, but you may find that you do not need this. If you
53 want detailed instructions, skip to section 3. This section
54 describes a basic installation, using a CD-ROM install as
55 an example.
56
57 2.1 What you need.
58
59 * The distribution sets (in this example, they are on CD).
60 * One 1.44M 3.5" floppy.
61 * A PC with a 386 or newer processor, a CD-ROM drive
62 (SCSI or ATAPI), a harddisk and a minimum of 4Mb of
63 memory installed.
64 * The harddisk should have at least 70 + N megabytes of
65 space free, where N is the number of megabytes of
66 main memory in your system. If you wish to install
67 the X window system as well, you will need at least
68 60Mb more.
69
70 2.2 Creating a bootfloppy.
71
72 * You can create the floppy needed for installation
73 under DOS or Windows. Supposing your 1.44M floppy
74 drive is drive A:, and your CD is drive E: do the
75 following from an MS-DOS command prompt:
76
77 e:
78 cd \NetBSD-_VER\installation\misc
79 rawrite
80
81 When asked for a source filename, answer
82
83 ..\floppy\boot.fs
84
85 When asked for a destination drive answer
86
87 a
88
89 2.3 The installation
90
91 * Insert the bootfloppy you just created. Restart the
92 PC. You will be presented with a menu.
93 * If you wish, you can configure some network settings
94 immediately by choosing the "utilities" menu and
95 then "configure network". This isn't needed, but
96 more convenient to do now. Go back to the main menu.
97 * Choose "install"
98 * You will be guided through some steps regarding the
99 setup of your harddisk, and parts to install. When
100 in doubt, refer to the rest of this document for
101 details.
102 * After your disk has been prepared, choose CD-ROM
103 as the medium. The default values for the path
104 and device should be ok.
105 * After all the files have been unpacked, go back to
106 the main menu and select "reboot", after you
107 have removed the bootfloppy from the drive.
108 * NetBSD will now boot. You should log in as root,
109 and set a password for that account. You are also
110 advised to edit the file "/etc/rc.conf" to match
111 your system needs.
112 * Your installation is now complete.
113 * For configuring the X window system, if installed,
114 see the files in /usr/X11R6/lib/X11/doc. Further
115 information can be found on http://www.xfree86.org/
116
117 3. Booting NetBSD
118
119 [PCMCIA]: unplug your PCMCIA devices, so that they won't be
120 found by NetBSD.
121
122 Boot your machine using the boot floppy. The boot loader will
123 start, and will print a countdown and begin booting. You will
124 likely see one "file not found" warning from the boot loader
125 -- ignore this as it is normal, and indicates the boot loader
126 failed to find a normal kernel to boot before trying to boot a
127 compressed kernel.
128
129 If the boot loader messages do not appear in a reasonable
130 amount of time, you either have a bad boot floppy or a
131 hardware problem. Try writing the install floppy image to
132 a different disk, and using that.
133
134 If that doesn't work, try booting after disabling your CPU's
135 internal and external caches (if any). If it still doesn't
136 work, NetBSD probably can't be run on your hardware. This can
137 probably be considered a bug, so you might want to report it.
138 If you do, please include as many details about your system
139 configuration as you can.
140
141 It will take a while to load the kernel from the floppy,
142 probably around a minute or so.
143
144 You will then be presented with the NetBSD kernel boot
145 messages. This may take a little while, as NetBSD will
146 be probing for a lot of types of hardware, You may want to read the
147 boot messages, to notice your disk's name and geometry. Its name
148 will be something like "sd0" or "wd0" and the geometry will be
149 printed on a line that begins with its name. As mentioned above,
150 you may need your disk's geometry when creating NetBSD's partitions.
151 You will also need to know the name, to tell sysinst on which disk
152 to install. The most important thing to know is that
153 'wd0 is NetBSD's name for your first IDE disk, wd1 the second,
154 etc. 'sd0' is your first SCSI disk, sd1 the second, etc.
155
156 Note that, once the system has finished booting, you need no
157 longer leave the floppy in the disk drive. Earlier version of
158 the NetBSD install floppies mounted the floppy as the system's
159 root partition, but the new installation floppies use a
160 ramdisk file system and are no longer dependent on the floppy
161 once it has booted.
162
163 Once NetBSD has booted and printed all the boot messages,
164 you will be presented with a welcome message and a main menu.
165 It will also include instructions for using the menus.
166
167 4. Network configuration
168
169 [PCMCIA] You can skip this section, as you will only get data
170 from floppy in the first part of the install.
171
172 If you will not use network operation during the installation,
173 but you do want your machine to be configured for networking once
174 it is installed, you should first go to the utilities menu, and select
175 the "Configure network option". If you only want to temporarily
176 use networking during the installation, you can specify these
177 parameters later. If you are not using Domain Name Service (DNS),
178 you can give an empty response in reply to answers relating to
179 this.
180
181 5. The hard disk to install on and its parameters.
182
183 To start the installation, select the menu option to install
184 NetBSD from the main menu.
185
186 The first thing is to identify the disk on which you want to
187 install NetBSD. sysinst will report a list of disks it finds
188 and ask you for your selection. Depending on how many disks
189 are found, you may get a different message. You should see
190 disk names like "wd0", "wd1", "sd0", or "sd1".
191
192 sysinst next tries to figure out the real and BIOS geometry
193 of your disk. It will present you with the values it found,
194 if any, and will give you a chance to change them.
195 Please note that if you change the values, sysinst WILL ALSO
196 REINITIALIZE YOUR MBR.
197
198 You will also be asked if you want to use the last cylinder of
199 the disk. Originally, the last cylinder of the disk was used for
200 diagnostic purposes, but this is usually not a concern anymore
201 these days. You will be able to specify whether you want to
202 skip the last cylinder anyway.
203
204 Next, depending on whether you are using a "wdX" or a "sdX" disk,
205 you will either be asked for the type of disk (wdX) you are
206 using or you will be asked if you want to specify a fake geometry
207 for your SCSI disk (sdX). The types of disk are be IDE, ST-506
208 or ESDI. If you're installing on an ST-506 or ESDI drive, you'll
209 be asked if your disk supports automatic sector forwarding. If you
210 are SURE that it does, reply affirmatively. Otherwise, the install
211 program will automatically reserve space for bad144 tables.
212
213 6. Partitioning the disk.
214
215 6.1 Which portion of the disk to use.
216
217 You will be asked if you want to use the entire disk or
218 only part of the disk. If you decide to use the entire disk
219 for NetBSD, it will be checked if there are already other
220 systems present on the disk, and you will be asked to confirm
221 whether you want to overwrite these.
222
223 If you want to use the entire disk for NetBSD, you can skip
224 the following section and go to section 6.3, "Editing the
225 NetBSD disklabel".
226
227 6.2 Editing the Master Boot Record.
228
229 First, you will be prompted to specify the units of size
230 that you want to express the sizes of the partitions in.
231 You can either pick megabytes, cylinders or sectors.
232
233 After this, you will be presented with the current values
234 stored in the MBR, and will be given the opportunity to
235 change, create or delete partitions. For each partition
236 you can set the type, the start and the size. Setting
237 the type to 'unused' will delete a partition. You can
238 also mark a partition as active, meaning that this is
239 the one that the BIOS will start from at boot time.
240
241 Be sure to mark the partition you want to boot from as active!
242
243 After you are done editing the MBR, a sanity check
244 will be done, checking for partitions that overlap.
245 If everything is ok, you can go on to the next step,
246 editing the NetBSD disklabel.
247
248 6.3 Editing the NetBSD disklabel.
249
250 The partition table of a NetBSD part of a disk is called
251 a 'disklabel'. There are 3 layouts for the NetBSD part
252 of the disk that you can pick from: Standard, Standard
253 with X and Custom. The first two use a set of default
254 values (that you can change) suitable for a normal
255 installation, possibly including X. The last option
256 lets you specify everything yourself.
257
258 You will be presented with the current layout of the
259 NetBSD disklabel, and given a chance to change it.
260 For each partition, you can set the type, offset and size,
261 block and fragment size, and the mount point. The type
262 that NetBSD uses for normal file storage is called
263 "4.2BSD". A swap partition has a special type called "swap".
264 You can also specify a partition as type "msdos". This
265 is useful if you share the disk with MS-DOS or Windows95,
266 NetBSD is able to access the files on these partitions.
267 You can use the values from the MBR for the MS-DOS part
268 of the disk to specify the partition of type "msdos"
269 (you don't have to do this now, you can always re-edit
270 the disklabel to add this once you have installed NetBSD).
271
272 Some partitions in the disklabel have a fixed purpose.
273 Partition 'a' is always the root partition, 'b' is the
274 swap partition, 'c' is the entire NetBSD part of the disk,
275 and 'd' is the whole disk. Partitions 'e'-'h' are available
276 for other use. Traditionally, 'e' is the partition mounted
277 on the /usr directory, but this is historical practice,
278 not a fixed value.
279
280 You will then be asked to name your disk's disklabel. The
281 default response is "mydisk". For most purposes this will be OK.
282 If you choose to name it something different, make sure the name
283 is a single word and contains no special characters. You don't
284 need to remember this name.
285
286 7. Preparing your hard disk
287
288 YOU ARE NOW AT THE POINT OF NO RETURN. Nothing has been
289 written to your disk yet, but if you confirm that you want to
290 install NetBSD, your hard drive will be modified. If you are
291 sure you want to proceed, enter "yes" at the prompt.
292
293 The install program will now label your disk and make the file
294 systems you specified. The filesystems will be initialized to
295 contain NetBSD bootstrapping binaries and configuration files.
296 You will see messages on your screen from the various NetBSD
297 disk preparation tools that are running. There should be no
298 errors in this section of the installation. If there are,
299 restart from the beginning of the installation process.
300 Otherwise, you can continue the installation program
301 after pressing 'return'.
302
303 NOTE: In previous versions of NetBSD, the kernel from the
304 install floppy was copied onto the hard drive in a special
305 step. In the new install system, the kernel on the floppy is
306 unsuited to being copied onto the hard drive. Instead, a new
307 set, "kern", has been added which contains a generic kernel to
308 be unloaded onto the drive. So, you can not boot from your
309 hard drive yet at this point.
310
311 8. Getting the distribution sets.
312
313 [PCMCIA] Load a kernel tar file (i.e. the kern.tgz set file)
314 on to your hard disk, for example by mounting the
315 hard disk first, copying the kern.tgz file from
316 floppy and unpacking it. Example:
317
318 mount /dev/wd0a /mnt
319 cd /mnt
320
321 <repeat following 3 steps until all kern.* files are there>
322 mount -t msdos /dev/fd0a /mnt2
323 cp /mnt2/kern.* .
324 umount /mnt2
325
326 cat kern.* | tar vxzf -
327
328 Then halt the machine using the 'halt' command. Power
329 the machine down, and re-insert all the PCMCIA devices.
330 Remove any floppy from the floppy drive.
331 Start the machine up. After booting NetBSD, you will
332 be presented with the main sysinst menu. Choose the
333 option to re-install sets. Wait for the filesystem
334 checks that it will do to finish, and then proceed
335 as described below.
336
337
338 The NetBSD distribution consists of a number of 'sets', that
339 come in the form of gzipped tarfiles. A few sets must be
340 installed for a working system, others are optional. At this
341 point of the installation, you will be presented with a menu
342 which enables you to choose from one of the following methods
343 of installing the sets. Some of these methods will first
344 load the sets on your hard disk, others will extract the sets
345 directly.
346
347 For all these methods, the first step is making the sets
348 available for extraction, and then do the actual installation.
349 The sets can be made available in a few different ways. The
350 following sections describe each of those methods. After
351 reading the one about the method you will be using, you
352 can continue to section 9
353
354 8.1 Installation using ftp
355
356 To be able to install using ftp, you first need to configure
357 your network setup, if you haven't already at the start of
358 the install procedure. sysinst will do this for you, asking you
359 to provide some data, like IP number, hostname, etc. If you
360 do not have name service set up for the machine that you
361 are installing on, you can just press 'return' in answer
362 to these questions, and DNS will not be used.
363
364 You will also be asked to specify the host that you want
365 to transfer the sets from, the directory on that host,
366 and the account name and password used to log into that
367 host using ftp. If you did not set up DNS when answering
368 the questions to configure networking, you will need to
369 specify an IP number instead of a hostname for the ftp
370 server.
371
372 sysinst will proceed to transfer all the default set files
373 from the remote site to your hard disk.
374
375 8.2 Installation using NFS
376
377 To be able to install using NFS, you first need to configure
378 your network setup, if you haven't already at the start of
379 the install procedure. sysinst will do this for you, asking you
380 to provide some data, like IP number, hostname, etc. If you
381 do not have name service set up for the machine that you
382 are installing on, you can just press 'return' in answer
383 to these questions, and DNS will not be used.
384
385 You will also be asked to specify the host that you want
386 to transfer the sets from, and the directory on that host
387 that the files are in. This directory should be mountable
388 by the machine you are installing on, i.e. correctly
389 exported to your machine.
390
391 If you did not set up DNS when answering the questions to
392 configure networking, you will need to specify an IP number
393 instead of a hostname for the NFS server.
394
395
396 8.3 Installation from CD-ROM
397
398 When installing from a CD-ROM, you will be asked to specify
399 the device name for your CD-ROM player (usually 'cd0'), and
400 directory name on the CD-ROM where the distribution files are.
401
402 sysinst will then check if the files are indeed available
403 in the specified location, and proceed to the actual
404 extraction of the sets.
405
406 8.4 Installation from floppy
407
408 Because the installation sets are too big to fit on one floppy,
409 the floppies are expected to be filled with the split set
410 files. The floppies are expected to be in MS-DOS
411 format. You will be asked for a directory where the sets
412 should be reassembled. Then you will be prompted to insert
413 the floppies containing the split sets. This process
414 will continue until all the sets have been loaded from floppy.
415
416
417 8.5 Installation from an unmounted filesystem
418
419 In order to install from a local filesystem, you will
420 need to specify the device that the filesystem resides
421 on (for example 'wd1e'), the type of the filesystem,
422 and the directory on the specified filesystem where the
423 sets are located. sysinst will then check if it
424 can indeed access the sets at that location.
425
426 8.6 Installation from a local directory
427
428 This option assumes that you have already done some preparation
429 yourself. The sets should be located in a directory on a
430 filesystem that is already accessible. sysinst will ask you
431 for the name of this directory.
432
433 9. Extracting the distribution sets
434
435 After you the install sets containing the NetBSD distribution
436 have been made available, you can either extract all the
437 sets (a full installation), or only extract sets that
438 you have selected. In the latter case you will be shown the
439 currently selected sets, and given the opportunity to select
440 the sets you want. Some sets always need to be installed
441 ("kern", "base" and "etc"), they will not be shown in
442 this selection menu.
443
444 Before extraction begins, you can elect to watch the files
445 being extracted; the name of each file that is extracted will
446 be shown.
447
448 After all the files have been extracted, all the necessary
449 device node files will be created. If you have already
450 configured networking, you will be asked if you want to
451 use this configuration for normal operation. If so, these
452 values will be installed in the network configuration files.
453
454 10. Finalizing your installation.
455
456 Congratulations, you have successfully installed NetBSD _VER.
457 You can now reboot the machine, and boot from harddisk.
458
459 After reboot, you can log in "root" at the login prompt. There
460 is no initial password, but if you're using the machine in a
461 networked environment, you should create yourself an account
462 and protect it and the "root" account with good passwords.
463
464 You should now edit the /etc/rc.conf file to configure the system
465 to suit your needs, and then reboot the system again.
466
467 Some other files in the NetBSD _VER distribution might need to be
468 tailored for your site. In particular, the /etc/sendmail.cf file will
469 almost definitely need to be adjusted, and other files in /etc will
470 probably need to be modified, as well.
471
472 If you are unfamiliar with UN*X-like system administration, it's
473 recommended that you buy a book that discusses it.
474
475 If you have installed the X window system, look at the files in
476 /usr/X11R6/lib/X11/doc for information. You will need to set up
477 a configuration file. An example of such a file is
478 /usr/X11R6/lib/X11/XF86Config.eg. See http://www.xfree86.org/
479 and the XFree86 manual page for more information.
480