1 $NetBSD: prep.RISCOS,v 1.21 2009/04/26 16:44:51 sborrill Exp $
3 These instructions are specific to NetBSD/acorn32 on Acorn RISC OS platforms
4 (RiscPC/A7000/A7000+/NC).
6 Last updated for the BtNetBSD bootloader version 0.99a at 10 July 2002 by
7 Reinoud Zandijk (reinoud@NetBSD.org), portmaster of NetBSD/acorn32.
9 For a more detailed acknowledgement and list of contributors see Appendix B
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 RISC OS installation specifically.
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.
33 You will need the following RISC OS software:
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).
40 A program to report your disk's geometry:
42 Not really needed, you can simply boot the installation
43 kernel and look for the geometry in the boot messages.
45 Sergio Monesi's fsck suite (a good thing to have around
46 anyway). Available from:
47 http://www.monesi.com/sergio/fsck.html
49 !Zap (The read disk facility). Available from HENSA.
51 The partition software/formatter for your desired installation
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
65 Additionally you will require the following:
67 The Bootloader and RISC OS tools: BtNetBSD.tar.Z as found in
68 the installation/misc directory. This archive, which can be
69 unpacked with !SparkPlug, *includes the installation-kernel*
70 so you don't have to download it separately.
72 The NetBSD/acorn32 distribution sets (will be on the CD-ROM, or
73 available from your nearest NetBSD ftp site).
75 A hardcopy of this document, along with a hardcopy of the
76 NetBSD installation instructions "INSTALL").
78 1.3 Preliminary steps:
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 set the files' RISC OS filetypes 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 which contains the embedded ramdisk.
87 2 Preparing your hard disk
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 RISC OS file system in a partition. There can be
95 more than one Disc per Device.
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 RISC OS discs and NetBSD or dedicate a whole
102 In making this decision you should consider the possibility that if
103 NetBSD is incorrectly configured on a shared device then your shared
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 RISC OS side of
109 NetBSD, and will make the use of UnixFS easier to configure. If you
110 do decide to create a minimal RISC OS 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).
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.
123 2.1 Sharing your device
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
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.
135 Use this procedure to set up your device:
137 Start !HForm by double-clicking on its icon.
139 Choose the "custom" or "other" option when prompted (usually
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.
146 Continue to accept the default answers until you're asked
147 whether you want to format or initialize, choose initialize.
149 Go to the section about running bb_riscbsd.
152 2.1.2 Cumana SCSI-2 card
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
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.
164 Select the device you wish to repartition.
166 Click on the clear icon in the partitions subwindow.
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.
172 Enter the amount of the device you wish to reserve for
173 RISC OS. This will be the whole device size less the amount
174 you want to reserve for NetBSD. Make a note of this number.
176 If you like, split the RISC OS portion of the device into
177 several partition (you should only "see" the RISC OS portion).
179 Click on Execute when you are happy with the partitions. This
180 will create your partitions, and wipe your device.
182 Go to the section about running bb_riscbsd.
185 2.1.3 Alsystems Power-tec SCSI-2 card
187 You must use the !PowerMgr program to partition the device.
189 The RISC OS partitions should be called RiscOs:, and the NetBSD one
190 should be called Empty:.
192 Here is the procedure you should use:
193 Start !PowerMgr by double-clicking on its icon.
195 Click on advanced in the main window
197 Click on Define/create partitions
198 Click on the device you want to set up for NetBSD.
200 Set up the RISC OS partitions as "RiscOs:" and the
201 remaining one as "Empty:".
203 Click on each figure and press RETURN.
205 Click on partition drive.
207 Click on yes to warning as you really want to wipe
210 Click on yes to proceed, this will lead you to the
214 Set a tick on all RiscOs: partitions, give them a name
215 and set LFAU to auto.
217 Unset the tick on your Empty: partition.
219 Click on Initialize selected partitions.
221 Click on yes to proceed init as you want to wipe the
224 Click on yes to proceed to configure.
227 Here you should set up the RISC OS partitions as you
228 like them. Normally the default will be ok.
230 Click on configure. This will configure your computer
231 and give you access to the Discs.
233 You *Must Not* run bb_riscbsd.
237 2.1.4 Acorn SCSI card
239 You can only have one RISC OS partition with this card. The rest has
240 to be set aside for NetBSD.
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>
249 You will get the following prompt:
252 Now you should enter the following commands:
253 probe (to see which devices are available)
255 device <no> (replace <no> with the no of your device)
257 section (to divide the device between RISC OS and
259 Answer yes to the question:
260 Include RISCiX partitions?
262 Enter the size of the RISC OS area in blocks
265 SCSIDM will round this up to the nearest cylinder
268 Answer yes to the question:
269 Do you really want to section device <no>?
271 This will section the device into two partitions.
275 Go to the section on running bb_riscbsd.
279 2.1.5 Other interfaces
281 It may not be possible to partition devices on other interface. If
282 you are using a different interface you have 2 options:
284 Try to work out how to partition devices on it
286 Use the entire device for NetBSD
289 2.2 Using a whole device for NetBSD
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.
295 Because of this, if you've ever used your device for RISC OS, you will
296 need to invalidate this bootblock.
298 To do this you need to:
300 Be absolutely sure you want to do this.
302 Run bb_trash and follow the instructions.
304 Ensure that this device is now not configured for RISC OS.
306 You are now ready to boot NetBSD and continue the installation.
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.)
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.
322 It will then tell you how much of the device is occupied by RISC OS 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
335 Make a note of this number.
337 bb_riscbsd will make a backup of the original bootblock, but it
338 can be non-trivial to put it back.
344 Now that your device is ready for the installation you need to
345 unpack the bootloader archive.
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.
353 4.1 [Optional] Configuring the !BtNetBSD bootloader before installation
355 Open the !BtNetBSD application and edit the `fastboot' file to specify
356 a known kernel location; an example is already given.
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.
362 When you think you've filled in the proper details save the file again
366 4.2 Starting the installation!
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.
371 NetBSD should now start to boot, install NetBSD as per the NetBSD
374 When you finish the installation you can restarted the computer as
378 4.3 [Optional] Configuring !BtNetBSD after installation
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.
383 Save the file and run !BtNetBSD again (see above).
390 5.1 Using UnixFS to copy the sets.
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 RISC OS to NetBSD.
396 In order to be able to use unixfs to transfer the sets you must have
399 1) You must have the RISC OS disc that corresponds to the NetBSD
400 device configured (e.g., *con. IDEdiscs 2) even if it has no RISC OS
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.
409 Power-tec SCSI-2 card: &40980
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
418 To mount a Unix partition:
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.
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 RISC OS 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)
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.
443 The unixfs_mount command normally only takes one argument. That
444 is composed of the following:
445 (discop_swibase + (disc << 3) + partition)
447 To mount the root partition of the third Powertec SCSI-2 disc, the
448 following commands can be used in a task window (press CTRL-F12) to
449 find the argument to unixfs_mount:
451 PRINT ~(&40980 + (6 << 3) + 0)
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
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.
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.
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.
476 When you are finished with the transfer, run the file
477 kill_unixfs to dismount the unixfs file system.
481 Appendix A - Device naming
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.
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.
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.
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.
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.
517 The (block) device names are mostly composed of 4 characters:
519 - w Winchester drives (i.e. standard ADFS drives)
522 - r RAM drives (obsolete in newer kernels)
523 - m Memory drives (only in newer kernels)
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
539 - a The root partition
540 - b The swap partition
541 - c The complete and whole disc ; all OSes and partitions
542 - d Part of the disc that is not used by NetBSD; normally RISC OS
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
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.
555 A couple of examples of how to map RISC OS names to NetBSD ones
556 (the partition names have been left out):
560 ADFS::5 (same drive as :4) wd0
561 ADFS::5 (other drive than :4) wd1
563 SCSI::5 (same drive as :4) sd0
564 SCSI::5 (other drive than :4) sd1
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.
571 Appendix B - Acknowledgments
573 This document was based upon the document
574 "Installing RiscBSD 1.2-Release"
575 (C) 1996 The RiscBSD Documentation Project
577 That has the following acknowledgement:
579 This manual has been written from scratch based on version 1.2
580 of the installation manual that Mark Brinicombe wrote.
582 It was mainly written by Kjetil B. Thomassen
583 (kjetil@thomassen.priv.no) with contributions from:
584 Neil Hoggarth (neil.hoggarth@physiol.ox.ac.uk)
585 Markus Baeurle (emw4maba@gp.fht-esslingen.de)
586 Jasper Wallace (jasper@ivision.co.uk)
587 Mark Brinicombe (amb@physig.ph.kcl.ac.uk)
588 Scott Stevens (s.k.stevens@ic.ac.uk)
589 and a lot more people posting to the original RiscBSD mailing list.