From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org, Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] Disk geometry and migration
Date: Wed, 11 Jul 2012 09:57:10 +0200 [thread overview]
Message-ID: <4FFD31D6.3010403@redhat.com> (raw)
In-Reply-To: <m3liiqhin4.fsf@blackfin.pond.sub.org>
Il 11/07/2012 09:16, Markus Armbruster ha scritto:
>>> C. Do not derive default geometry from DOS partition table
>>>
>>> Can do only for new machine type, because it may break guests.
It will indeed break boot of old images (e.g. FreeDOS). Hence:
C1. Do not derive default geometry from DOS partition table.
Dig out an old PC (the kind where you had to customize manually
the CHS in the BIOS setup) and make a list of valid CHS values.
Warn at startup if the disk is smaller than the biggest value
in the table _and_ geometry is not in the table and is not
specified manually.
This will still be doable only for new machine types, but perhaps for
old machine types we can print a warning if the guess does not match the
result of the above algorithm. Then deprecate the guessing in a few
releases, even for old machine types.
Of course, teh Google is a good replacement from digging out an old PC.
http://www.modemsoft.it/bios.html gives the following table, with only
two ambiguous settings:
C H S sectors MB | alt C alt H alt S
-------------------------------------------|
306 4 17 20808 10.1602
306 5 17 26010 12.7002
1024 2 17 34816 17
306 8 17 41616 20.3203 | 612 4 17
615 4 17 41820 20.4199 | 820 3 17
733 5 17 62305 30.4224
615 6 17 62730 30.6299
462 8 17 62832 30.6797
977 4 17 66436 32.4395
855 5 17 72675 35.4858
809 6 17 82518 40.292
977 5 17 83045 40.5493
820 6 17 83640 40.8398
1024 5 17 87040 42.5
733 7 17 87227 42.5913
940 6 17 95880 46.8164
855 7 17 101745 49.6802
977 7 17 116263 56.769
1024 7 17 121856 59.5
809 6 26 126204 61.623
940 8 17 127840 62.4219
1024 5 26 133120 65
1024 8 17 139264 68
1224 7 17 145656 71.1211
1024 9 17 156672 76.5
918 11 17 171666 83.8213
925 11 17 172975 84.4604
1024 10 17 174080 85
1224 9 17 187272 91.4414
776 8 33 204864 100.031
1024 12 17 208896 102
1024 13 17 226304 110.5
1224 11 17 228888 111.762
900 15 17 229500 112.061
918 15 17 234090 114.302
1024 14 17 243712 119
1024 15 17 261120 127.5
1024 16 17 278528 136
684 16 38 415872 203.062
(let's also add 1024/16/63 to the list). Just before sending I found a
more complete table at
http://www.win.tue.nl/~aeb/linux/hdtypes/hdtypes-3.html.
Paolo
prev parent reply other threads:[~2012-07-11 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-10 18:34 [Qemu-devel] Disk geometry and migration Markus Armbruster
2012-07-10 19:42 ` Blue Swirl
2012-07-11 7:16 ` Markus Armbruster
2012-07-11 7:57 ` Paolo Bonzini [this message]
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=4FFD31D6.3010403@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=blauwirbel@gmail.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).