Bug 17890

Summary: Still having trouble identifying disk geometry (in ata-disk.c now)
Product: Base System Reporter: asherrod <asherrod>
Component: i386Assignee: Søren Schmidt <sos>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description asherrod 2000-04-10 03:50:07 UTC
This problem existed in wd.c and was carried over to ata-disk.c.

I have been told over and over it is not a "real" problem. Asking 
various users, I have discovered that I am not alone in experiencing 
this. Of course, others just followed the "Well, add a DOS partition,
and let Microsoft fix your problem" advice. But it IS a problem.

Whenever I install I have to go back and re-write the disk driver then
re-run newfs, etc... It is a problem. It can be fixed (easily).

My drives are not antiques or that unusual. One Western Digital, one
Maxtor. Okay, cheap disks, but not uncommon.

The problem: Not all disks return 16383 cylinders to indicate LBA mode
must be used. Mine return 4192, which rsults in rather small disk sizes.

Fix: 

129c129,130
< if(AD_PARAM->cylinder = 16383 && adp->total_sec < AD_PARAM->lbasize)
---
> if((AD_PARAM->cylinder == 16383 || AD_PARAM->lbaflag)
>    && adp->total_sec < AD_PARAM->lbasize)
How-To-Repeat: Boot the system with one of the disks in question. Try running 
/stand/sysinstall. Look at how small the disks just became.
Comment 1 Greg Lehey freebsd_committer freebsd_triage 2000-04-10 05:41:12 UTC
Responsible Changed
From-To: freebsd-bugs->sos

sos handles the ata driver. 
Comment 2 Søren Schmidt freebsd_committer freebsd_triage 2000-11-14 08:43:40 UTC
State Changed
From-To: open->closed

Hmm, this is a BIOS problem, and the fix here breaks other devices 
that report LBS without really supporting it. 
Please upgrade your BIOS..