1 .\" $NetBSD: install,v 1.7 2008/09/06 22:30:14 tsutsui 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.
30 is a relatively complex process, but if you have
31 this document in hand it should not be too difficult.
33 There are several ways to install
36 If your machine has a tape drive the easiest way is
37 .Sx "Installing from tape"
39 If your machine is on a network with a suitable NFS server, then
40 .Sx "Installing from NFS"
41 is the next best method.
42 Otherwise, if you have another
46 you can initialize the disk on that machine and then move the disk.
51 .Ss2 Installing from tape
55 \*V boot tape as described in the section
57 .Sx "Creating boot/install tapes"
59 At the PROM monitor prompt, use one of the commands:
61 .Dl \*[Gt] Ns Ic "b st()"
62 .Dl \*[Gt] Ns Ic "b st(0,8,0)"
64 The first example will use the tape on SCSI target 4, where the
65 second will use SCSI target 5.
68 is the monitor prompt.
70 After the tape loads, you should see many lines of configuration
71 messages, and then the following
75 Welcome to the NetBSD/\*M RAMDISK root!
77 This environment is designed to do only three things:
78 1: Partition your disk (use the command: edlabel /dev/rsd0c)
79 2: Copy a miniroot image into the swap partition (/dev/rsd0b)
80 3: Reboot (using the swap partition, i.e. /dev/sd?b).
82 Note that the sun2 firmware cannot boot from a partition located
83 more than 1 GB from the beginning of the disk, so the swap partition
84 should be completely below the 1 GB boundary.
86 Copying the miniroot can be done several ways, allowing
87 the source of the miniroot image to be on any of these:
88 boot tape, NFS server, TFTP server, rsh server
90 The easiest is loading from tape, which is done as follows:
91 mt -f /dev/nrst0 rewind
92 mt -f /dev/nrst0 fsf 2
93 dd if=/dev/nrst0 of=/dev/rsd0b bs=32k conv=sync
94 (For help with other methods, please see the install notes.)
96 To reboot using the swap partition, first use "halt",
97 then at the PROM monitor prompt use a command like:
100 To view this message again, type: cat /.welcome
103 Copy the miniroot as described in the welcome message, and
104 reboot from that just installed miniroot.
105 See the section entitled
106 .Sx Booting the miniroot
109 .Ss2 Installing from NFS
111 Before you can install from NFS, you must have already configured
112 your NFS server to support your machine as a diskless client.
113 Instructions for configuring the server are found in the section
115 .Sx Getting the NetBSD System onto Useful Media
120 PROM monitor prompt, enter a boot command
121 using the network interface as the boot device.
122 If your machine has Intel Ethernet, this is
124 and if it has 3Com Ethernet, this is
128 .Dl \*[Gt] Ns Ic "b ie() -s"
129 .Dl \*[Gt] Ns Ic "b ec() -s"
131 After the boot program loads the RAMDISK kernel, you should
132 see the welcome screen as shown in the
133 .Sx Installing from tape
135 You must configure the network interface before you
136 can use any network resources.
137 For example the command:
139 .Dl ssh\*[Gt] Ic "ifconfig ie0 inet 192.233.20.198 up"
141 will bring up the network interface with that address.
142 The next step is to copy the miniroot from your server.
143 This can be done using either NFS or remote shell.
144 (In the examples that follow, the server has IP address 192.233.20.195.)
146 add a default route if the server is on a different subnet:
148 .Dl ssh\*[Gt] Ic "route add default 192.233.20.255 1"
150 You can look at the route table using:
152 .Dl ssh\*[Gt] Ic "route show"
154 Now mount the NFS file system containing the miniroot image:
156 .Dl ssh\*[Gt] Ic "mount -o rdonly,-r=1024 192.233.20.195:/server/path /mnt"
158 The procedure is simpler and much faster if you have space for an expanded
159 (not compressed) copy of the miniroot image.
162 .Dl ssh\*[Gt] Ic "dd if=/mnt/miniroot.fs of=/dev/rsd0b bs=8k"
164 Otherwise, you will need to use
166 to expand the miniroot image while copying.
167 This is tricky because the
170 (small shell) does not handle
174 you first run the reader in the background with its input set
177 and then run the other program in the foreground with its output to
179 The result looks like this:
181 .Dl ssh\*[Gt] Ic "run -bg dd if=/dev/pipe of=/dev/rsd0b obs=8k"
182 .Dl ssh\*[Gt] Ic "run -o /dev/pipe zcat /mnt/install/miniroot.fs.gz"
184 To load the miniroot using rsh to the server, you would use a
185 pair of commands similar to the above.
186 Here is another example:
188 .Dl ssh\*[Gt] Ic "run -b dd if=/dev/pipe of=/dev/rsd0b obs=8k"
189 .Dl ssh\*[Gt] Ic "run -o /dev/pipe rsh 192.233.20.195 zcat miniroot.fs.gz"
191 Note that decompression on a sun2 is
193 slow, be prepared to wait.
194 For this reason, expanding the miniroot
195 image on the NFS server is highly recommended.
197 Once the miniroot has been copied using one of the above methods,
198 you reboot from that just installed miniroot.
199 See the section entitled
200 .Sx Booting the miniroot
203 .Ss2 Installing from SunOS
207 onto a machine already running
210 will need the miniroot image (miniroot.fs.gz) and some means to
215 and place the miniroot file onto the hard drive.
220 you will need to decompress
221 the image elsewhere before you can use it.
225 down to single user mode to insure that nothing
226 will be using the swap space on your drive.
227 To be extra safe, reboot
228 the machine into single-user mode rather than using the
232 Now copy the miniroot image onto your swap device (here
236 .Dl Ic "gzip -dc miniroot.fs.gz | dd of=/dev/rsd0b obs=32k"
238 or if you have already decompressed the miniroot
240 .Dl Ic "dd if=miniroot.fs of=/dev/rsd0b obs=32k"
242 Finally, reboot the machine and instruct the PROM to boot from
243 the swap device as described in the next section.
245 .Ss2 Booting the Miniroot
247 If the machine is not already at the PROM monitor, run the
251 If the miniroot was installed on partition
254 SCSI target ID=0 then the PROM boot command would be:
256 .Dl \*[Gt] Ns Ic "b sd(0,0,1) -s"
258 With SCSI target ID=2, the PROM is:
260 .Dl \*[Gt] Ns Ic "b sd(0,10,1) -s"
262 The numbers in parentheses above are:
263 .(enum -compact -offset indent
264 controller (usually zero)
266 unit number (SCSI-ID * 8, in hexadecimal)
271 .Ss2 Miniroot install program
273 The miniroot's install program is very simple to use.
274 It will guide you through the entire process, and is well automated.
275 Additional improvements are planned for future releases.
277 The miniroot's install program will:
278 .(bullet -offset indent
279 Allow you to place disklabels on additional disks.
280 The disk we are installing on should already have
281 been partitioned using the RAMDISK kernel.
283 Create file systems on target partitions.
285 Allow you to set up your system's network configuration.
286 Remember to specify host names without the domain name
292 If, during the process of configuring
293 the network interfaces, you make a mistake, you will
294 be able to re-configure that interface by simply selecting
295 it for configuration again.
297 Mount target file systems.
298 You will be given the opportunity
299 to manually edit the resulting
302 Extract binary sets from the media of your choice.
304 Copy configuration information gathered during the
305 installation process to your root file system
308 Make device nodes in your root file system under
311 Copy a new kernel onto your root partition
314 Install a new boot block.
316 Check your file systems for integrity.
319 First-time installation on a system through a method other than the
320 installation program is possible, but strongly discouraged.