From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DNdxa-0008Ce-T9 for qemu-devel@nongnu.org; Mon, 18 Apr 2005 17:39:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DNdxY-0008C8-Ps for qemu-devel@nongnu.org; Mon, 18 Apr 2005 17:39:14 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNdxY-00080y-Ko for qemu-devel@nongnu.org; Mon, 18 Apr 2005 17:39:12 -0400 Received: from [62.2.95.247] (helo=smtp.hispeed.ch) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1DNdwj-0007an-6F for qemu-devel@nongnu.org; Mon, 18 Apr 2005 17:38:21 -0400 Received: from nbbolle (84-72-197-183.dclient.hispeed.ch [84.72.197.183]) by smtp.hispeed.ch (8.12.6/8.12.6/tornado-1.0) with ESMTP id j3ILaTYM031617 for ; Mon, 18 Apr 2005 23:36:29 +0200 From: "Andreas Bollhalder" Subject: Re: Re: [Qemu-devel] kqemu 0.6.2 and XP Date: Mon, 18 Apr 2005 23:32:33 +0200 Message-ID: <000001c5445e$2225bbc0$6401a8c0@geodb.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In-Reply-To: <200504030643.13171.caiqiang@ustc.edu> Reply-To: bolle@geodb.org, 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 I tried the math on my WinXP host with Win2k guest. When using the following math with my 8192MB QCOW image, QEMU refuse to start: 1 Block =3D 512 Bytes Cylinders =3D Blocks / (Heads * Sectors) (kBytes * 2) / (16 * 63) (8388608 kBytes * 2) / (16 * 63) For 8192MB Image: -hdachs 16644,16,63 I brute forced the cylinder value, QEMU will start with a lower or equal value of 16383 cylinders. I made my own math based on this: Cylinders =3D Blocks / (Heads * (Sectors + 1)) - 1 (kBytes * 2) / (16 * 64) - 1 (8388608 kBytes * 2) / (16 * 64) - 1 For 8192MB Image: -hdachs 16383,16,63 I'm realy confused about what's right or not. I created the image with the QEMU Manager. Can anyone explain this ??? Andreas Ben Taylor wrote: > I forgot one very important part. The calculation needs > to be / (heads * sectors per cylinder=20 > * 512 bytes) =3D cylinders. so in your case, the calculation is close > well, the default sector size is 512, and you've done > your sizing in number of 1k blocks, your calculations was > close. It should be: > > blocks secs/block hds sec/cyl > > (2 000 000 * 2 ) / ( 16 * 63 ) =3D 3968 > The first time I did the math, my 2g partition went > to 8g partition when I used the -hdachs parameters > cause I really screwed up the math. (it appears if > you mess your c-h-s values, your image since may > change. :-) > HTH, and sorry for the confusion. > Ben