summaryrefslogtreecommitdiff
path: root/distrib/notes/pmax/install
blob: 032da0def16fcdd95396b0d06489b4c0bff06ad9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
Installing OpenBSD is a relatively complex process, but if you have
this document in hand it shouldn't be too much trouble.

Also i wanted to note that the installation procedure via install
script is new for the pmax and i had only the chance of limited
testing for it - so if you run into any problems with it or if this
documentation is somehow unclear - please send me a mail and I'll try
to help you or to fix the problem.

There are several ways to install OpenBSD onto a disk. The easiest way
in terms of preliminary setup is to use the OpenBSD simpleroot that can
be booted off your local disk. Alternatively, if your Decstation is
hooked up in a network you can find a server and arrange for a diskless
setup which is another convenient way to install OpenBSD/pmax.


Installing using the OpenBSD simpleroot.

The simpleroot is a self-contained OpenBSD filesystem holding a complete
OpenBSD/pmax root filesystem plus all utilities necessary to install
OpenBSD on a local disk. It is distributed as a plain file designed to
be transferred to a raw disk from which it can be booted using the
appropriate PROM command.

Loading the simpleroot onto your raw partition is simple. You can do
this on any machine you can hang on the disk which you plan to put
onto the pmax which allows you to write to the raw disk - i.e. on all
UN*X like operating systems it should work using "dd". On OpenBSD
as well as SunOS you use a command like:

	# dd if=simpleroot22.fs of=/dev/rsd0c bs=20b conv=sync

Especially on OpenBSD/pmax you'll have to use /dev/rrz0c or something
like that instead of /dev/rsd0c.

Keep in mind that this will overwrite the contents of that disk!

After transferring the simpleroot to disk, bring the system down by:

	# halt

and hang the disk onto the pmax you want to install OpenBSD/pmax on.
Then boot the simpleroot by typing the appropriate command at the PROM:

	>> boot rz(0,0,0)/bsd		# for Decstation 2100/3100

or

	>> boot 5/rz0a/bsd		# for Decstation 5000's

If you've loaded the simpleroot onto some other disk than `rz0' adapt
the boot specifier accordingly.

This will cause the kernel contained in the simpleroot to be booted.
After the initial probe messages you'll asked to choose a shell with
sh as default. Simply type Return here and you are in single user
mode. For further instructions please read on in the "Continuing the
installation from single user mode" below.

Note: if booting the kernel in the miniroot should not work - there are
      two kernels part of the distribution - look at the place you got
      the distribution from - the kernels are there also - so you can
      see which kernels there are - usually there should be 3 of them

        * bsd - a generic kernel which should ask for the root device
        * bsd.rz0 - generic kernel with root and swap fixed to rz0
                    don't ask me why - but this should be usable then
                    installing from a simpleroot on a zip disk (which
                    is usually rz5 or rz6 - bsd crashes here :-)
        * bsd.nfs - a generic kernel with root and swap configured
                    to be on nfs (also this kernel is in ecoff and not
                    in a.out format so that it can be netbooted with a
                    pmax)


Installing using a diskless setup.

First, you must setup a diskless client configuration on a server. If
you are using a OpenBSD system as the boot-server, have a look at the
diskless(8) manual page for guidelines on how to proceed with this.
If the server runs another operating system, you'll have to consult
documentation that came with it (on SunOS systems, add_client(8) is a
good start).

One part of the distribution of OpenBSD/pmax is a file called
simpleroot22.tar.gz which is a good start for the root filesystem area on
the NFS server then you want to install via network.

A few configuration files need to be edited:

	<root>/etc/hosts
		Add the IP addresses of both server and client.

	<root>/etc/myname
		This file contains the client's hostname; use the same
		name as in <root>/etc/hosts.

	<root>/etc/fstab
		Enter the entries for the remotely mounted filesystems.
		For example:
			server:/export/root/client       /     nfs  rw 0 0

Now you must populate the the `/dev' directory for your client. If you
have an intelligent tar command on the NFS server the /dev directory
inside the simpleroot22.tar.gz should be usable (i.e. containing
special devices and not only files) - else you'll have to remake the
devices on the server using

	cd /export/root/client/dev
	mv MAKEDEV* ..
	rm -rf *
	mkdir fd
	mv ../MAKEDEV* .
	./MAKEDEV all

This may not not work correctly on some operating systems.

Ok here is in short form what you have to do on the Server to prepare a
diskless installation of OpenBSD/pmax assuming the Server is an
OpenBSD machine (for instance a PC running OpenBSD/i386). As said
above for other systems you'll have to look into the supplied
documentation for that systems. All the following should apply also
without any major changes to an FreeBSD or NetBSD server.

If the following instructions are not enough - you may look at the
man pages for the following commands:

* tftpd
* rarpd
* bootpd
* rpc.bootparamd

Ok - now let's see what to do to set up the server:

* set up a file /etc/ethers containing the ethernet hardware address
  of the pmax you want to boot via net and it's hostname (the hardware
  address you should get via PROM commands)

  example:
  --- snip ---
  08:00:2b:1a:4b:41       summer
  --- snip ---

* add an entry to /etc/bootptab which looks like the following:
  --- snip ---
  .ris.dec:hn:vm=rfc1048
  summer:ht=ethernet:ha=08002b1c4d51:ip=10.0.0.5:bf=/bsd
  --- snip ---

* make shure that the following line in /etc/inetd.conf is not
  commented out:
  --- snip ---
  tftp           dgram   udp     wait    root    /usr/libexec/tftpd tftpd -s /tftpboot
  --- snip ---
  if it is commented out (which is the default on OpenBSD for security
  reasons) - uncomment it and send the inetd process and HUP signal

    kill -HUP `cat /var/run/inetd.pid`

  so that it rereads the /etc/inetd.conf file

* untar the simpleroot.tar.gz on the server in an nfs exported
  directory - for instance /export/root - so /etc/exports should
  contain a line like (OpenBSD syntax !)
  --- snip ---
  /export -alldirs -root=0:0 summer
  --- snip ---
  for the example above - on OpenBSD the tar should be intelligent
  enough to unpack the /dev directory correctly - on other systems you
  may look at the comment about /dev above. So what you have to do in
  this example you have to do:
    
    mkdir /export/root
    cd /export/root
    tar xvpzf /some_path/simpleroot22.tar.gz
    vi /etc/exports (to add the above line)
    kill -HUP `cat /var/run/mountd.pid` (so that mountd rereads exports)

  Note: also make shure that the server is configured as nfs server -
        i.e. for OpenBSD "option NFSSERVER" for the kernel and the
        following set in /etc/netstart:
        --- snip ---
	nfs_server="YES"
        nfs_client="YES"
        --- snip ---

* create an swapfile using (example 16 mbytes):

    cd /exports
    dd if=/dev/zero of=swap bs=1024k count=16

* copy the kernel from the /export/root area to the tftp area:

    mkdir /tftpboot
    cp /export/root/bsd_nfs /tftpboot

* create a /etc/bootparams file - for example:
  --- snip ---
  summer  root=prospero:/export/root \
          swap=prospero:/export/swap
  --- snip ---
  prospero is the hostname of the server in this example

* start the required daemons on the server:

    /usr/sbin/rpc.bootparamd
    /usr/sbin/rarpd -a

  and bootpd - either by uncommenting the entry in /etc/inetd.conf and
  sending inetd an HUP signal like above or by starting it explicitly

    /usr/sbin/bootpd

* now you should be able to boot the pmax using:

    >> boot -f tftp()/bsd_nfs

  for 2100/3100 systems or

    >> boot 6/tftp

  for a 5000/200 - look into the manual of your pmax for details how
  to boot via tftp

If you plan to use OpenBSD/pmax on a diskless system in the future -
keep in mind that the Decstations can only boot ecoff format kernels
via net - so you have to convert them explicitly after the kernel
compilation to ecoff - therefor in the kernel compile dir you can do
the following after the kernel compile has finished

  elf2ecoff bsd.elf bsd.ecoff

then you can use the bsd.ecoff for netbooting - as a starting point for
the kernel config file you may choose GENERIC_NFS.

After you have set up everything correctly you can boot your system
over the network into singleuser mode and continue the installation.


Continuing the installation from single user mode

If you have reached single user mode either via booting the
simpleroot image or via booting over the network you will have to
relabel/label your disk and put filesystems on the partitions.

So here's what you have to do after going into single user mode:

- simpleroot image (assuming you have the simpleroot on rz0 and want
  to install on that disk too - everything behind the ";" is comment)

	# fsck /dev/rrz0a		; check the filesystem
	# mount /dev/rz0a /		; mount / read write
	# ./install

- network boot

	# ./install

This script should bring you to a completely installed OpenBSD/pmax
system (in theory :-) - if you should run into any problems while
installing - please first look at

  http://www.OpenBSD.org/pmax.html

I'll try to collect there any hints, fixes and so on. If your problem
can't be solved that way just send me a mail to graichen@OpenBSD.org
and I'll try to help you fixing it.

If you should somehow fail using the install script and want to
restart - you may have to umount any filesystems mounted while running
the install script (so all except /) and clean /tmp using:

  rm /tmp/.??* /tmp/??*

then it should be possible to rerun it again.

Now some more notes about labeling the disk - which you will have to
do in the process of running the install script.

Here follows an example of what you'll see while in the disklabel editor.
Do not touch any of the parameters except for the `label: ' entry and
the actual partition size information at the bottom (the lines starting
with `a:', `b:', ...).

If you are using the simpleroot image and want to install onto the
same disk you put the simpleroot on you'll also have to change the
sector, track, cylinder, etc. entries to match the values for your
disk. The Problem is to get those values for your disk :-) - you can
either look into the /etc/disktab file for an matching entry or boot
another verbose system like OpenBSD/i386 with your disk attached an
see what it prints out about the geometry of the disk. Also you can
get the total size of your disk from the bootup output of the
Decstation - look for lines like:

rz0 at sii0 drive 0 slave 0 SEAGATE ST1480 rev 7336, 832527 512 byte blocks

here 832527 is the number of total sectors on that disk.

The size and offset fields are given in sector units. Partitions on
which you intend to have a mountable filesystem, should be given
fstype `4.2BSD'. Remember, the `c' partition should describe the whole
disk. The `(Cyl. x - y)' info that appears after the hash (`#')
character is treated as a comment and need not be filled in when
altering partitions.

Special note: the line containing `8 partitions:' is best left alone,
even if you define less then eight partitions. If this line displays
a different number and the program complains about it (after you leave
the editor), then try setting it to `8 partitions:'.

Ok - now lets see how the default disklabel of the simpleroot image
looks like:

<BEGIN SAMPLE DISKLABEL SCREEN>
OpenBSD# disklabel rz0
 # /dev/rrz0c:
type: SCSI
disk: simpleroot
label: 
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 96
total sectors: 196608
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    65536        0    4.2BSD     1024  8192    16   # (Cyl.   0 - 32*)
  b:   131072    65536      swap                        # (Cyl.  32*- 96*)
  c:   196608        0    unused     1024  8192         # (Cyl.   0 - 96*)
<END SAMPLE DISKLABEL SCREEN>

ok - and now let's see how it looks like if it is adapted for the rz0
disk above (SEAGATE ST1480).

<BEGIN SAMPLE DISKLABEL SCREEN>
OpenBSD# disklabel rz0
 # /dev/rrz0c:
type: SCSI
disk: SEAGATE ST1480 r
label: 
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 11
sectors/cylinder: 693
cylinders: 832527
total sectors: 832527
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:    65536        0    4.2BSD     1024  8192    16   # (Cyl.   0 - 94*)
  b:   131072    65536      swap                        # (Cyl.  94*- 283*)
  c:   832527        0    unused     1024  8192         # (Cyl.   0 - 1201*)
  d:   635919   196608    4.2BSD     1024  8192    16   # (Cyl. 283*- 1201*)
<END SAMPLE DISKLABEL SCREEN>

I hope you got the idea now - maybe it'll take some experiments until
you get it right :-). One thing to note here is that you can't change
the a and b partitions if you are relabeling the disk you are running
the simpleroot on - you'll have to accept the simpleroot values here
for those 2 partitions.

Note: if you have finished the disklabeling and exited the editor for
editing the label in the process of the installation and if you then
get a message like: "no disklabel on disk - use the -r option to write
one" you should ignore it and answer no to the question if you want to
re-edit the disklabel - this is due to a problem with the pmax
disklabel code and it should be worked around by the install script.

So what does the install script explicitly do ?

These script will do most of the work of transferring the system from the
tar files onto your disk. You will frequently be asked for confirmation
before the script proceeds with each phase of the installation process.
Occasionally, you'll have to provide a piece of information such as the
name of the disk you want to install on or IP addresses and domain names
you want to assign.

The installation script goes through the following phases:

	- determination of the disk to install OpenBSD on
	- checking of the partition information on the disk
	- creating and mounting the OpenBSD filesystems
	- setup of IP configuration
	- extraction of the distribution tar files
	- installation of boot programs

If the installation worked fine we can go on.

Now try a reboot.  (If needed, swap your scsi id's first).  Initially
I'd suggest you "boot" (Decstation 2100/3100) or "boot/rz0a/bsd", then
try multiuser after that. if you boot single-user the OpenBSD
incarnation to make the root filesystem writable is

    OpenBSD# fsck -p
    OpenBSD# mount -u /dev/rz0a /

assuming your rootdisk is rz0.

Congratulations, you have successfully installed OpenBSD 2.3.  When you
reboot into OpenBSD, you should log in as "root" at the login prompt.
There is no initial password, but if you're using the machine in a
networked environment, you should create yourself an account and
protect it and the "root" account with good passwords.

Some of the files in the OpenBSD 2.3 distribution might need to be
tailored for your site.  In particular, the /etc/sendmail.cf file will
almost definitely need to be adjusted, and other files in /etc will
probably need to be modified.  If you are unfamiliar with UN*X-like
system administration, it's recommended that you buy a book that
discusses it.

I am very interested in reports of how the installation worked - so if
you got OpenBSD/pmax installed (or if you have problems doing this)
please send a mail to me: graichen@OpenBSD.org - thanks.