1 .\" $NetBSD: install,v 1.40 2008/04/30 13:10:48 martin Exp $
3 .\" Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
29 There may be updates to this procedure available from the
32 http://www.NetBSD.org/ports/\*M/ .
37 you need to first boot an installation
38 program and then interact with the screen-menu program
40 The installation program actually consists of the
43 an in-memory file system of utility programs.
45 From most convenient to least convenient, the installation methods
48 Installation from an existing
53 install kernel from an existing root file system
56 .Sx Installing from an existing system
57 section later in these INSTALL notes.
59 Copying a bootable diskimage onto the beginning of a disk and installing
62 .Sx Install via diskimage
63 section later in these INSTALL notes.
65 Booting the install kernel over the network and installing onto a local
68 .Sx Install via netboot install kernel
69 section later in these INSTALL notes.
71 Using a helper machine with a SCSI controller to copy the bootable
72 diskimage onto the beginning of a disk, and moving the disk to the
75 .Sx Install via diskimage
76 section later in these INSTALL notes.
78 For machines with some PROMs that cannot netboot standard kernels, you
79 will need to set up an NFS server with a diskless root file system for
80 trimmed-down network install kernel and run the installation system from
81 the NFS root file system.
83 .Sx Install via diskless boot
84 section later in these INSTALL notes.
87 You should familiarize yourself with the console PROM environment
88 and the hardware configuration.
89 The PROMs on the older DECstation 2100 and 3100 use one syntax.
90 The PROMs on the TurboChannel machines use a completely different syntax.
91 Be sure you know how to print the configuration of your machine,
92 and how to boot from disk or network, as appropriate.
94 To boot from disk, use:
96 .(tag 12n -offset indent -compact
98 .Ic "boot -f rz(0," Ns Ar X Ns Ic ",0)netbsd"
100 .Ic "boot 5/rz" Ns Ar X Ns Ic "/netbsd"
102 .Ic "boot 3/rz" Ns Ar X Ns Ic "/netbsd"
105 To boot via TFTP, use:
107 .(tag 12n -offset indent -compact
116 To boot via MOP, use:
118 .(tag 12n -offset indent -compact
127 You will also need to know the total size (in sectors) and the
128 approximate geometry of the disks you are installing onto, so that you
129 can label your disks for the
131 fast file system (FFS).
132 For most SCSI drives (including all SCSI-2 drives),
133 the kernel will correctly detect the disk geometry.
136 tool will suggest these as the default.
140 for the first time it's a very
141 good idea to pre-plan partition sizes for the disks on which you're
144 Changing the size of partitions after you've installed is difficult.
145 If you do not have a spare bootable disk, it may be simpler to re-install
149 Assuming a classic partition scheme with separate
154 file systems, a comfortable size for the
157 partition is about 100 MB.
158 A good initial size for the swap partition is twice the
159 amount of physical memory in your machine (though, unlike
161 there are no restrictions on the size of the swap partition that would render
162 part of your memory unusable).
163 The default swap size is 64 MB, which
164 is adequate for doing a full system build.
166 .Ss2 Install via a NetBSD CD-ROM
168 You can obtain the disk image or diskless boot tar file from the
172 To mount the CD-ROM from a
176 .Dl # Ic "mount -r -t cd9660 /dev/cd" Ns Ar X Ns Ic "c /mnt"
182 .Dl # Ic "mount -r -t cdfs -o nodefperm,noversion /dev/rz" Ns Ar X Ns Ic "c /mnt"
186 is the SCSI-ID of the CD-ROM.
189 does not have Rock Ridge extensions so leave out everything
190 between the first and last period
192 in the paths on the CD.
193 For example, the path
199 The diskimage file can be found on the CD-ROM at the following location
200 (relative to the mount point of the CD)
202 .Dl Pa \*M/installation/diskimage/diskimage.gz
204 and the diskless boot tar file can be found at
206 .Dl Pa \*M/installation/netboot/diskimage.tgz
208 Once you have located these files, continue on to either
209 .Sx Install via netboot install kernel ,
210 .Sx Install via diskless boot ,
211 .Sx Install via diskimage
213 .Sx Installing from an existing system
214 section later in the INSTALL notes.
216 .Ss2 Installing from an existing system
221 bootblocks or using the
223 bootloader, you can boot the kernel located in:
225 .Dl Pa \*M/binary/kernel/netbsd-INSTALL.gz
229 systems you will need to
231 this kernel before booting it.
233 Then boot using one of:
235 .(tag 12n -offset indent -compact
237 .Ic "boot -f rz(0," Ns Ar X Ns Ic ",0)netbsd-INSTALL"
239 .Ic "boot 5/rz" Ns Ar X Ns Ic "/netbsd-INSTALL"
241 .Ic "boot 3/rz" Ns Ar X Ns Ic "/netbsd-INSTALL"
246 is your boot disk SCSI-ID, and continue to the
247 .Sx Once you've booted the diskimage
250 .Ss2 Install via diskimage
252 The diskimage file is in
254 .Dl Pa \*M/installation/diskimage/diskimage.gz .
256 It is shipped compressed and is around 1760 kbytes, uncompressing to
259 To install the diskimage onto disk
265 .Dl # Ic "disklabel -W /dev/rsd" Ns Ar X Ns Ic "c"
266 .Dl # Ic "gunzip -c diskimage.gz\ |\ dd of=/dev/rsd" Ns Ar X Ns Ic "c bs=10240"
268 When installing on a disk with no
275 .Dl sdX: WARNING: trying Ultrix label, no disk label
277 or when installing on an old
279 disk, you may get a message like:
281 .Dl sdX: WARNING: using ULTRIX partition information
284 .Ic "disklabel -W /dev/rsd" Ns Ar X Ns Ic "c"
286 This can safely be ignored.
291 .Dq raw disk partition
296 .Dl # Ic "disklabel -W /dev/rsd" Ns Ar X Ns Ic "d"
297 .Dl # Ic "gunzip -c diskimage.gz\ |\ dd of=/dev/rsd" Ns Ar X Ns Ic "d bs=10240"
303 to enable writing to the label
305 If you forget this and/or use the
309 command may silently fail.
315 .Dl # Ic "gunzip -c diskimage.gz | dd of=/dev/rrz" Ns Ar X Ns Ic "c bs=10240"
324 Then boot using one of:
326 .(tag 12n -offset indent -compact
328 .Ic "boot -f rz(0," Ns Ar X Ns Ic ",0)netbsd"
330 .Ic "boot 5/rz" Ns Ar X Ns Ic "/netbsd"
332 .Ic "boot 3/rz" Ns Ar X Ns Ic "/netbsd"
337 is your boot disk SCSI-ID, and continue to the
338 .Sx Once you've booted the diskimage
341 .Ss2 Install via netboot install kernel
345 \*V install kernel over a network requires a BOOTP
346 or DHCP server and a TFTP server.
347 (These are usually all run on the same machine.)
348 There are two basic stages to the boot:
352 The \*M PROM software sends a BOOTP request to get its own address, the
353 address of the TFTP server and the file to download.
355 It downloads the file name obtained from BOOTP, which is the install
356 kernel, via TFTP and then executes it.
360 You will need to set up servers for BOOTP and TFTP.
362 For the BOOTP server you need to specify the:
366 hardware type (Ethernet)
368 hardware address (Ethernet MAC address)
370 IP address of the client
372 subnet mask of the client
374 address of the TFTP server
376 name of the kernel loaded via TFTP
380 Here's an example for a
386 :ht=ethernet:ha=08002b123456:\e
387 :ip=192.168.1.2:sm=255.255.255.0:\e
388 :sa=192.168.1.1:bf=install:\e
392 And here's an example for a
394 system running the ISC
398 hardware ethernet 08:0:2b:12:34:56;
399 fixed-address 192.168.1.2;
400 option host-name "myhost.mydom.com";
402 option domain-name-servers 192.168.1.1;
403 option broadcast-address 255.255.255.0;
404 option domain-name "my.domain";
405 option root-path "/usr/export/\*M";
409 For the TFTP server, You will need to copy the
411 kernel to the directory used by the TFTP server.
412 This file must be gunzipped.
414 Then boot using one of:
416 .(tag 12n -offset indent -compact
426 .Sx Once you've booted the diskimage
429 .Ss2 Install via diskless boot
432 .Pa \*M/installation/netboot/diskimage.tar.gz
433 contains a suitable set of files for installing on an NFS server to set
434 up a diskless root filesytem.
435 (It is a tar copy of the contents of an
436 installation ramdisk file system contained in the install kernel.)
437 You will need to find an NFS server, unpack the tarfile, and setup
438 BOOTP/dhcp service for your \*M.
439 Instructions for setting up an NFS server and diskless booting are on the
443 .Lk http://www.NetBSD.org/ports/\*M/netboot.html
445 Since the system install utility,
447 requires a read/write root,
448 installing via diskless boot is only feasible if your NFS server exports
449 the diskless root read-write.
450 If this is not possible, you should
451 install via other of the other installation procedures.
453 Once you have booted the kernel, continue to the
454 .Sx Once you've booted the diskimage
457 .Ss2 Once you've booted the diskimage
459 Once you've booted the installation kernel you will need to
460 select your terminal type.
463 for a framebuffer console or a serial console with a vt100-compatible terminal, or
471 connection running in an
474 The system will then start the
477 .so ../common/sysinst