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