xref: /netbsd-src/distrib/notes/sun3/install (revision b64de1ea002d27da516902b8f5eabf138f078b64)
1	$NetBSD: install,v 1.5 1998/04/15 02:27:07 jeremy 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* Installing from SunOS
118
119To install NetBSD/sun3 onto a machine already running SunOS, you
120will need the miniroot image (miniroot.gz) and some means to
121decompress it.
122
123First, boot SunOS and place the miniroot file onto the hard drive.
124If you do not have gzip for SunOS, you will need to decompress
125the image elsewhere before you can use it.
126
127Next, bring SunOS down to single user mode to insure that nothing
128will be using the swap space on your drive.  To be extra safe, reboot
129the machine into single-user mode rather than using the ``shutdown''
130command.
131
132Now copy the miniroot image onto your swap device (here /dev/rsd0b)
133with the command
134
135  gzip -dc miniroot.gz | dd of=/dev/rsd0b obs=32k
136
137or if you have already decompressed the miniroot
138
139  dd if=miniroot.gz of=/dev/rsd0b obs=32k
140
141Finally, reboot the machine and instruct the ROM to boot from
142the swap device as described in the next section.
143
144
145* Booting the miniroot:
146
147If the miniroot was installed on partition 'b' of the disk with
148SCSI target ID=0 then the PROM boot command would be:
149	>b sd(0,0,1) -s
150With SCSI target ID=2, the the PROM is:
151	>b sd(0,10,1) -s
152
153The numbers in parentheses above are:
154	controller (usually zero)
155	unit number (SCSI ID * 8, in hexadecimal)
156	partition number
157
158Miniroot install program:
159------------------------
160
161The miniroot's install program is very simple to use.  It will guide
162you through the entire process, and is well automated.  Additional
163improvements are planned for future releases.
164
165The miniroot's install program will:
166
167	* Allow you to place disklabels on additional disks.
168	  The disk we are installing on should already have
169	  been partitioned using the RAMDISK kernel.
170
171	* Create filesystems on target partitions.
172
173	* Allow you to set up your system's network configuration.
174	  Remember to specify host names without the domain name
175	  appended to the end.  For example use `foo' instead of
176	  `foo.bar.org'.  If, during the process of configuring
177	  the network interfaces, you make a mistake, you will
178	  be able to re-configure that interface by simply selecting
179	  it for configuration again.
180
181	* Mount target filesystems.  You will be given the opportunity
182	  to manually edit the resulting /etc/fstab.
183
184	* Extract binary sets from the media of your choice.
185
186	* Copy configuration information gathered during the
187	  installation process to your root filesystem.
188
189	* Make device nodes in your root filesystem.
190
191	* Copy a new kernel onto your root partition.
192
193	* Install a new boot block.
194
195	* Check your filesystems for integrity.
196
197First-time installation on a system through a method other than the
198installation program is possible, but strongly discouraged.
199