prep.RISCOS revision 1.2 1 $NetBSD: prep.RISCOS,v 1.2 2002/02/15 23:22:45 reinoud Exp $
2
3 These instructions are specific to NetBSD/acorn32 on Acorn RISCOS platforms
4 (RiscPC/A7000/A7000+/NC's).
5
6 0 Before you start
7
8 Read this document and any other accompanying documentation
9 completely before continuing.
10
11 1 Requirements
12
13 1.1 Hardware
14
15 Refer to the NetBSD installation notes for a list of supported hardware.
16
17 1.2 Software
18
19 You will need the following RiscOS software:
20
21 A program that will unpack sparchives. We recommend that you
22 get David Pilling's !SparkPlug. A selfextracting version of this
23 can be found at David Pilling's W3 site
24 (http://www.pilling.demon.co.uk/free.html).
25
26 A program that can uncompress gzip files for the current bootloader
27 can't read gzip'ed kernels (yet!).
28
29 The included command line gzip program gzip_ff8 (!)
30 wich is a mirror a version that Laurent Domisse has
31 patched to work on SA. This is also available from:
32 http://www.users.dircon.co.uk/~arcangel/files/index.html
33 Just set the type of the file to `ff8'.
34
35 SparkFS from David Pilling (commercial) (v1.28 for
36 SA-110).
37
38 !Gzip from HENSA (micros.hensa.ac.uk); is it still alive
39 though?
40
41 A program to report your disk's geometry:
42
43 Not really needed you can simply boot the installation
44 kernel and look for the geometry in the boot messages.
45
46 Sergio Monesi's fsck suite (a good thing to have around
47 anyway). Available from:
48 http://cdc8g5.cdc.polimi.it/~pel0015/fsck.html
49
50 !Zap (The read disk facility). Available from HENSA.
51
52 The partition software/formatter for your desired installation
53 target:
54
55 IDE disks on motherboard interface: !HForm
56 IDE disks on Simtec interface: UNKNOWN
57 IDE disks on ICS interface: UNKNOWN
58 IDE disks on RapIDE interface: UNKNOWN
59 Acorn SCSI cards: ScsiDM
60 Power-tec SCSI cards: !PowerMgr
61 Cumana SCSI-2: !SCSIMgr
62 oak SCSI-1 card: UNKNOWN
63 MCS Connect32 SCSI: UNKNOWN
64 Morley SCSI: UNKNOWN
65
66 Additionally you will require the following :
67
68 An installation kernel for your platform:
69
70 RiscPC/A7000(+)/NC's : INSTALL kernel
71
72 The Bootloader and RiscOS tools: BtNetBSD.tar.gz or BtNetBSD.zip
73 as found in the installation/misc directory. (This should be
74 pre-extracted if you're installing from CD-ROM).
75
76 The NetBSD/acorn32 distribution sets (Will be on the CD-ROM, or
77 available from your nearest NetBSD ftp site).
78
79 A hardcopy of this document, along with a hardcopy of the
80 NetBSD installation instructions "INSTALL").
81
82 2 Preparing your hard disk
83
84 Terms:
85
86 Device: The actual physical hard disk
87 Partition: A section of a device.
88 File system: A structured partition that is able to hold files.
89 Disc: A RiscOS file system in a partition. There can be
90 more than one Disc per Device.
91
92 You will have to decide which device you wish to install NetBSD on.
93 You will also have to decide whether you want to split the device
94 between one or more RiscOS discs and NetBSD or dedicate a whole
95 device for NetBSD.
96
97 In making this decision you should consider the possibility that if
98 NetBSD is incorrectly configured on a shared device then your shared
99 data is at risk.
100
101 It is still recommended that if you decide to dedicate a device to
102 NetBSD that you set aside a small RISC OS partition at the beginning
103 of the device. This is a useful place to store the RiscOS side of
104 NetBSD, and will make the use of UnixFS easier to configure. If you
105 do decide to create a minimal RiscOS partition at the beginning of
106 the device, a size of 10-20 MB is recommended (some partitioning
107 software has problems with partitions smaller than this).
108
109 The point is that you will have to repartition your device to make
110 room for a separate partition after the RISC OS one for NetBSD. This
111 means backing up your device, re-partitioning it and then copying all
112 the data back afterwards. We recommend that you only copy the needed
113 data back and put off installing the rest until you have NetBSD up
114 and running. This way you will save yourself a lot of work if
115 something goes wrong and you have to start all over again.
116
117 2.1 Sharing your device
118
119 2.1.1 Acorn IDE
120
121 Use !HForm for this interface. This is a program that is delivered
122 with your computer and is located in the Utilities directory on your
123 harddisc.
124
125 With this software you only have the possibility of using one
126 partition for RISC OS, so you have to set the rest aside for NetBSD.
127
128 Use this procedure to set up your device:
129
130 Start !HForm by double-clicking on it's icon.
131
132 Choose the "custom" or "other" option when prompted (usually
133 the last).
134
135 Use the default values for the geometry but do not enter the
136 full number of cylinders. Just enter the number you want to
137 use for RISC OS. Make a note of this number.
138
139 Continue to accept the default answers until you're asked
140 whether you want to format or initialise, choose initialise.
141
142 Go to the section about running bb_riscbsd.
143
144 2.1.2 Cumana SCSI-2 card
145
146 It is recommended that you use a newer version of !SCSIMgr (newer
147 than v1.55) since this will be easier to use when you want to leave
148 part of the device unused by RISC OS. You should check for the latest
149 version of this software at the following URL:
150 http://www.cumana.demon.co.uk
151
152 You need to create one or more RISC OS partitions, and you do it in
153 in the following way:
154 Run !SCSIMgr by double-clicking on it.
155
156 Select the device you wish to repartition.
157
158 Click on the clear icon in the partitions subwindow.
159
160 This will give you a dialogue box where you can specify the
161 size of the RISC OS partitions. Do not select all since you
162 want to use part of it for NetBSD.
163
164 Enter the amount of the device you wish to reserve for
165 RiscOS. This will be the whole device size less the amount
166 you want to reserve for NetBSD. Make a note of this number.
167
168 If you like, split the RISC OS portion of the device into
169 several partition (you should only "see" the RiscOS portion).
170
171 Click on Execute when you are happy with the partions. This
172 will create your partitions, and wipe you device.
173
174 Go to the section about running bb_riscbsd.
175
176 2.1.3 Alsystems Power-tec SCSI-2 card
177
178 You must use the !PowerMgr program to partition the device.
179
180 The RISC OS partitions should be called RiscOs:, and the NetBSD one
181 should be called Empty:.
182
183 Here is the procedure you should use:
184 Start !PowerMgr by double-clicking on its icon.
185
186 Click on advanced in the main window
187
188 Click on Define/create partitions
189 Click on the device you want to set up for NetBSD
190
191 Set up the RISC OS partitions as RiscOs: and the
192 remaining one as Empty:
193
194 Click on each figure and press RETURN
195
196 Click on partition drive
197
198 Click on yes to warning as you really want to wipe
199 the device
200
201 Click on yes to proceed, this will lead you to the
202 partition init.
203
204 Partition init
205 Set a tick on all RiscOs: partitions, give them a name
206 and set LFAU to auto.
207
208 Unset the tick on your Empty: partition.
209
210 Click on Inititialize selected partitions.
211
212 Click on yes to proceed init as you want to wipe the
213 selected partitions
214
215 Click on yes to proceed to configure
216
217 Configure
218 Here you should set up the RISC OS partitions as you
219 like them. Normally the default will be ok.
220
221 Click on configure. This will configure your computer
222 and give you access to the Discs.
223
224 You *Must Not* run bb_riscbsd
225
226 2.1.4 Acorn SCSI card
227
228 You can only have one RISC OS partition with this card. The rest has
229 to be set aside for NetBSD.
230
231 This card does not have a friendly WIMP-based interface on the SCSI
232 management program, but the command line version is very good. You
233 should run this in a task window (press CTRL-F12):
234 dir <location_of_scsidm>
235
236 scsidm
237
238 You will get the following prompt:
239 scsidm>
240
241 Now you should enter the following commands:
242 probe (to see which devices are available)
243
244 device <no> (replace <no> with the no of your device)
245
246 section (to divide the device between RISC OS and
247 NetBSD)
248 Answer yes to the question:
249 Include RISCiX partitions?
250
251 Enter the size of the RISC OS area in blocks
252 (sectors)
253
254 SCSIDM will round this up to the nearest cylinder
255 boundary.
256
257 Answer yes to the question:
258 Do you really want to section device <no>?
259
260 This will section the device into two partitions.
261
262 quit
263
264 Go to the section on running bb_riscbsd
265
266 2.1.5 Other interfaces
267
268 It may not be possible to partition devices on other interface. If
269 you are using a different interface you have 2 options:
270 Try to work out how to partition devices on it
271
272 Use the entire device for NetBSD
273
274 2.2 Using a whole device for NetBSD
275
276 As a safety precaution NetBSD/acorn32 looks for a filecore bootblock
277 at the beginning of any device it labels. If it finds one and it
278 looks as though it is in use then NetBSD/acorn32 will not touch it.
279
280 Because of this, if you've ever used your device for RiscOS, you will
281 need to invalidate this bootblock.
282
283 To do this you need to:
284 Be absolutely sure you want to do this
285
286 run bb_trash and follow the instructions
287
288 Ensure that this device is now not configured for RiscOS.
289
290 You are now ready to boot NetBSD and continue the installation.
291
292 3 Running bb_riscbsd
293
294 When you run this program, you will first be asked whether you are
295 installing to an ADFS drive or a SCSI drive. You can just press A or
296 S respectively. (The bb_riscbsd program assumes that you are using a
297 non-Acorn SCSI card, so if you are using an Acorn card, then you may
298 have to edit this program and replace CSI_DiscOp with SCSIFS_DiscOp.)
299
300 Then you will be asked which disc you want to install NetBSD on. This
301 *must* be the first disc on the device. bb_riscbsd will now
302 scrutinize the device and see how it has been laid out.
303
304 It will then tell you how much of the device is occupied by RiscOS in
305 cylinders, and you will then be asked for the NetBSD starting
306 cylinder. Normally you should just enter the number given to you
307 since the RISC OS starting cylinder is 0 and therefore the last
308 cylinder in use is one less than the figure given. If no figure is
309 displayed, then your partitioning software failed to fill in the
310 bootblock completely (it doesn't have to do this for you but most do)
311 or you selected the wrong device. If you are convinced that this is
312 the correct device then you must calculated a cylinder offset using
313 the numbers noted down during partitioning (if it is not a whole
314 number *always* round up, you might waste a little of the device but
315 it'll all be safe).
316
317 Make a note of this number.
318
319 bb_riscbsd will make a backup of the original bootblock, but it
320 can be non-trivial to put it back.
321
322 4 Booting
323
324 Now that your device is ready for the installation you need to
325 unpack the bootloader archive (bootloader.arc, if you're installing
326 from CD-ROM then this should be unpacked already), copy it to your
327 harddisk and run the bootloader (!BtRiscBSD).
328
329 4.1 Configuring !BtRiscBSD before installation
330
331 !BtRiscBSD should come configured ready for installation.
332
333 4.2 Running !BtRiscBSD
334
335 Double click on the !BtRiscBSD icon and then on the iconbar icon to
336 open the Configuration window.
337
338 Drag the kernel for your platform to the kernel name box and hit boot.
339
340 NetBSD should now start to boot, install NetBSD as per the NetBSD
341 installation notes.
342
343 4.3 Configuring !BtRiscBSD after installation
344
345 Run !BtRiscBSD as before and bring up the configuration window.
346
347 Set the kernel as UnixFS:$.netbsd and set the native boot option (if
348 the boot fails use a copy of the installed kernel (/netbsd) from
349 RiscOS.
350
351 Set "Root device", "swap device" to the partitions you used for the
352 installation.
353
354 Set multi user mode.
355
356 Ensure the RAMDISK is set to 0.
357
358 Click save.
359
360 Click Boot.
361
362 5 Advanced stuff
363
364 5.1 Using UnixFS to copy the sets.
365
366 Once the required sets are installed and you can boot from your
367 newly installed NetBSD setup, you can use UnixFS to copy the
368 remaining sets from RiscOS to NetBSD.
369
370 In order to be able to use unixfs to transfer the sets you must have
371 a certain setup.
372
373 1) You must have the RiscOS disc that corresponds to the NetBSD
374 device configured (eg *con. IDEdiscs 2) even if it has no RiscOS
375 section.
376 2) If you have RISC OS 3.5 without the new FileCore, then you must
377 also have the NetBSD file system *completely* below the 511 MB
378 boundary of the device.
379 3) You must know the SWI base of the <filesys>_DiscOp SWI. Here
380 <filesys> is SCSIFS, SCSI or ADFS depending upon which controller
381 type you have you NetBSD device on.
382 Some common ones:
383 Power-tec SCSI-2 card: &40980
384 RapIDE: &4BBC0
385
386 There are small obey files for some interfaces supplied with UnixFS.
387 4) Have given the directory you want to write into write permission for
388 everyone. This should have been done above. For example to make
389 /usr/distrib world writable type (as root):
390 chmod 1777 /usr/distrib
391
392 To mount a Unix partition:
393
394 1) Double-click on the unixfs_res module to load it.
395 2) Run a unixfs_mount command to mount the partition.
396 3) Open the root directory by double-clicking on the openroot file.
397 4) Open the distrib directory and just copy the sets to this.
398 5) Shut down unixfs by double-clicking on the kill_unixfs file.
399 THIS STEP IS VERY IMPORTANT as it works like dismount on MS-DOS floppies.
400
401 The difficult step here is step number 2). If you are using an
402 ADFS IDE disc, then you can just double-click on one of the
403 following obey files (always choose the RiscOS disc number that
404 corresponds to the *first* disc on the NetBSD device):
405 - MountHD4a (ADFS::4 drive, not disc, root file system)
406 - MountHD4e (ADFS::4 drive, not disc, /usr file system)
407 - MountHD5a (ADFS::5 drive, not disc, root file system)
408 - MountHD5e (ADFS::5 drive, not disc, /usr file system)
409
410 If you are not using an ADFS IDE device, you need to create such
411 an obey file yourself. We recommend that you copy one of the
412 above and change that. These files normally only contain a
413 unixfs_mount command. If you go to the command line (or a task
414 window), and you type *help unixfs_mount you will see that the
415 unixfs_mount command has a very incomprehensible syntax.
416
417 The unixfs_mount command normally only takes one argument. That
418 is composed of the following:
419 (discop_swibase + (disc << 3) + partition)
420
421 To mount the root partition of third Power-tec SCSI-2 disc the
422 following commands can be used in task window (press CTRL-F12) to
423 find the argument to unixfs_mount:
424 *basic
425 PRINT ~(&40980 + (6 << 3) + 0)
426 QUIT
427
428 The PRINT command calculates the value to use and will in this
429 context give the value 409B0 which also is in hexadecimal. The
430 interesting things above are:
431 - &40980 The SWI base for SCSIFS_DiscOp.
432 - 6 The disc number in RISC OS.
433 - 0 The RiscBSD partition no. with a=0, b=1 etc.
434 - ~ Tell the PRINT command to show the result in hexadecimal.
435 - << Shifts the first number with the second number
436 places left.
437 In this case, it shifts 6 with 3 places to the left.
438 - & Denotes that the number is in hexadecimal.
439 - ( and ) Used to group the sub-expressions.
440
441 When you have calculated the figure to give to unixfs_mount you
442 just change it in the copy of the file you made above and run it by
443 double-clicking on it.
444
445 When you have mounted the unixfs file system, you can open the
446 directory and copy the sets to it.
447 Don't forget to copy the file "checksums" too. As its name suggests, it
448 contains checksums to check if the files are OK.
449
450 When you are finished with the transfer, run the file
451 kill_unixfs to dismount the unixfs file system.
452
453 Appendix A - Device naming
454
455
456 The names of the devices in NetBSD are not at all like the ones
457 in RISC OS. We will here try to explain the naming scheme used
458 in NetBSD. This is pretty much the same in all UNIXes, but
459 there will be some differences. NetBSD is derived from BSD and
460 differs from the ones that are derived from System V. Most of
461 the dominant operating systems in the UNIX market today are
462 based on System V (Sun Solaris, SGI Irix, HP HP-UX 10.xx, Linux
463 etc.). Some of them are actually hybrids of both.
464
465 The file system in UNIX use the slash character (/) as the
466 directory separator. The top (or bottom if you like) directory
467 is called the root and is denoted by only the slash (/). All
468 absolute filenames are adressed starting with the root, so the
469 temporary directory is called /tmp.
470
471 The devices in UNIX are addressed as special files in the
472 file system, and they all start with /dev, so e.g. the quadrature
473 mouse is called /dev/quadmouse.
474
475 Also some devices can be adressed in two different ways; as a
476 raw (character by character) or block device. This is especially
477 true with discs, and they therefore have two different names.
478 The raw device is called the same as the block device except
479 that it has an 'r' in front of the name. E.g. the first internal
480 hard drive is called /dev/wd0 as a block device, but /dev/rwd0
481 as a raw device. See also later.
482
483 For now, the only needed devices are the storage devices, so we
484 will hereby describe the naming convention used for these.
485 Please note that when you have different partitions on a device,
486 they will get the same number in NetBSD, but different letters,
487 whereas in RISC OS they will get different numbers. See the
488 examples at the end of this section.
489
490 The (block) device names are mostly composed of 4 characters:
491 1. The type
492 - w Winchester drives (i.e. standard ADFS drives)
493 - s SCSI drives
494 - c CD-ROM drives
495 - r RAM drives (obsolete in newer kernels)
496 - m Memory drives (only in newer kernels)
497 - f Floppy drives
498 2. A 'd' indicating a disc device
499 3. The number of the device of that type starting with 0.
500 - For IDE drives, the master will be 0, and the slave 1.
501 - For SCSI drives, the target ID will be used to
502 determine the number. They start on 0 and increase with
503 each device found. The drive with the lowest target ID will get
504 0, the second lowest target ID will get 1 etc.
505 Also, if you have different controllers, all devices on controller
506 0 (lowest expansion slot) will be added first.
507 - The CD-ROM drives act the same way as SCSI drives.
508 - The floppy drive is numbered as in RISC OS.
509 - At present you can only have one RAM drive, so it is 0.
510 4. The name of the partition. There are eight of these (along with
511 common allocations):
512 - a The root partition
513 - b The swap partition
514 - c The whole disc
515 - d Scratch (what are these?)
516 - e The first additonal partition.
517 i.e. if you have only /usr, then this will be /usr
518 if you have both /var and /usr this will be /var
519 - f The section additional partition.
520 i.e. if you have /var and /usr, this will be /usr
521 - g ????
522 - h Previously the /usr partition?
523
524 If you only have one partition on the drive this can normally be
525 accessed with either partition a (root partition) or c (whole
526 disc). This has not been verified to work.
527
528 A couple of examples of how to map RISC OS names to NetBSD ones
529 (the partition names have been left out):
530 ADFS::0 fd0
531 ADFS::1 fd1
532 ADFS::4 wd0
533 ADFS::5 (same drive as :4) wd0
534 ADFS::5 (other drive than :4) wd1
535 SCSI::4 sd0
536 SCSI::5 (same drive as :4) sd0
537 SCSI::5 (other drive than :4) sd1
538
539 So, if you have one ADFS IDE drive, and want to install NetBSD
540 at the after ADFS::5, you should still use wd0. If on the other
541 hand, ADFS::5 is a second drive, then you will have to use wd1.
542
543 Appendix B - Acknowledgements
544
545 This document was based upon the document
546 "Installing RiscBSD 1.2-Release"
547 (C) 1996 The RiscBSD Documentation Project
548
549 That has the following acknowledgement:
550
551 This manual has been written from scratch based on version 1.2
552 of the installation manual that Mark Brinicombe wrote.
553
554 It was mainly written by Kjetil B. Thomassen
555 (mailto:kjetil (a] thomassen.priv.no) with contributions from:
556 Neil Hoggarth (mailto:neil.hoggarth (a] physiol.ox.ac.uk)
557 Markus Baeurle (mailto:emw4maba (a] gp.fht-esslingen.de)
558 Jasper Wallace (mailto:jasper (a] ivision.co.uk)
559 Mark Brinicombe (mailto:amb (a] physig.ph.kcl.ac.uk)
560 Scott Stevens (mailto:s.k.stevens (a] ic.ac.uk)
561 and a lot more people posting to the RiscBSD mailing list.
562