Subject: bin/25491: fdisk does not use (report) correct hard drive BIOS geometry
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <pierre.bourgin@pcotech.fr>
List: netbsd-bugs
Date: 05/07/2004 14:52:35
>Number: 25491
>Category: bin
>Synopsis: fdisk does not use (report) correct hard drive BIOS geometry
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri May 07 14:53:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Pierre Bourgin
>Release: NetBSD-1.6ZL/i386
>Organization:
PCO Technologies
>Environment:
NetBSD 1.6ZL NetBSD 1.6ZL (DSK_INSTALL) #0: Mon Mar 22 12:38:09 MET 2004 root@lyrics:/home/usr/src/sys/arch/i386/compile/DSK_INSTALL i386
>Description:
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
[...]
So we are unable to declare a primary FAT16 partition of 1980 MB in the MBR:
# fdisk -f -u -0 -s 16/63/4064382 wd0
fdisk: Partition exceeds size of disk
In this case, fdisk refuses to create it, since the size (1980 MB) does not fit into this BIOS geometry (2846 sectors of 512 bytes).
This case does not happen with the same hardware under installation image of NetBSD-1.6.2/i386 (fdisk does not report total sector numbers in this version).
This bug happens on some particular cases, since I'm able to create primary partitions on other hardware (hard drive of 30 GB for instance) with NetBSD-1.6ZL. In these cases, I did not notice anything special, but I was creating partitions by the use of scripts encapsulating fdisk command.
>How-To-Repeat:
see above: try to create a primary partition of more than 2846 sectors on such a disk.
>Fix:
no, sorry
>Release-Note:
>Audit-Trail:
>Unformatted: