Calculating Image Sizes

Creating a disk image using C/H/S values will require a number of calculations. Although the calculations below are based on a required size (in MB) the resulting disk image will by +/- 3.92 MB of the size required, as the image will be rounded up or down to the nearest cylinder. Assuming the standard Windows XP n/255/63 geometry (where n is the number of cylinders) will be used for the disk image -

  1. Divide the required size (in MB) by 7.84423828125
  2. To calculate the number of cylinders, use the value from step 1 and round up or down to the nearest whole number (e.g. values between 1.0 and 1.4 would be rounded down to 1, values between 1.5 and 1.9 would be rounded up to 2)
  3. Calculate the total number of sectors by multiplying the value from step 2 by 16065

E.g. to calculate the parameters for creating a disk image 1GB (1GB equals 1024MB) in size -

  1. 1024 divided by 7.84423828125 = 130.5416744475568
  2. Cylinders = 130.5416744475568 rounded up/down to the nearest whole number = 131
  3. Total Sectors = 131 multiplied by 16065 = 2104515

The above calculations are used for all of the methods covered in this guide (including superfloppy type images) to ensure that the disk images are compatible with Grub4dos and map without errors. An exception is a superfloppy disk image that may display an error if formatted using NTFS - see here.