As USB flash drives are increasingly being used as maintenance systems, more and more attention is being paid to them, and booting from a USB drive has become all the more critical. Syslinux booting has relatively high compatibility, so USB drives generally use it for booting. But for booting IMG images, it uses the memdisk RAM disk loader. memdisk normally only supports disks below 2.88MB. For images larger than 2.88MB, it requires the image's C/H/S values. How to determine the correct C/H/S for an IMG image has therefore become the key to making the image.
How to use the WinImage tool to create IMG floppy disk images
I. Calculating IMG capacity:
The standard floppy disk specs include 360 KB, 720 KB, 1440 KB, etc. Generally 1440 KB is used as one standard unit, that is, one standard floppy disk is 1.44MB. This standard is also certainly compatible with the 360 and 720 specs, so when making floppy disk images, we can use the 360 and 720 specs.
360 divided by 1440 equals 0.25 360/1440=0.25
720 divided by 1440 equals 0.5 720/1440=0.5 (equivalent to two 360/1440)
This coefficient of 0.25 provides a basic reference for making larger floppy disk images. Between 0 and 1 there are these three numbers: 0.25, 0.50, 0.75. Taking 1440 KB as one standard unit, there are 1440×0.25, 1440×0.5, 1440×0.75, thus giving the method for calculating image capacity.
Calculation method:
Image capacity=1440×n (n integer)
Image capacity=1440×n.25 (n integer)
Image capacity=1440×n.50 (n integer)
Image capacity=1440×n.75 (n integer)
Example: 1440×2.25=3240 KB capacity 1440×3.25=4680 KB capacity
1440×2.50=3600 KB capacity 1440×3.50=5040 KB capacity
1440×2.75=3960 KB capacity 1440×3.75=5400 KB capacity
1440×3 =4320 KB capacity 1440×4 =5760 KB capacity ............
II. Determining the C/H/S parameters:
When using the WinImage tool to create IMG floppy disk images, generally a standard system boot disk is used as the master disk (a Win98 system boot disk), and the capacity is expanded on that basis.
1. Use WinImage to open the master disk, then choose the custom image format in Change Format, see the attached picture:
Settings there:
File system(s): FAT 12/16 (this is the only option, floppy format)
Bytes per sector(B): 512 (generally use this)
Total sectors(n): image capacity×2 (one of the four calculation methods)
Sectors per track(T): 18(36) (for 1440×n.25 and 1440×n.75 choose 18; for 1440×n and 1440×n.50 choose 36)
Heads(H): 2(8) (for 1440×n.25 and 1440×n.75 choose 2; for 1440×n and 1440×n.50 choose 8)
Note: the sector standard uses increments of 18, 36 ....; heads use increments of 2, 8, 16....
2. Calculating the C/H/S value
C/H/S are interrelated and interdependent, and determine the standard parameters of the image disk. If any one of them is wrong, their relationship no longer holds, causing boot failure.
S=sectors per track(T)
H=heads(H)
C= total sectors(n) / (sectors per track(T)×heads(H) ) {C=integer}
Note: if C is not an integer, you need to recalculate the capacity or reset sectors per track(T) and heads(H)
Example 1: image capacity=1440×2.25
Settings:
total sectors(n)=1440×2.25 ×2=6480
sectors per track(T): 18
heads(H): 2
Calculate C=
C=6480/(18×2) = 180 (integer)
This gives C/H/S=180/2/18
Note: if you set sectors per track(T) to 36 and heads(H) to 8, then C=6480/(36×8)=22.5, which has a fraction, and there is no standard with half a track sector.
Example 2: image capacity=1440×2.50
Settings:
total sectors(n)=1440×2.50 ×2=7200
sectors per track(T): 36
heads(H): 8
Calculate C=
C=7200/(36×8) = 25 (integer)
This gives C/H/S=25/8/36
Note: if you set sectors per track(T) to 18 and heads(H) to 2, then C=7200/(18×2)=200, an integer, which also works.
I have long used the above method to make IMG floppy disk images, and basically they can boot successfully with memdisk. If there is anything wrong above, I respectfully ask the experts to correct me. Thanks.
In short, the key points are: 1. the master disk must be standard, 2. calculate capacity according to the spec, 3. set memdisk c=? h=? s=? floppy correctly.
Attached: several IMG images I made (created with WinImage 8.10.8100 Chinese-localized edition, compressed with WinGZIP, tested under syslinux3.62 in VM, and with the Windows 98 boot disk)
An old student 2008.3.3
How to use the WinImage tool to create IMG floppy disk images
I. Calculating IMG capacity:
The standard floppy disk specs include 360 KB, 720 KB, 1440 KB, etc. Generally 1440 KB is used as one standard unit, that is, one standard floppy disk is 1.44MB. This standard is also certainly compatible with the 360 and 720 specs, so when making floppy disk images, we can use the 360 and 720 specs.
360 divided by 1440 equals 0.25 360/1440=0.25
720 divided by 1440 equals 0.5 720/1440=0.5 (equivalent to two 360/1440)
This coefficient of 0.25 provides a basic reference for making larger floppy disk images. Between 0 and 1 there are these three numbers: 0.25, 0.50, 0.75. Taking 1440 KB as one standard unit, there are 1440×0.25, 1440×0.5, 1440×0.75, thus giving the method for calculating image capacity.
Calculation method:
Image capacity=1440×n (n integer)
Image capacity=1440×n.25 (n integer)
Image capacity=1440×n.50 (n integer)
Image capacity=1440×n.75 (n integer)
Example: 1440×2.25=3240 KB capacity 1440×3.25=4680 KB capacity
1440×2.50=3600 KB capacity 1440×3.50=5040 KB capacity
1440×2.75=3960 KB capacity 1440×3.75=5400 KB capacity
1440×3 =4320 KB capacity 1440×4 =5760 KB capacity ............
II. Determining the C/H/S parameters:
When using the WinImage tool to create IMG floppy disk images, generally a standard system boot disk is used as the master disk (a Win98 system boot disk), and the capacity is expanded on that basis.
1. Use WinImage to open the master disk, then choose the custom image format in Change Format, see the attached picture:
Settings there:
File system(s): FAT 12/16 (this is the only option, floppy format)
Bytes per sector(B): 512 (generally use this)
Total sectors(n): image capacity×2 (one of the four calculation methods)
Sectors per track(T): 18(36) (for 1440×n.25 and 1440×n.75 choose 18; for 1440×n and 1440×n.50 choose 36)
Heads(H): 2(8) (for 1440×n.25 and 1440×n.75 choose 2; for 1440×n and 1440×n.50 choose 8)
Note: the sector standard uses increments of 18, 36 ....; heads use increments of 2, 8, 16....
2. Calculating the C/H/S value
C/H/S are interrelated and interdependent, and determine the standard parameters of the image disk. If any one of them is wrong, their relationship no longer holds, causing boot failure.
S=sectors per track(T)
H=heads(H)
C= total sectors(n) / (sectors per track(T)×heads(H) ) {C=integer}
Note: if C is not an integer, you need to recalculate the capacity or reset sectors per track(T) and heads(H)
Example 1: image capacity=1440×2.25
Settings:
total sectors(n)=1440×2.25 ×2=6480
sectors per track(T): 18
heads(H): 2
Calculate C=
C=6480/(18×2) = 180 (integer)
This gives C/H/S=180/2/18
Note: if you set sectors per track(T) to 36 and heads(H) to 8, then C=6480/(36×8)=22.5, which has a fraction, and there is no standard with half a track sector.
Example 2: image capacity=1440×2.50
Settings:
total sectors(n)=1440×2.50 ×2=7200
sectors per track(T): 36
heads(H): 8
Calculate C=
C=7200/(36×8) = 25 (integer)
This gives C/H/S=25/8/36
Note: if you set sectors per track(T) to 18 and heads(H) to 2, then C=7200/(18×2)=200, an integer, which also works.
I have long used the above method to make IMG floppy disk images, and basically they can boot successfully with memdisk. If there is anything wrong above, I respectfully ask the experts to correct me. Thanks.
In short, the key points are: 1. the master disk must be standard, 2. calculate capacity according to the spec, 3. set memdisk c=? h=? s=? floppy correctly.
Attached: several IMG images I made (created with WinImage 8.10.8100 Chinese-localized edition, compressed with WinGZIP, tested under syslinux3.62 in VM, and with the Windows 98 boot disk)
An old student 2008.3.3


I like your stuff