From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K6XEC-0007Ng-3O for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:47:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K6XEA-0007Mv-5z for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:47:31 -0400 Received: from [199.232.76.173] (port=34118 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K6XE9-0007Mq-Vg for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:47:30 -0400 Received: from relay3-v.mail.gandi.net ([217.70.178.77]:47097) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K6XEA-00033C-46 for qemu-devel@nongnu.org; Wed, 11 Jun 2008 16:47:30 -0400 Received: from localhost (mfilter1-c.gandi.net [217.70.182.21]) by relay3-v.mail.gandi.net (Postfix) with ESMTP id B656CBA14 for ; Wed, 11 Jun 2008 22:47:27 +0200 (CEST) Received: from relay3-v.mail.gandi.net ([217.70.178.77]) by localhost (mfilter1-c.mgt.gandi.net [217.70.182.21]) (amavisd-new, port 10024) with ESMTP id 86JjdC9CKj2V for ; Wed, 11 Jun 2008 22:47:21 +0200 (CEST) Received: from [86.73.70.140] (140.70.73-86.rev.gaoland.net [86.73.70.140]) by relay3-v.mail.gandi.net (Postfix) with ESMTP id C22DAB9FF for ; Wed, 11 Jun 2008 22:47:21 +0200 (CEST) Message-ID: <48503998.3090609@bellard.org> Date: Wed, 11 Jun 2008 22:46:16 +0200 From: Fabrice Bellard MIME-Version: 1.0 Subject: Re: [Qemu-devel] How to get beyond the 16 head limit? References: <20080604171613.GA10192@harddisk-recovery.nl> <20080611174217.GE20448@harddisk-recovery.nl> In-Reply-To: <20080611174217.GE20448@harddisk-recovery.nl> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Erik Mouw wrote: > On Wed, Jun 04, 2008 at 07:16:14PM +0200, Erik Mouw wrote: >> We managed to recover data from an ancient 60 MB ESDI drive. Because >> the interesting data is in some kind of proprietary database system >> (running on top of its own OS) I tried to run the recovered disk >> image in Qemu and let the database export itself to a floppy image. >> >> The drive has an unusual though valid geometry: 58 cylinders, 64 heads, >> 32 sectors. Qemu refuses to boot the image because it says the CHS >> format is invalid: >> >> erik@zurix:~/qemu > qemu -fda scratch.img -hda bd4467.img \ >> -hdachs 58,64,32 -std-vga -boot c -m 4 -net none >> qemu: invalid physical CHS format >> >> I increased the head limit in vl.c from 16 to 64 but it appears that is >> not enough to convince Qemu to accept the geometry. Qemu starts, but >> when I check from DOS (in Qemu) it now looks as if the drive geometry >> is 116/16/63. With a partition table patched to match that geometry I >> can boot the database OS bootsector, which happily loads the db OS >> kernel from the wrong location because it uses CHS addressing (instead >> of LBA). Needles to say that won't fly. >> >> Like I said, I already increased the head limit in vl.c but that is >> apparently not enough. What else do I have to change to get Qemu to use >> my supplied disk geometry? > > It wasn't enough, there was also some work needed in hw/ide.c to get > Qemu to accept and use the unual layout (see below for the patch). > Right now Qemu is convinced that the geometry really is 58/64/32, but > when testing in DOS through INT13 the geometry is 116/16/63. I guess > that has to do with the BIOS getting in my way, could somebody confirm > this? At the IDE hardware level, you cannot have more than 16 heads, so your problem is a BIOS issue. Fabrice.