From owner-freebsd-hardware Tue Nov 19 1: 5:46 2002 Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FF4437B401 for ; Tue, 19 Nov 2002 01:05:44 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4F6FB43E6E for ; Tue, 19 Nov 2002 01:05:43 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id UAA00641; Tue, 19 Nov 2002 20:05:34 +1100 Date: Tue, 19 Nov 2002 20:18:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Hari Bhaskaran Cc: freebsd-hardware@FreeBSD.ORG Subject: Re: problems detecting drive dimensions for maxtor 120GB ide/ata In-Reply-To: <20021118232338.A43068@spider.netmails.net> Message-ID: <20021119193959.F30027-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hardware@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Mon, 18 Nov 2002, Hari Bhaskaran wrote: > I have a maxtor 120GB IDE disk on a Supermicro P4SBE mother board. > The bios reports the size of the hard disk as > (Total size: 122 GB -- close enough!) > > Cylinder: 58853 > Head: 16 > Precomp: 0 > Landing zone: 58852 > Sector: 255 > > FreeBSD 4.7 install reports the error message. > > "WARNING: A geometry of 238216/16/63 for ad0 is incorrect. Using a > more likely geometry." > > It appears to be correct (although the bios reported different > values) when I refer to > http://www.maxtor.com/en/documentation/quick_specs/diamondmax_plus_9_quick_specs.pdf > > So what am I missing? Is the BIOS wrong? I am already sysinstall is broken here (it is no different in -current). It doesn't like the number of cylinders being >= 65536, but this is no more of a problem than the number of cylinders being >= 1024 (an old limit due to older mistakes) provided the BIOS can handle it. sysinstall also doesn't like the number of heads being > 256 or the number of sectors being >= 64. BIOSes are very unlikely to handle these and manufacturers data is even less likely to say to use them. Even 256 heads is problematic (it should work, but there are many broken BIOSes that can't handle it). Sanitize_Bios_Geom() uses the correct limit of 255. When sysinstall doesn't like one of these parameters, it calls Sanitize_Bios_Geom() to modify the geometry to one that it likes, at least in -current. Unfortunately, it does this unconditionally. I think your geometry would just work otherwise. The modified geometry might work too, or it might be inconsistent with the BIOS (the geometry can be almost anything, but most firmware and software has to agree on what it is). There are 2 other limits which may cause related problems soon: the 28-bit LBA limit for old ATA disks (128GB or 137 disk manufacturers GB) and the limit of 65535*255*63 given by multiplying the BIOS limits (about 4 * 128GB). The sysinstall limit of 65535 or 65536 cylinders is related to the hardware limit of 6553[5-6] heads for old ATA. This limit is bogus even for old ATA in LBA mode and in some BIOS's virtual CHS modes, and just broken for current ATA. When disk sizes exceed 512MB (less epsilon), all disks will fail sysinstall's current sanity tests even after they have been sanitized. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message