install revision 1.4
1 $NetBSD: install,v 1.4 1998/01/09 18:47:34 perry Exp $ 2 3Installing NetBSD is a relatively complex process, but if you have 4this document in hand it should not be too difficult. 5 6There are several ways to install NetBSD onto your disk. If your 7machine has a tape drive the easiest way is "Installing from tape" 8(details below). If your machine is on a network with a suitable 9NFS server, then "Installing from NFS" is the next best method. 10Otherwise, if you have another Sun machine running SunOS you can 11initialize the disk on that machine and then move the disk. 12(Installing from SunOS is not recommended.) 13 14 15* Installing from tape: 16 17Create the NetBSD/sun3 _VER boot tape as described in the section 18entitled "Preparing a boot tape" and boot the tape. At the PROM 19monitor prompt, use one of the commands: 20 >b st() 21 >b st(0,8,0) 22The first example will use the tape on SCSI target 4, where the 23second will use SCSI target 5. The '>' is the monitor prompt. 24 25After the tape loads, you should see many lines of configuration 26messages, and then the following "welcome" screen: 27 28 Welcome to the NetBSD/sun3 RAMDISK root! 29 30This environment is designed to do only three things: 311: Partititon your disk (use the command: edlabel /dev/rsd0c) 322: Copy a miniroot image into the swap partition (/dev/rsd0b) 333: Reboot (using the swap partition, i.e. /dev/sd?b). 34 35Copying the miniroot can be done several ways, allowing 36the source of the miniroot image to be on any of these: 37 boot tape, NFS server, TFTP server, rsh server 38 39The easiest is loading from tape, which is done as follows: 40 mt -f /dev/nrst0 rewind 41 mt -f /dev/nrst0 fsf 2 42 dd bs=32k if=/dev/nrst0 of=/dev/rsd0b 43(For help with other methods, please see the install notes.) 44 45To reboot using the swap partition, first use "halt", 46then at the PROM monitor prompt use a command like: 47 b sd(,,1) -s 48 49To view this message again, type: cat /.welcome 50 51[ End of "welcome" screen. ] 52 53Copy the miniroot as described in the welcome message, and 54reboot from that just installed miniroot. See the section 55entitled "Booting the miniroot" for details. 56 57 58* Installing from NFS: 59 60Before you can install from NFS, you must have already configured 61your NFS server to support your machine as a diskless client. 62Instructions for configuring the server are found in the section 63entitled "Getting the NetBSD System onto Useful Media" above. 64 65First, at the Sun PROM monitor prompt, enter a boot command 66using the network interface as the boot device. On desktop 67machines this is "le", and "ie" on the others. Examples: 68 69 >b le() -s 70 >b ie() -s 71 72After the boot program loads the RAMDISK kernel, you should 73see the welcome screen as shown in the "tape boot" section 74above. You must configure the network interface before you 75can use any network resources. For example the command: 76 77 ssh> ifconfig le0 inet 192.233.20.198 up 78 79will bring up the network interface with that address. The next 80step is to copy the miniroot from your server. This can be done 81using either NFS or remote shell. (In the examples that follow, 82the server has IP address 192.233.20.195) You may then need to 83add a default route if the server is on a different subnet: 84 85 ssh> route add default 192.233.20.255 1 86 87You can look at the route table using: 88 89 ssh> route show 90 91Now mount the NFS filesystem containing the miniroot image: 92 93 ssh> mount -r 192.233.20.195:/server/path /mnt 94 95The procedure is simpler if you have space for an expanded 96(not compressed) copy of the miniroot image. In that case: 97 98 ssh> dd if=/mnt/miniroot of=/dev/rsd0b bs=8k 99 100Otherwise, you will need to use "zcat" to expand the miniroot 101image while copying. This is tricky because the "ssh" program 102(small shell) does not handle sh(1) pipeline syntax. Instead, 103you first run the reader in the background with its input set 104to /dev/pipe and then run the other program in the foreground 105with its output to /dev/pipe. The result looks like this: 106 107 ssh> run -bg dd if=/dev/pipe of=/dev/rsd0b obs=8k 108 ssh> run -o /dev/pipe zcat /mnt/install/miniroot.gz 109 110To load the miniroot using rsh to the server, you would use a 111pair of commands similar to the above. Here is another example: 112 113 ssh> run -b dd if=/dev/pipe of=/dev/rsd0b obs=8k 114 ssh> run -o /dev/pipe rsh 192.233.20.195 zcat miniroot.gz 115 116 117* Booting the miniroot: 118 119If the miniroot was installed on partition 'b' of the disk with 120SCSI target ID=0 then the PROM boot command would be: 121 >b sd(0,0,1) -s 122With SCSI target ID=2, the the PROM is: 123 >b sd(0,10,1) -s 124 125The numbers in parentheses above are: 126 controller (usually zero) 127 unit number (SCSI ID * 8, in hexadecimal) 128 partition number 129 130Miniroot install program: 131------------------------ 132 133The miniroot's install program is very simple to use. It will guide 134you through the entire process, and is well automated. Additional 135improvements are planned for future releases. 136 137The miniroot's install program will: 138 139 * Allow you to place disklabels on additional disks. 140 The disk we are installing on should already have 141 been partitioned using the RAMDISK kernel. 142 143 * Create filesystems on target partitions. 144 145 * Allow you to set up your system's network configuration. 146 Remember to specify host names without the domain name 147 appended to the end. For example use `foo' instead of 148 `foo.bar.org'. If, during the process of configuring 149 the network interfaces, you make a mistake, you will 150 be able to re-configure that interface by simply selecting 151 it for configuration again. 152 153 * Mount target filesystems. You will be given the opportunity 154 to manually edit the resulting /etc/fstab. 155 156 * Extract binary sets from the media of your choice. 157 158 * Copy configuration information gathered during the 159 installation process to your root filesystem. 160 161 * Make device nodes in your root filesystem. 162 163 * Copy a new kernel onto your root partition. 164 165 * Install a new boot block. 166 167 * Check your filesystems for integrity. 168 169First-time installation on a system through a method other than the 170installation program is possible, but strongly discouraged. 171