Subject: Re: weird disk geometry
To: Analysis and Solutions <info@analysisandsolutions.com>
From: Bang Jun-Young <bjy@mogua.org>
List: port-i386
Date: 06/24/2001 02:54:19
On Fri, Jun 22, 2001 at 02:59:52AM -0400, Analysis and Solutions wrote:
> Mapping out my install process and have run into a quandry.  The NetBSD
> geometry reported by fdisk is different from the actual geometry of the disk:
> 
>                  cyls   heads   sect       total (calculated)
> Actual:          4865     255     63       78156225
> NetBSD:         16383      16     63       16514064
>
> Just to be 100% clear...  The "actual geometry" is reported by PowerQuest's
> partinfo program and confirmed by other sources.  The "fdisk" in question is
> the one run after booting up via the NetBSD floppies.

It's not a bug. C/H/S geometry is not used with LBA mode. There's
no traditional "actual geometry" in LBA mode.

> 
> Okay, now if that weren't odd enough, when I run disklabel, it says d: is
> 78165360 sectors.  That means fdisk is saying there are 9135 fewer sectors
> (aka 145 fewer cylinders).

78165360 - 78156225 = 9135. fdisk is saying 9135 more sectors.

> 
> So, first, what is going on here?
> 
> Second, is the odd NetBSD geometry okay?  If not, how can I fix it.  Tried to
> see if it's possible to set the NetBSD geometry in fdisk -u, but it skips
> right to the BIOS geometry.  man fdisk doesn't say how to do it, or at least
> that's how I'm reading it.  Similarly, man disklabel doesn't show the ability
> to manipulate this.  Also, if I recall, the install process permits modifying
> the BIOS geometry, not the NetBSD.
> 
> Third, what will happen if I use the actual sector numbers to set up my
> disklabel?  Should I do so?
> 
> Your insights and direction will be greatly appreciated,

You should simply ignore C/H/S. According to a Maxtor datasheet:

"NOTE: NEVER enter more than 16,383 cylinders in the system
BIOS. This may potentially cause data loss."

Jun-Young

-- 
Bang Jun-Young <bjy@mogua.org>