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