summaryrefslogtreecommitdiff
path: root/distrib/notes/pc532/install
blob: eb9ef919a18b892d80bbfaa139f7fe281ece6501 (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
(IF you already have OpenBSD/pc532 installed and you only want to update
your system, see the next section.)

To install OpenBSD/pc532, there are several things you need to know.
First, OpenBSD "autoconfigs" the scsi devices. inst{:--:}OSrev.fs has only
support for disks configured into the kernel. Starting the search at
SCSI address 0, lun 0 and increasing, the first disk found will be sd0
regardless of the address, the second will be sd1. KLONDIKE for example
has the following devices installed:

	sd0 -> ID 0 LUN 0: Quantum LP52S hard disk drive
	sd1 -> ID 1 LUN 0: Micropolis 4110 hard disk drive
	sd2 -> ID 2 LUN 0: Teac FC-1, 3.5" floppy disk drive
	sd3 -> ID 2 LUN 1: Teac FC-1, 5.25" floppy disk drive
	cd0 -> ID 3 LUN 0: Toshiba XM-4101TA CD-ROM drive
	st0 -> ID 4 LUN 0: Tandberg TDC3600 QIC tape drive

Only sd0-sd3 are supported by the inst{:--:}OSrev.fs kernel.

Next you need to know what the install script wants to do.  This install
is script on the ram disk root that can do most of the work of configuring
your disk.

  a) The script assumes your are using the first n sectors of your
	disk, where you can specify n.  It will allow you to create
	up to 5 file system partitions, one swap partition and one
	boot partition.

  b) You should know how many total sectors are on your disk.  The
	configure will report a head, track, and cylinder count, but
	I have found that on my disks, it reports something that makes
	a smaller disk than I really had.

  c) It is possible to have the install script make a partition
	over your save area AND not make a new file system, thus
	preserving what is there. Then, later you can make a new
	file system after you no longer need the stuff there. You
	will need to do only one boot to get things working from
	the disk.

The Install Procedure:

  a) Adjust your console device settings.
	The inst{:--:}OSrev.fs kernel will come up with 9600 baud, 7 bits,
	even parity and one stop bit. Adjust your terminal to match
	these settings. The monitor's baud rate can be changed with
	"baud d'9600".

  b) Get inst{:--:}OSrev.fs and boot the kernel.

	From Floppy: (and using the autoboot monitor)
	If you have a 1.44 meg SCSI floppy drive, you can put inst{:--:}OSrev.fs
	onto a 3.5" floppy disk. Insert the disk into your floppy
	drive and use the monitor's boot command to boot the default
	image from the floppy. The image booted will ask you for a
	kernel to load. Answer
		sdXa:/bsd
	Replace X with your drive number. For KLONDIKE X would be "2".

	Tape:
	You will need to load a copy of inst{:--:}OSrev.fs into RAM.
		- load the inst{:--:}OSrev.fs at 0x288000
		- run at 0x3E8820
	The boot program will ask you now for a kernel to load. Answer
		rd0a:/bsd

	Serial line:
	Provided with the distribution is source for program called 
	download.  (download.c)  This program when used as
	"download file" will read the contents of the file and
	output to standard output a byte sequence used by the pc532
	ROM monitor to download a binary file into RAM.  Using this
	program on a computer connected to the pc532, one can
	load a copy of inst{:--:}OSrev.fs into RAM at 0x288000.  The boot
	sequence is now the same as with tape.

  c) Choose a disk geometry.  For me, the reported geometry left
	some sectors "unallocated".  That is, the autoconfig message
	said the disk had 2428 cylinders, 9 heads, and 93 sectors/track.
	This gives a total of 2032236 sectors, but I knew that I had
	2053880 sectors.

	To help in this process, there is a program "factor" that is
	on the inst{:--:}OSrev.fs.  The usage is "factor number" and it lists
	the prime factors of number.
	For example, with the 2053880 sector disk I got:

	---->~/sd1

	steelhead[3]$ factor 2053880
	2053880: 2 2 2 5 51347

	Not many to choose from, so I tried ...

	---->~/sd1
	steelhead[4]$ factor 2053820
	2053820: 2 2 5 103 997

	Now I'd like to get about a meg per track:
	steelhead[5]$ echo "2 * 997"|bc
	1994

	Now I need the number of tracks (or cylinders):
	steelhead[5]$ echo "2 * 5 * 103"|bc
	1030

	So I ended up choosing 1030 cylinders, 1 head, 1994 sectors/track.
	I "lost" only 60 sectors, but got a "reasonable geometry".

  d) run "install"  -- it will ask you for the disk geometry and other
	questions.  It will ask you for the geometry and then ask you
	how many of those sectors you want to use for OpenBSD. It also
	wants to know the size of your boot partition (to be used with
	the auto-boot monitor), your root partition, your swap partition,
	and then any other partitions you may want.  For the "other"
	partitions, it will ask for a mount point.  The mount point will
	be "relative to /" and should not {:-include-:} the leading "/".  Also,
	IF you do not want the partition to have newfs run on it (that is
	it might be the last one and have a copy of inst{:--:}.fs) enter "NO"
	to the mount point and it will not run newfs on the partition.
	It will enter the partition into the disklabel.

  e) look around, if you want ... and then halt OpenBSD.

  f) reboot the machine.  Using the autoboot monitor, all you should have
	to do is give the ROM monitor command "boot".  The secondary
	UFS boot program eventually times out and auto-loads /bsd.
	You can get it to do it faster by hitting "return".
	If you are NOT using the autoboot monitor, it's time to warm
	up your eprom burner :-)

  g) Now it is time to load all the other files of the distribution:
	You can do this via --

	a) a TCP/IP link (slip, ppp or plip)
		you have ifconfig, slattach, route, netstat,
		hostname and ftp on the mini-root. You can even
		use nfs...
		Plip is only an option if you have installed a
		centronics port in your pc532.
		You do have access to vi to edit your network
		files. (/etc/resolv.conf, ...)

	b) floppy disk

	c) tape

	d) cdrom (If you have a CD with OpenBSD/532 ...)

	e) Use the ROM compatible "download" program.  The program
	   download is included in the initial installation and
           can be used as the receive end of the download by 
	   using it as "download -r file_to_write".  If the CRC is
	   correct, the file is retained.  If the CRC is not 
	   correct, the file is deleted.

	f) some other method? (Let me know about it.)

  h) Load the tgz files.  Choose a place to put them.  I would make
	a directory /gz.files and put them there.  If you are "short
	on space," you might want to load them and extract them one
	at a time.  A minimum installation is "base" and "etc".  It
	takes about 32 Megs installed + 15 Megs for the base{:--:}OSrev.tgz.

  i) Extract the tar files in /.  For example, if your *.tgz were
	in a directory /gz.files, to extract base{:--:}OSrev.tgz you would:

	- cd / 
	- tar -xpzf /gz.files/base{:--:}OSrev.tgz

	Add v to the flags if you want a verbose extract.

  j) Extract at least "base" and "etc" for a new installation.  For
	"update" extracts, don't extract "etc" directly unless you 
	have saved your current /etc tree.  For "full" installations,
	extract all files.

  k) Edit the information in /etc

	- hosts   -  host name and address information
	- myname  -  your host name
	- mygate  -  hostname of gateway (assuming you have one)
	- resolv.conf - which nameserver to use
	- hostname.{sl0,ppp0,plip0} - interface hostname
	- netstart - configures the network and says if sendmail should
			be started
	- ttys    -  make sure the console entry has the correct speed
	- gettytab - I find "ap" instead of "ep" in the default entry
			works better for me.
	- fstab	  -  make sure it includes all partitions you want mounted
	- localtime - this is usually a link into /usr/share/zoneinfo

	Now you can adjust the kernel's default baud rate to match your
	monitor's default baud rate. Do the following:
		gdb -w /bsd
		set scndefaultrate = YOUR_BAUD_RATE
		quit
	where YOUR_BAUD_RATE is the actual value, 19200, 38400 or
	something slower than 9600.
	If you set scndefaultrate to something bogus, you'll probably
	not be able to reboot... So be careful!
	

  l) Reboot the machine and it should come up in multi-user mode *IF*
	you got it configured correctly.

  m) Enjoy!  And help fix bugs and improve OpenBSD/pc532!