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/14/1996 19:39:34
Markus Baeurle writes:
> Hi!
>
> While preparing documentation for installing RiscBSD on a Cumana-hosted
> harddisk, I came across this:
>
> I get a different first cylinder for the RiscBSD part of my harddisk if I
> calculate it with the help of !SCSIMgr or bb_riscbsd.
Hmmm. Use the one bb_riscbsd gives you as this is the one (AFAIK) the
the RiscBSD disklabel code will use.
> !SCSIMgr gives sector 1290240 as the "Start of non-RiscOS area" and 820571 as
> its length.
> My harddisk has 6 heads and 96 sectors/track, so the first cylinder would be
> 1290240/96/6=2240. This is without rest which means it is on a cylinder
> boundary.
>
> I have to run bb_riscbsd twice because I have two RiscOS partitions. (Btw, any
> way this can be done automatically by bb_riscbsd? This is not ideal, especially
> as it claims for the second partition, drive 5, that it's 818 cylinders large
> (which is correct), ranging from cylider 0-817, which is obviously incorrect
> and misleading.)
This is not the fault of bb_riscbsd. as far as it knows there are 2
distinct disks in the machine.
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.
> For drive 4 it gives 419'430'400 bytes and 241'172'480 bytes for drive 5.
> There are 96*6*512=294912 bytes per cylinder.
> This would be 1422,222... cylinders for drive 4 and 817,777... cylinders for
> drive 5, but it is rounded to 1423 and 818 cylinders by bb_riscbsd.
bb_riscbsd obtains this figure from the cylinder offset in the
bootblock, this address is initially calculated anf placed there by
!SCSImgr.
> This would mean that RiscOS needs 2241 cylinders so RiscBSD would have to start
> on cylinders 2241.
>
> But if drive 5 is not aligned to a cylinder boundary, this rounding up should
> not be made, or rather only for the sum of both parts and not for the
> individual parts.
>
> Another problem is that according to !SCSIMgr the RiscBSD part is 820571/96/6=
> 1424,60.. cylinders while it must be 3658-2240=1418 cylinders.
>
> Does anybody know more about this? Scott?
> It's hard to write a precise and simple installation guide with this being
> unclear.
It certainly is...
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.
> Markus
Cheers Scott
--
Scott Stevens, Network Services Group, Computer Centre, Imperial College
"Any technology distinguishable from magic is insufficiently advanced."