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