FDisk won't detect or accept correct disk geometry from BIOS

Sergey 'DoubleF' Zaharchenko doublef at tele-kom.ru
Fri Jan 23 03:51:16 PST 2004


On Thu, 22 Jan 2004 14:24:19 -0800
"Keith Kelly" <c0d3h4x0r at hotmail.com> probably wrote:

> Thanks for your thoughtful and helpful reply.  I should have given more 
> technical details.
> 
> I already tried (with both 4.9 and 5.1) letting the FreeBSD install proceed 
> with fdisk's  geometry value assumptions, and what I always get is a 
> non-bootable hard drive that gives the "Missing operating system" error at 
> boot.
> 
> The hard drive is IDE, not SCSI.  It is a Maxtor UltraMax 40GB ATA/100 drive 
> purchased shy of two years ago.  The "physical geometry" reported by Maxtor 
> in the specs for the drive is different from the geometry my BIOS reports 
> that it has auto-detected and is using to address the drive.  And both of 
> *those* geometries are different from the one that fdisk keeps trying to 
> assume.

>From the web page, I learnt the 3 geometries you have.

$ bc -l -q
155061*16*63*512
80026361856
9729*255*63*512
80023749120
38309*16*255*512
80025968640

So which of them is not 80G (modulo the ``rounding error'', which is, as
you can see, negative, I mean, neither BIOS nor FreeBSD think the drive
to be larger than it is according to its specs, so it cann't cause real
trouble)?

After reading your further posts, I realized it wasn't *your* geometry
:). Could you please post `all of them', like in the webpage?

No, don't tell me the difference between them makes it impossible to
boot from the drive. The mbr is at the beginning of the drive, not at
the end:)

I own just the same model drive (this means the same as in the webpage),
and I never had a geometry problem with any FreeBSD version I tried
(4.4, 4.7, 4.8, 5.2-RC2).

FWIW, here is my fdisk output.

> $ fdisk /dev/ad2
> ******* Working on device /dev/ad2 *******
> parameters extracted from in-core disklabel are:
> cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)
> 
> Figures below won't work with BIOS for partitions not in cyl 1
> parameters to be used for BIOS calculations are:
> cylinders=9729 heads=255 sectors/track=63 (16065 blks/cyl)

BTW, you could try fiddling with the `packet' option of boot0, but that
would take a fixit floppy/CD.

# boot0cfg -o packet /dev/whatever

might help you (it enables the bootloader to use LBA packet mode).

> I've already read all the FAQs, handbooks, and support sites I could find 
> regarding FreeBSD and disk geometry.  None of them have contained any 
> information specific to IDE drives (they all seem SCSI-centric), and none of 
> them have clearly explained all the background context about how drive 
> geometries work.

In short - they (geometries) don't. Physical geometry doesn't exist.
Only the number of sectors (should be marked `LBA addressable', or
something like that,on the drive) matters on modern drives. Satisfied?

P.S. Now, who cc'd it to bugs@:)?

-- 
DoubleF
"This is a test of the Emergency Broadcast System.  If this had been an
actual emergency, do you really think we'd stick around to tell you?"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040123/c7dcc671/attachment.bin


More information about the freebsd-questions mailing list