From owner-freebsd-hackers@FreeBSD.ORG Mon Jun 2 08:38:37 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 33ED437B401 for ; Mon, 2 Jun 2003 08:38:37 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.de [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id F05A243FAF for ; Mon, 2 Jun 2003 08:38:35 -0700 (PDT) (envelope-from mdcki@gmx.net) Received: (qmail 6994 invoked by uid 65534); 2 Jun 2003 15:38:34 -0000 Received: from pD9E2DCED.dip.t-dialin.net (EHLO gmx.net) (217.226.220.237) by mail.gmx.net (mp010) with SMTP; 02 Jun 2003 17:38:34 +0200 Message-ID: <3EDB6FB7.6060008@gmx.net> Date: Mon, 02 Jun 2003 17:39:35 +0200 From: Marcin Dalecki User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030517 X-Accept-Language: en-us, en, pl, ru MIME-Version: 1.0 To: Andrew References: <20030603001755.S68271-100000@starbug.ugh.net.au> In-Reply-To: <20030603001755.S68271-100000@starbug.ugh.net.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-hackers@freebsd.org Subject: Re: Retrieving disk geometry X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jun 2003 15:38:37 -0000 Andrew wrote: > Hi, > > Under FreeBSD 4.x the ioctl DIOCGDINFO could be used to retrieve the > number of cylinders, heads and sectors of a drive. This could be called on > /dev/ad0 for example. Under FreeBSD 5 it seems to produce "Inappropriate > ioctl for device" unless you call it on an individual partition > (/dev/ad0s1a for example). > > Is there a way around this? No. Becouse there is in fact no such thing like a "geometry" on modern ATA drives. There is just a quigmare of values which serve only one single purpose - satisfying rotten code in stinking BIOS. Not more not less. (Modern is here on the scale of about 8 or even more years.)