Subject: Re: bin/25491: fdisk does not use (report) correct hard drive BIOS geometry
To: None <netbsd-bugs@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 05/08/2004 09:20:53
> >Synopsis:       fdisk does not use (report) correct hard drive BIOS geometry

> On my old DELL XPS D266 (PII-266 MHz) and a hard drive of 8 GB,
> 'fdisk wd0' reports an invalid total numbers of sectors (2846
> instead of something near 16514064):

> 
> # fdisk wd0
> Disk: /dev/rwd0d
> NetBSD disklabel disk geometry:
> cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
> total sectors: 16514064
> 
> BIOS disk geometry:
> cylinders: 1022, heads: 255, sectors/tracks: 63 (16035 sectors/cylinder)
> total sectors: 2846

I suspect this is a buggy bios, since that sector count comes from
a bios call done during system initialisation.

'sysctl machdep.diskinfo' should report the values being used.

Maybe fdisk should use the disk size from the 'netbsd geometry'
as the limit for the partitions.

1.6.2 does no validatoon on the numbers at all...

	David

-- 
David Laight: david@l8s.co.uk