Subject: Re: Cylinder calculations must be sorted out
To: Markus Baeurle <emw4maba@gp.fht-esslingen.de>
From: Scott Stevens <s.k.stevens@ic.ac.uk>
List: port-arm32
Date: 10/22/1996 12:20:32
Markus Baeurle writes:
 > Hi Scott!

Hi,

 > In message <8523.199610141839@mortimer.cc.ic.ac.uk>
 >           Scott Stevens <s.k.stevens@ic.ac.uk> wrote:
 > 
 > Where is the disklabel situated anyway, ie. between which parts on the disk?
 > Before the RiscBSD root partition?

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.
 > 
 > > This is not the fault of bb_riscbsd. as far as it knows there are 2
 > > distinct disks in the machine.
 > 
 > Isn't there any way to find out? This might puzzle people. I tried to explain
 > this in the installation guide. It could probably still be a bit clearer though.

Most people know how the disks are arranged on their own machines, As
far as I know the filecore abstraction of a disk/partition doesn't
indicate what physical disk the partition resides on... Simes ?

 > > I assume you have 2 riscos partitions on one disk if so then you only
 > > need to run bb_riscbsd once on the first partition on the disk.
 > 
 > Well I only need to run it once to change the filecore bootblock, but twice to
 > get the size of each partition. I have to sum them up to get the size of the
 > RiscOS part of the disk.

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).

 > > bb_riscbsd obtains this figure from the cylinder offset in the
 > > bootblock, this address is initially calculated anf placed there by
 > > !SCSImgr.
 > 
 > OK, so bb_riscbsd should be right unless there's a bug in it.
 > Good to know.

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

 > > I think the heart of the problem is !SCSImgr, in that it give you a
 > > size in sectors along with an offset but due to the way the offset is
 > > stored must convert to a cylinder offset. It must round up to the
 > > nearest boundary but looks like it's not reporting the rounded value.
 > 
 > We should tell Cumana about this.

Well, I have no firm evidence of this, but does it really matter ?
Just ignore the offset in sectors given by !SCSIMgr, and calculate the
rounded one yourself.

 > Do you want to do this, or should I do it because I have a concrete example at
 > hand? I will try to be polite to them despite the NDA. ;-)
 > Hmm, a copy of my message to this list mailed to them should almost be enough.
 > Just tell me if you want and I'll drop it to them.

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

 > So long, Markus

Cheers Scott

-- 
Scott Stevens, Network Services Group, Computer Centre, Imperial College
"Dan Marino should die of gonorrhoea and rot in hell. Would you like a
cookie, son ?"                                 - Mrs. Finkle, Ace Ventura