Subject: Re: Cylinder calculations must be sorted out
To: None <port-arm32@NetBSD.ORG>
From: Markus Baeurle <emw4maba@gp.fht-esslingen.de>
List: port-arm32
Date: 10/26/1996 00:25:22
Hello.

In message <11866.199610221120@mortimer.cc.ic.ac.uk>
          Scott Stevens <s.k.stevens@ic.ac.uk> wrote:

> The non-riscos cylinder offset points to the RiscBSD section of the
> disk. One sector into this is the NetBSD disklabel. The Start of the
> root partition will be 8k into the RiscBSD section.

Good to know, thank you.

> Most people know how the disks are arranged on their own machines, As

OK, but it is misleading and somebody who doesn't know much about partitions
and all that stuff (and you don't get to see a lot under RiscOS, especially no
starting cylinders and the like) might be puzzled.

> Did you allocate the whole disk to RiscOS (from !SCSImgr), if not
> !SCSIMgr will put the correct offset in the bootblock, bb_riscbsd is
> only then used to change the partition type (0x42).

And it is needed to find out the starting cylinder because you have to give
this to the NetBSD installation script.
bb_riscbsd needs some reworking anyway and probably a nice frontend wouldn't go
amiss. There should be functions to
-analyze the partition layout and change the partition type
-write the correct offset to the bootblock
-invalidate the filecore bootblock to dedicate the whole disk to RiscBSD. This
is needed for first-time installation and can't be done by with RiscBSD if it's
not present yet, right?
It should also take the different SCSI controllers into account.
Maybe I'll try do improve it myself, but I can't promise.

> If you look at bb_riscbsd it does *very* little, but it does assume
> you know roughly what you're doing...

This doesn't mean that there can't be a bug in it, although I also don't think
it is buggy.
It is the first trap though and this should be made as safe as possible.

> Well, I have no firm evidence of this, but does it really matter ?

IMHO yes. It tells wrong values, making this data useless and misleading. It
contains a bug.
Imagine you know little about partitions and all this stuff and want to install
RiscBSD. SCSIMgr tells you something different than bb_riscbsd about the very
layout of your harddisk? Wouldn't you be worried if there is something wrong?
I'm still not finally sure about mine myself, or why do I lose my disklabel
from time to time?

> Just ignore the offset in sectors given by !SCSIMgr, and calculate the
> rounded one yourself.

As I said above, this feature of SCSIMgr shouldn't be useless.

> Might be an idea if you can confirm my theory first, ie what is the
> relationship between the cylinder offset and the sector offset.

OK I will play around with the numbers, but not tonight...

Bye, Markus