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 _______________________________________________ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel