.\" $NetBSD: install,v 1.29 2001/08/26 12:08:07 simonb Exp $ .\" .\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the NetBSD .\" Foundation, Inc. and its contributors. .\" 4. Neither the name of The NetBSD Foundation nor the names of its .\" contributors may be used to endorse or promote products derived .\" from this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" . .(Note There may be updates to this procedure available from the .Nx*M web page, at .Lk http://www.netbsd.org/Ports/\*M . .Note) .Pp To install or upgrade .Nx , you need to first boot an installation program and then interact with the screen-menu program .Ic sysinst . The installation program actually consists of the .Nx kernel plus an in-memory file system of utility programs. .Pp From most convenient to least convenient, the installation methods are: .(enum Installation from an existing .Nx or .Tn Ultrix system by booting the install kernel from an existing root file system .Pq Pa / . See the .Sx Installing from an existing system section later in these INSTALL notes. .It Copying a bootable diskimage onto the beginning of a disk and installing onto that disk. See the .Sx Install via diskimage section later in these INSTALL notes. .It Booting the install kernel over the network and installing onto a local disk. See the .Sx Install via netboot install kernel section later in these INSTALL notes. .It Using a helper machine with a SCSI controller to copy the bootable diskimage onto the beginning of a disk, and moving the disk to the target machine. See the .Sx Install via diskimage section later in these INSTALL notes. .It For machines with some PROMs that cannot netboot standard kernels, you will need to set up an NFS server with a diskless root file system for trimmed-down network install kernel and run the installation system from the NFS root file system. See the .Sx Install via diskless boot section later in these INSTALL notes. .enum) .Pp You should familiarize yourself with the console PROM environment and the hardware configuration. The PROMs on the older DECstation 2100 and 3100 use one syntax. The PROMs on the TurboChannel machines use a completely different syntax. Be sure you know how to print the configuration of your machine, and how to boot from disk or network, as appropriate. .Pp To boot from disk, use: .Pp .(tag 12n -offset indent -compact .It "2100 or 3100:" .Ic "boot -f rz(0," Ns Ar X Ns Ic ",0)netbsd" .It "5000/200:" .Ic "boot 5/rz" Ns Ar X Ns Ic "/netbsd" .It "other 5000s:" .Ic "boot 3/rz" Ns Ar X Ns Ic "/netbsd" .tag) .Pp To boot via TFTP, use: .Pp .(tag 12n -offset indent -compact .It "2100 or 3100:" .Ic "boot -f tftp()" .It "5000/200:" .Ic "boot 6/tftp" .It "other 5000s:" .Ic "boot 3/tftp" .tag) .Pp To boot via MOP, use: .Pp .(tag 12n -offset indent -compact .It "2100 or 3100:" .Ic "boot -f mop()" .It "5000/200:" .Ic "boot 6/mop" .It "other 5000s:" .Ic "boot 3/mop" .tag) .Pp You will also need to know the total size (in sectors) and the approximate geometry of the disks you are installing onto, so that you can label your disks for the .Bx fast file system (FFS). For most SCSI drives (including all SCSI-2 drives), the kernel will correctly detect the disk geometry. The .Ic sysinst tool will suggest these as the default. .Pp If you're installing .Nx*M for the first time it's a very good idea to pre-plan partition sizes for the disks on which you're installing .Nx . Changing the size of partitions after you've installed is difficult. If you do not have a spare bootable disk, it may be simpler to re-install .Nx again from scratch. .Pp Assuming a classic partition scheme with separate .Pa / (root) and .Pa /usr file systems, a comfortable size for the .Nx .Pa / partition is about 32 MB. A good initial size for the swap partition is twice the amount of physical memory in your machine (though, unlike .Tn Ultrix , there are no restrictions on the size of the swap partition that would render part of your memory unusable). The default swap size is 64 MB, which is adequate for doing a full system build. A full binary installation, with X11R6.3 takes about 150 MB in .Pa /usr ; a 200 MB .Pa /usr should be ample. . .Ss2 Install via a NetBSD CD-ROM . You can obtain the disk image or diskless boot tar file from the .Nx \*V .Tn CD-ROM . .Pp To mount the CD-ROM from a .Nx*M host, type .Pp .Dl # Ic "mount -r -t cd9660 /dev/cd" Ns Ar X Ns Ic " c /mnt" .Pp and from an .Tn Ultrix host .Pp .Dl # Ic "mount -r -t cdfs -o nodefperm,noversion /dev/rz" Ns Ar X Ns Ic "c /mnt" .Pp where .Ar X is the SCSI-ID of the CD-ROM. .(Note .Tn Ultrix does not have Rock Ridge extensions so leave out everything between the first and last period .Pq Sq \&. in the paths on the CD. For example, the path .Pa NetBSD-1.4.3 would show up as .Pa NetBSD-1.3 . .Note) .Pp The diskimage file can be found on the CD-ROM at the following location (relative to the mount point of the CD) .Pp .Dl Pa \*M/installation/diskimage/diskimage.gz .Pp and the diskless boot tar file can be found at .Pp .Dl Pa \*M/installation/netboot/diskimage.tgz .Pp Once you have located these files, continue on to either .Sx Install via netboot install kernel , .Sx Install via diskless boot , .Sx Install via diskimage or .Sx Installing from an existing system section later in the INSTALL notes. . .Ss2 Installing from an existing system . .(Note If you are installing .Nx using an existing .Nx system that is older than .Nx 1.4 , you will need to install new bootblocks before installing .Nx \*V. New bootblocks are in the tar file: .Pp .Dl Pa \*M/installation/misc/bootblocks.tgz .Pp in the .Nx \*V distribution. To install the new bootblocks, use the following commands: .Pp .Dl # Ic "cd /" .Dl # Ic "tar -zxpvf .../\*M/installation/misc/bootblocks.tgz" .Dl # Ic "/usr/mdec/installboot /dev/rrz" Ns Ar X Ns Ic "c /usr/mdec/bootxx_ffs" .Pp where .Ar X is your boot disk SCSI-ID. .Note) .Pp With new .Nx bootblocks or using the .Tn Ultrix bootloader, you can boot the kernel located in: .Pp .Dl Pa \*M/binary/kernel/install.gz .Pp On .Tn Ultrix systems you will need to .Ic gunzip this kernel before booting it. A copy of the .Ic gunzip binary for .Tn Ultrix systems is located in: .Pp .Dl Pa \*M/installation/misc/gunzip.ultrix .Pp Then boot using one of: .Pp .(tag 12n -offset indent -compact .It "2100 or 3100:" .Ic "boot -f rz(0," Ns Ar X Ns Ic ",0)install" .It "5000/200:" .Ic "boot 5/rz" Ns Ar X Ns Ic "/install" .It "other 5000s:" .Ic "boot 3/rz" Ns Ar X Ns Ic "/install" .tag) .Pp where .Ar X is your boot disk SCSI-ID, and continue to the .Sx Once you've booted the diskimage section . .Ss2 Install via diskimage . The diskimage file is in .Pp .Dl Pa \*M/installation/diskimage/diskimage.gz . .Pp It is shipped compressed and is around 1150 kbytes, uncompressing to exactly 2 MB. .Pp To install the diskimage onto disk .Li sd Ns Ar X on a .Nx*M system, do: .Pp .Dl # Ic "disklabel -W /dev/rsd" Ns Ar X Ns Ic "c" .Dl # Ic "gunzip -c diskimage.gz\ |\ dd of=/dev/rsd" Ns Ar X Ns Ic "c bs=10240" .Pp When installing on a disk with no .Nx or .Tn Ultrix label, you may get a message like: .Pp .Dl sdX: WARNING: trying Ultrix label, no disk label .Pp or when installing on an old .Tn Ultrix disk, you may get a message like: .Pp .Dl sdX: WARNING: using ULTRIX partition information .Pp when issuing the .Ic "disklabel -W /dev/rsd" Ns Ar X Ns Ic "c" command. This can safely be ignored. .Pp On .Nx Ns /i386, the .Dq raw disk partition is the .Sq Li d partition, so do: .Pp .Dl # Ic "disklabel -W /dev/rsd" Ns Ar X Ns Ic "d" .Dl # Ic "gunzip -c diskimage.gz\ |\ dd of=/dev/rsd" Ns Ar X Ns Ic "d bs=10240" .Pp On .Nx , be sure to use .Ic disklabel -W to enable writing to the label area of the disk. If you forget this and/or use the .Sq block device, the .Ic dd command may silently fail. .Pp On .Tn Ultrix systems, do: .Pp .Dl # Ic "gunzip -c diskimage.gz | dd of=/dev/rrz" Ns Ar X Ns Ic "c bs=10240" .Pp A copy of the .Ic gunzip program is located in .Pp .Dl Pa \*M/installation/misc/gunzip.ultrix .Pp if you do not already have it. .Pp On .Tn MS-DOS , use an .Sq unzip utility, then use .Ic rawrite . .Pp Then boot using one of: .Pp .(tag 12n -offset indent -compact .It "2100 or 3100:" .Ic "boot -f rz(0," Ns Ar X Ns Ic ",0)netbsd" .It "5000/200:" .Ic "boot 5/rz" Ns Ar X Ns Ic "/netbsd" .It "other 5000s:" .Ic "boot 3/rz" Ns Ar X Ns Ic "/netbsd" .tag) .Pp where .Ar X is your boot disk SCSI-ID, and continue to the .Sx Once you've booted the diskimage section. . .Ss2 Install via netboot install kernel . Booting .Nx*M \*V install kernel over a network requires a BOOTP or DHCP server and a TFTP server. (These are usually all run on the same machine.) There are two basic stages to the boot: .Pp . .(bullet The \*M PROM software sends a BOOTP request to get its own address, the address of the TFTP server and the file to download. .It It downloads the file name obtained from BOOTP, which is the install kernel, via TFTP and then executes it. .bullet) . .Pp You will need to set up servers for BOOTP and TFTP. .Pp For the BOOTP server you need to specify the: .Pp . .(bullet -compact hardware type (Ethernet) .It hardware address (Ethernet MAC address) .It IP address of the client .It subnet mask of the client .It address of the TFTP server .It name of the kernel loaded via TFTP .bullet) . .Pp Here's an example for a .Ul system running .Ic bootpd : .(disp myhost.mydom.com:\e :ht=ethernet:ha=08002b123456:\e :ip=192.168.1.2:sm=255.255.255.0:\e :sa=192.168.1.1:bf=install:\e :rp=/usr/export/\*M: .disp) .Pp And here's an example for a .Ul system running the ISC .Ic dhcpd : .(disp host \*M { hardware ethernet 08:0:2b:12:34:56; fixed-address 192.168.1.2; option host-name "myhost.mydom.com"; filename "install"; option domain-name-servers 192.168.1.1; option broadcast-address 255.255.255.0; option domain-name "my.domain"; option root-path "/usr/export/\*M"; } .disp) .Pp For the TFTP server, You will need to copy the .Ic install.ecoff kernel to the directory used by the TFTP server. This file must be gunzipped. .Pp Then boot using one of: .Pp .(tag 12n -offset indent -compact .It "2100 or 3100:" .Ic "boot -f tftp()" .It "5000/200:" .Ic "boot 6/tftp" .It "other 5000s:" .Ic "boot 3/tftp" .tag) .Pp and continue to the .Sx Once you've booted the diskimage section. . .Ss2 Install via diskless boot . The file .Pa \*M/installation/netboot/diskimage.tar.gz contains a suitable set of files for installing on an NFS server to set up a diskless root filesytem. (It is a tar copy of the contents of an installation ramdisk file system contained in the install kernel.) You will need to find an NFS server, unpack the tarfile, and setup BOOTP/dhcp service for your \*M. Instructions for setting up an NFS server and diskless booting are on the .Nx*M netboot webpage at .Lk http://www.netbsd.org/Ports/\*M/netboot.html .Pp Since the system install utility, sysinst, requires a read/write root, installing via diskless boot is only feasible if your NFS server exports the diskless root read-write. If this is not possible, you should install via other of the other installation procedures. .Pp Once you have booted the kernel, continue to the .Sx Once you've booted the diskimage section. . .Ss2 Once you've booted the diskimage . Once you've booted the installation kernel you will need to select your terminal type. Use .Ic rcons for a framebuffer console, .Ic vt100 for a serial console with a vt100-compatible terminal, or .Ic xterm or .Ic xterms for a .Xr tip 1 or .Xr cu 1 connection running in an .Xr xterm 1 . .Pp The system will then start the .Ic sysinst program. .so ../common/sysinst