Subject: BIOS / pfdisk / sysinst glitches ?
To: None <port-i386@NetBSD.ORG>
From: Danny Thomas <D.Thomas@vthrc.uq.edu.au>
List: port-i386
Date: 07/12/1998 23:44:42
maybe I'm just tired, but I thought it would be easier to set up a machine
with several OS'. I'm trying with an FIC PA-2007 motherboard, K6/200,
Quantum Fireball ST3.2A disk. NetBSD-1.3.2/i386

1) Geometry translation in the BIOS is from 6256*16*63 to 782*128*63
However, the pfdisk supplied with 1.3.2 reports it as 781*128*63.
OK so I lose one cylinder. FWIW the calculation
  *c = ((((int) regs.h.cl << 2) & 0x300) | regs.h.ch) + 1;
seems OK, so is my BIOS returning the wrong value? Kinda scary if they
can't get a detail like that right.


2) I used pfdisk to setup 4 partitions, so
   1    7    1  176  <= NB I was leaving first cylinder free
   2    1  177  352
   3    1  353  528
   4  165  529  780

Now the curious thing is the installer reports geometry as
  real geom 6256 cyl, 128 heads, 63 sec
  BIOS geom 782 cyl, 128 heads, 63 cyl
when I think the real heads should be 16

If I change the type of partition for 4) to be not 0xA5, the real geometry
does report 16 heads! Is this a problem with sysinst or pfdisk?

If you continue with sysinst still thinking the disk has 128 heads, doing
the setup into the fourth partition on the disk, here's what you see in the
end, NB partition (d), cheapest way I saw 18G appear on a disk:
  a  153    2082  ... /
  b  263    2236
  c  992    2082
  d  24,633    0
  e  574    2500  ... /usr

what's more, the first partition in the MBR seems to get trashed to type 0,
start 0, size 0.


3) when sysinst is listing the partitions, I saw:
   0     8  1408  1416
   1  1416  1408  2824
   2  2824  1408  4232
   3  4232  2016  6248
I guess it depends on the definition of 'end', but I'd say partition 0
spanned sectors 8 thru 1415 and so on. When I first saw this I was
concerned that maybe partitions were overlapping.


4) I doubt it's related, but it's frustrating when new BIOS versions get
too clever. In the case of the Award BIOS for the FIC PA-2007 motherboard,
the later versions 109CD12 & 113CD13 truncate the disk parameters to the
528M 'limit'. What's bizarre is you ask the BIOS to go thru the
auto-disk-config routine and select the preferred option (782*128*63) it
gives you*, yet that gets changed to 511*32*63 just before the BIOS hands
off to the boot routine. This doesn't happen with the BIOS version 618J90W.
But that version does not support 64M SDRAMs, etc.

* it provides three choices, one each for LBA, Normal & Large.


anyway, after getting the partitions OK and NetBSD installed first, I've
added NT and FreeBSD with no apparent problems.

cluefulness cheerfully accepted
Danny