install revision 1.7 1 Installing NetBSD is a relatively complex process, but if you have
2 this document in hand it shouldn't be too much trouble.
3
4 There are several ways to install NetBSD onto a disk. If your Sparcstation
5 is hooked up in a network you can find find a server and arrange for a
6 diskless setup which is a convenient way to install on a machine with
7 a single disk attached. Alternatively, you could use SunOS (booted from
8 a local disk) and install NetBSD onto a second disk. For the latter method,
9 skip to the section "Installing from SunOS" below.
10
11
12 Installing using a diskless setup.
13
14 First, you must setup a diskless client configuration on a server. Consult
15 your server installation documents on how to proceed with this.
16 Put all the *.tar.gz files you want to install into the root directory
17 for your client on the server.
18
19 Next, unpack base.tar.gz on the server in the root directory for your machine.
20 If you elect to you a separately NFS-mounted filesystem for `/usr' on your
21 diskless setup, make sure the "./usr" base files in base.tar.gz end up
22 in the correct location. One way to do this is to temporarily use a loopback
23 mount on the server, re-routing <root>/usr to your server's exported
24 NetBSD "/usr" directory. Also put the kernel into the root directory.
25
26 A few configuration files need to be edited:
27
28 <root>/etc/hosts
29 Add the IP addresses of both server and client.
30
31 <root>/etc/myname
32 This files contains the client's hostname; use the same
33 name as in <root>/etc/hosts.
34
35 <root>/etc/fstab
36 Enter the entries for the remotely mounted filesystems.
37 For example:
38 server:/export/root/client / nfs rw 0 0
39 server:/export/exec/sun4.netbsd /usr nfs rw 0 0
40
41 Now you must populate the the `/dev' directory for your client. If you server
42 runs SunOS 4.x, you can simply change your working directory to `<root>/dev'
43 and run the MAKEDEV script: `sh MAKEDEV all'.
44
45 On SunOS 5.x systems, MAKEDEV can also be used, but there'll be error
46 messages about unknown user and groups. These errors are inconsequential
47 for the purpose of installing NetBSD. However, you may want to correct them
48 if you plan to the diskless setup regularly. In that case, you may re-run
49 MAKEDEV on your NetBSD machine once it has booted.
50
51 Boot your workstation from the server by entering the appropriate `boot'
52 command at the monitor prompt. Depending on the PROM version in your machine,
53 this command takes one of the following forms:
54
55 > b le()netbsd -s # for sun4 monitors
56 ok boot le()netbsd -s # for version 1 OpenBOOT ROMs
57 ok boot net netbsd -s # for version 2 OpenBOOT ROMs
58
59 This will boot the NetBSD kernel in single-user mode.
60
61 [[
62 NOTE: the latter two examples assume you operate the OpenBOOT ROM in
63 "new command mode". If your machine comes up and gives you a `>' prompt
64 instead of `ok', type:
65
66 >n # enter native OpenBOOT mode
67 ok setenv sunmon-compat? false # make it permanent
68 ok
69 ]]
70
71 If you use a diskless setup with a separately NFS-mounted /usr filesystem,
72 mount /usr by hand now:
73
74 netbsd# mount /usr
75
76 At this point, it's worth checking the disk label and partition sizes on
77 the disk you want to install NetBSD onto. NetBSD understands SunOS-style
78 disklabels, so if your disk was previously used by SunOS there will be
79 a usable label on it. Use `disklabel -e <disk>' (where <disk> is the
80 device name assigned by the NetBSD kernel, e.g. `sd0') to view and
81 modify the partition sizes. A comfortable size for the root filesystem
82 partition is about 20MB; a good initial size for the swap partition is
83 twice the amount of physical memory in your machine (though, unlike
84 SunOS 4.x, there are no restrictions on the size of the swap partition
85 that would render part of your memory unusable). A full binary installation
86 takes about 60MB in `/usr'. Make all your partitions start and end on
87 cylinder boundaries.
88
89 NOTE: if you are installing on a SCSI disk that does *not* have a SunOS
90 or NetBSD label on it, you may still be able to use disklabel(8) but you'll
91 have to create all partitions from scratch. If your disk is listed in
92 `/etc/disktab', you may use the entry (which in most cases only defines
93 a `c' partition to describe the whole disk) to put an initial label on
94 the disk.
95
96
97 If you are upgrading a NetBSD installation, start the upgrade script:
98
99 #netbsd ./upgrade.sh
100
101 else, start the installation procedure:
102
103 netbsd# ./install.sh
104
105
106 These scripts will do most of the work of transferring the system from the
107 tar files onto your disk. You will frequently be asked for confirmation
108 before the script proceeds with each phase of the installation process.
109 Occasionally, you'll have to provide a piece of information such as the
110 name of the disk you want to install on or IP addresses and domain names
111 you want to assign.
112
113 The installation script goes through the following phases:
114
115 - determination of the disk to install NetBSD on
116 - checking of the partition information on the disk
117 - creating and mounting the NetBSD filesystems
118 - setup of IP configuration
119 - extraction of the distribution tar files
120 - installation of boot programs
121
122
123 Now try a reboot. (If needed, swap your scsi id's first). Initially
124 I'd suggest you "boot sd()netbsd -bs", then try multiuser after that.
125 if you boot single-user the NetBSD incantation to make the root
126 filesystem writable is
127
128 netbsd# mount -u /dev/sd0a /
129
130 The Sun monitor normally tries to load a file called "vmunix". On
131 OpenBOOT ROM systems you can change it to load NetBSD instead using
132 the following commands:
133
134 On version 1 OpenBOOT ROMs:
135 >n
136 ok setenv boot-from sd(0,0,0)netbsd
137 ok
138
139 On version 2 OpenBOOT ROMs:
140 ok setenv boot-file netbsd
141 ok setenv boot-device /sbus/esp/sd@0,0
142
143
144 Congratulations, you have successfully installed NetBSD 1.0. When you
145 reboot into NetBSD, you should log in as "root" at the login prompt.
146 There is no initial password, but if you're using the machine in a
147 networked environment, you should create yourself an account and
148 protect it and the "root" account with good passwords.
149
150 Some of the files in the NetBSD 1.0 distribution might need to be
151 tailored for your site. In particular, the /etc/sendmail.cf file will
152 almost definitely need to be adjusted, and other files in /etc will
153 probably need to be modified. If you are unfamiliar with UN*X-like
154 system administration, it's recommended that you buy a book that
155 discusses it.
156
157
158
159 Installing from SunOS.
160
161 You need a SunOS machine to install NetBSD. You also need at
162 least the following pieces:
163
164 the *.tar.gz files you want to install (as a minimum, base.tar.gz)
165 gzip (GNU gzip) SunOS binary
166 gtar (GNU tar) SunOS binary
167 the "install.sh" script
168 a "/boot" file from a SunOS sun4c machine
169 a kernel, most likely "/netbsd"
170
171 All these pieces, except "/boot", are supplied in the NetBSD/sparc
172 distribution.
173
174 You need to format and partition the disk using SunOS (since
175 NetBSD/sparc uses SunOS disk labels.) Give yourself adequate
176 partition sizes. Here is an example layout:
177
178 partition size offset will be..
179 sd2a 28140 0 /
180 sd2b 16170 28140 swap
181 sd2c 204540 0 `whole disk'
182 sd2g 160230 44310 /usr
183
184 BTW, These are not recommended sizes. They simply match the first
185 (tiny) disk that NetBSD/sparc ran on.
186
187 Use SunOS to newfs the partitions which will have filesystems on them.
188 (NetBSD's filesystem format is identical to SunOS).
189
190 sunos# newfs /dev/rsd2a
191 [... lots of output]
192 sunos# newfs /dev/rsd2g
193 [... lots of output]
194
195 NOTE: If you are able to, there is a performance benefit from
196 newfs'ing using NetBSD. If you newfs using the NetBSD newfs command,
197 be sure to use the -O flag for your / partition, so that newfs will
198 use the 4.3BSD filesystem format, rather than the new 4.4BSD filesystem
199 format. If you forget, you will not be able to boot -- the SunOS boot
200 blocks do not understand the extended 4.4BSD filesystem format.
201
202 Mount those partitions in a tree formation, under /mnt; ie:
203
204 sunos# df
205 Filesystem kbytes used avail capacity Mounted on
206 [...]
207 /dev/sd2a 11501 0 11501 0% /mnt
208 /dev/sd2g 179529 0 179529 0% /mnt/usr
209
210 Place a standard SunOS "/boot" program in /mnt (your new root
211 partition), and use the SunOS command "installboot" to make it work.
212 The installboot man page says to do something like this:
213
214 sunos# cp /boot /mnt/boot
215 sunos# /usr/mdec/installboot -vlt /mnt/boot /usr/mdec/bootsd /dev/rsd2a
216
217 You can now extract the provided "*.tar.gz files onto your disk. The
218 provided script, "install.sh" will help you:
219
220 sunos# ls -FC
221 base.tar.gz etc.tar.gz man.tar.gz secr.tar.gz
222 comp.tar.gz games.tar.gz misc.tar.gz text.tar.gz
223 install.sh netbsd.id3_scsi
224 sunos# ./install.sh
225 [...]
226
227 This script NEEDS gzip and gtar (GNU gzip and GNU tar) on your
228 execution path! The tar files are in a "new format" that includes
229 directory information, and SunOS tar will not read them. Statically
230 linked versions of these programs for SunOS are supplied in the
231 distribution.
232
233 After the files have been extracted, repair /mnt/etc/fstab to match
234 your actual disk layout. (Minus the "/mnt" component of each path, of
235 course :-)
236
237 Now proceed to reboot the machine as described above in "Installing
238 using a diskless setup".
239