qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Bollhalder" <bolle@geodb.org>
To: qemu-devel@nongnu.org
Subject: Re: Re: [Qemu-devel] kqemu 0.6.2 and XP
Date: Mon, 18 Apr 2005 23:32:33 +0200	[thread overview]
Message-ID: <000001c5445e$2225bbc0$6401a8c0@geodb.org> (raw)
In-Reply-To: <200504030643.13171.caiqiang@ustc.edu>

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 = 512 Bytes

Cylinders = 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 = 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 <img size in bytes> / (heads * sectors per cylinder 
> * 512 bytes) = 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 ) = 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

  parent reply	other threads:[~2005-04-18 21:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-03  6:43 [Qemu-devel] about serial port support Cai Qiang
2005-04-03  0:34 ` Jim C. Brown
2005-04-03  9:56 ` Andreas Bollhalder
2005-04-07 19:30 ` [Qemu-devel] FreeDOS Testimage Andreas Bollhalder
2005-04-18 21:32 ` Andreas Bollhalder [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-04-16 13:03 Re: [Qemu-devel] kqemu 0.6.2 and XP Ben Taylor
2005-04-19  0:52 Ben Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c5445e$2225bbc0$6401a8c0@geodb.org' \
    --to=bolle@geodb.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).