Subject: Using unixfs to transfer sets, extracts from new instatllation manual
To: RiscBSD Mailing List <port-arm32@NetBSD.ORG>
From: Kjetil B. Thomassen <kjetil.b.thomassen@eunet.no>
List: port-arm32
Date: 02/01/1997 21:28:36
I am now seeing that more and more people want to use unixfs
to transfer the sets.

As there is no publicly available information (except the
mailing list archive) I have decided to give you some
information from the forthcoming new installation manual that
I am writing for the RiscBSD Documentation Project together
with others.

This manual should have been released a long time ago, but I
am still lacking vital information and feedback. I will keep
you posted with the progress of this manual.

Please not that none of the sections are reproduced in their
entirety, only the information relevant to unixfs.

I have also attached a new obey file that will do the job of
loading the unixfs module, mount a Power-tec drive 0 (5th
RISC OS drive), and then open the root directory.

This should be included in the standard distribution of the
bootloader, but it has not reached that stage yet.

If you need more information, please contact me or the
mailing list.

Please also tell me if you like the way it is presented.

Kjetil B.
mailto:kjetil.b.thomassen@eunet.no
(also mailto:thomassk@oslo.geco-prakla.slb.com)

--------- extracts from installation guide ----------

(C) 1997, The RiscBSD Documentation Project.

The information below should be considered pre-alpha and
may (does) contain inaccuracies and errors.

Please use it with care.

3.  Preparing Your Hard Disc(s)

In the following, the following terms are used:
drive		A physical harddisc that can contain many
logical discs (partitions)
disc		A partition on a physical drive.
filesystem	The RiscBSD term for a partition

It is still recommended that if you decide to dedicate a disc to
RiscBSD that you set aside a small RISC OS partition at the
beginning of the disc. This will enable you to use unixfs to
transfer the sets to the RiscBSD partition so that you do not
have to use floppies.

Also, we believe it is a good thing to have all the RiscBSD
stuff that runs on the RISC OS side on the same disc as RiscBSD.
This will, e.g., enable you to move the disc to another computer
and run RiscBSD directly off that disc. We recommend that if you
opt for this to use 10-25 MB since this will give you room for
the bootloader, and all the kernels you will want to use. Also
RISC OS seems to need this as a minimum anyway. There may be
some differences as to how small the RISC OS partition can be,
so if you fail to make it as small as you like, try a larger one
until you succeed.

3.1 Specific things to know for some configurations.


3.1.1 RISC OS 3 v3.5

If you have RISC OS 3 v3.5 with the old FileCore, then you
should make sure that you set up the root partition completely
within the first 512 MB of a RISC OS disc, preferably the first 512 MB
of the disc. You may have more than one RISC OS partition (called
disc), and the 512 MB limit is relevant only for the last of those.

It still has not been tested if unixfs will work from the second
RISC OS partition, but it may or may not work.


3.1.4 Alsystems Power-tec SCSI-2 card

There are problems with more than one RiscOs: partition,
so this needs to be looked into. According to Scott Stevens, the
problems involved should have been fixed, but it still remains
to be tested.


3.2  If You Are Splitting A Disc Between RISC OS And RiscBSD

The final part in preparing the disc is to copy everything back
to the disc and run bb_riscbsd to update the partition table for
RiscBSD. This should not be done if you will be using a disc
connected to an Alsystems Power-tec SCSI-2 card.
The PowerROM and probably EADFS fall into the same category
as the Power-tec SCSI-2 card. Do not use bb_riscbsd with this
either.


5  Making the distribution sets available

There are two steps involved installing the sets. The first is
to get the sets over to the RiscBSD filesystem(s), and the
second is to actually install the content of the sets where they
belong.

5.1 Transferring the sets using unixfs

In order to be able to use unixfs to transfer the sets you must
have a certain setup.

1) You must have a RISC OS partition on the same drive as you
   have the RiscBSD filesystem you want to transfer the sets to.
2) If you have RISC OS 3 v3.5 without the new FileCore, then
   you must also have the last FileCore disc plus the RiscBSD
   filesystem fully within 511 MB. This is because FileCore has a
   limit of 512 MB, and unixfs is using FileCore to write to the
   RiscBSD filesystem.
3) You disc controller must be supported by unixfs. At present
   the only one that seems to be incompatible is the MCS Connect-32
   SCSI-2 card.
4) You must know the SWI base of the <filesys>_DiscOp SWI. Here
   <filesys> is SCSIFS, SCSI or ADFS depending upon which
   controller type you have. ATAFS, IDE and IDEFS are not supported
   at present. The SWI base for your controller should be listed in
   appendix A.
5) Have given the directory you want to write into write
   permission for everyone. This should have been done above.

These are the steps to take:
1) Double-click on the unixfs_res module to load it.
2) Run a unixfs_mount command to mount the drive
3) Open the root directory by double-clicking on the openroot file.
4) Open the distrib directory and just copy the sets to this.
5) Shut down unixfs by double-clicking on the kill_unixfs file.
   THIS STEP IS VERY IMPORTANT as it works like dismount on
   MS-DOS floppies.

The difficult step here is step number 2). If you are using an
ADFS IDE disc, then you can just double-click on one of the
following obey files:
- MountHD4a (ADFS::4 drive, not disc, root filesystem)
- MountHD4e (ADFS::4 drive, not disc, /usr filesystem)
- MountHD5a (ADFS::5 drive, not disc, root filesystem)
- MountHD5e (ADFS::5 drive, not disc, /usr filesystem)

If you are not using an ADFS IDE disc, you need to create such
an obey file yourself. We recommend that you copy one of the
above and change that. These files normally only contain a
unixfs_mount command. If you go to the command line (or a task
window), and you type *help unixfs_mount you will see that the
unixfs_mount command has a very incomprehensible syntax.

The unixfs_mount command normally only takes one argument. That
is composed of the following:
(discop_swibase + (disc << 3) + partition)

To mount the root partition of third Power-tec SCSI-2 disc the
following commands can be used in task window (hit CTRL-F12) to
find the argument to unixfs_mount:
	*basic
	PRINT ~(&40980 + (6 << 3) + 0)
	QUIT

The PRINT command calculates the value to use and will in this
context give the value 409B0 which also is in hexadecimal. The
interesting things above are:
- &40980	The SWI base for SCSIFS_DiscOp.
- 6		The disc number in RISC OS.
- 0		The RiscBSD partition no. with a=0, b=1 etc.
- ~		Tell the PRINT command to show the result in hexadecimal.
- <<		Shifts the first number with the second number
		places left.
		In this case, it shifts 6 with 3 places to the left.
- &		Denotes that the number is in hexadecimal.
- ( and )	Used to group the sub-expressions.

When you have calculated the figure to give to unixfs_mount you
just change it in the copy of the file you made above and run it by
double-clicking on it.

When you have mounted the unixfs filesystem, you can open the
directory and copy the sets to it.
Don't forget to copy the file "checksums" too. As its name suggests, it
contains checksums to check if the files are OK.

You should also copy the kernel you are using to the same
directory since you need to have the kernel you are booting from
in the root directory. We will install this in the right place
later on.

When you are finished with the transfer, run the file
kill_unixfs to dismount the unixfs filesystem.


Appendix A. List of devices.

This is a list of devices. 

For disk controllers the SWI base for the _DiscOp SWI is listed
so that it is easy to use this with unixfs.


A.1 Power-tec SCSI-2 card

This card has SWI base &40980 for SCSIFS_DiscOp.


A.3 Yellowstone Eductional Solutions (YES) RapIDE E-IDE card

The file system used on this is ATAFS?

The SWI base for the ATAFS_DiscOp is: &4BBC0 ?




# *** MIME-format mode disabled by user ***
#
# The following data is packaged using uuencode
# You can decode this message using ANT !Marcel, or by hand
# Created using the !Marcel mail package from ANT Ltd (sales@ant.co.uk)
#
begin 644 MntPt0a,feb
M?'5N:7AF<U]M;W5N=" T,#(V," H4W1A;F1A<F0@041&4R!)1$4@9&ES8R Tz
M('!A<G1I=&EO;B!A*0I\4&]W97(M=&5C(%-#4TE&4R!B87-E.B T,#DX, H*y
M4DU%;G-U<F4@56YI>$93(# N,3(@4DU,;V%D(#Q/8F5Y)$1I<CXN=6YI>&9Sx
M7W)E<PI2345N<W5R92!5;FEX1E,@,"XQ,B!%<G)O<B!5;FEX1E,@;6]D=6QEw
M('1O;R!O;&0L(# N,3(@;W(@;F5W97(@;F5E9&5D"G5N:7AF<U]M;W5N=" Tv
<,#DX, IF:6QE<E]O<&5N9&ER(%5N:7A&4SHD"F5Du
 t
end