qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Disk geometry and migration


From: Paolo Bonzini
Subject: Re: [Qemu-devel] Disk geometry and migration
Date: Wed, 11 Jul 2012 09:57:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]