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