From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52078) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SornY-000586-4F for qemu-devel@nongnu.org; Wed, 11 Jul 2012 03:57:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SornR-00041J-A2 for qemu-devel@nongnu.org; Wed, 11 Jul 2012 03:57:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51761) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SornR-000417-22 for qemu-devel@nongnu.org; Wed, 11 Jul 2012 03:57:17 -0400 Message-ID: <4FFD31D6.3010403@redhat.com> Date: Wed, 11 Jul 2012 09:57:10 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Disk geometry and migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Blue Swirl , Kevin Wolf , qemu-devel@nongnu.org, Juan Quintela 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