中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 00:35
47,811 topics / 349,897 posts / today 0 new / 48,256 members
GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » [Original] Using WinImage to Create Large IMG Floppy Disk Images
Printable Version  7,174 / 14
Floor1 zzoym Posted 2008-03-03 18:04
初级用户 Posts 13 Credits 56
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
Floor2 compass Posted 2008-03-04 10:56
初级用户 Posts 14 Credits 32
I've been worrying about this too.

This is the only thing left I haven't solved yet.


Just what I needed.

Brother, I really support you~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Floor3 compass Posted 2008-03-04 11:15
初级用户 Posts 14 Credits 32
The img file made this way can boot.

But grub still shows a prompt message, something about bsp being greater than something,

The menu is as follows:
title Boot dos Tools Disks
map --mem /boot/dos.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

If I don't use memdisk and use grub's map -mem instead, why is there still a prompt message??
Floor4 compass Posted 2008-03-04 11:38
初级用户 Posts 14 Credits 32
For a 14.4M img file, made according to the standard 1.44M as follows:

fat12/16
bytes per sector:512Byte
number of sectors:14400*10*2=28800
h=8
s=36
c=28800/(8*36)=100

map --mem still gives a warning prompt, but it can enter DOS booting
kernel /boot/grub/memdisk.gz c=100 h=8 s=36 floppy gives a prompt message too, and can also boot

I don't know whether the warning under the map --mem method needs attention. Those who use it, please give some advice.

[ Last edited by compass on 2008-3-4 at 11:52 AM ]
Floor5 429499381 Posted 2008-03-06 12:49
中级用户 Posts 202 Credits 452
Actually, fastslz posted a non-standard image package. Before extraction it was only a few MB, but after extraction it was several hundred MB.

To use it, you just need to choose an image of what you think is a suitable size, and put in everything you want to put in it.

, I'll go look for it
Floor6 lianjiang2004 Posted 2008-03-06 19:33
金牌会员 Posts 1,884 Credits 3,946
Originally posted by 429499381 at 2008-3-6 12:49:
Actually, fastslz posted a non-standard image package. Before extraction it was only a few MB, but after extraction it was several hundred MB.

To use it, you just need to choose an image of what you think is a suitable size, and put in everything you want to put in it.

, I'll go look for it

The sizes of those images are a bit too non-standard, and they don't seem very good.
Personally I'm used to using (1.44*n) MB, and it's also convenient to modify with winimage.
Floor7 fastslz Posted 2008-03-06 20:53
铂金会员 Posts 2,315 Credits 5,493 From 上海
Those 20 img files of different sizes I made were all done with real sectors. When used together with grub4dos, the probability of BUGs is much lower than with img files made by other methods.
The files are in the Many_Grub package http://www.cn-dos.net/forum/viewthread.php?tid=26321&fpage=1&highlight=&page=1
Floor8 minchengan Posted 2008-04-23 08:46
中级用户 Posts 164 Credits 376
I'd like to ask: I want to make a 70M floppy disk image. When changing the format in WINIMAGE, what numbers should I enter? I tried it myself, but although it successfully boots as drive A: with GRUB4DOS, when I copy a file larger than 20M to drive A:, it says "sector not found while writing to A drive". Files under about 20M seem to work, because copying a 17M file succeeded. Experts, what's going on?

[ Last edited by minchengan on 2008-4-23 at 09:05 AM ]
Floor9 zzoym Posted 2008-04-28 21:57
初级用户 Posts 13 Credits 56
Originally posted by minchengan at 2008-4-23 08:46 AM:
I'd like to ask: I want to make a 70M floppy disk image. When changing the format in WINIMAGE, what numbers should I enter? I tried it myself, but although it successfully boots as drive A: with GRUB4DOS, when I copy a file larger than 20M to drive A:, it sa ...


fat12/16
bytes per sector:512Byte
total sectors:144000
h=8
s=36


map --mem / ???.img (fd0)
map --hook
chainloader (fd0)/IO.SYS
Floor10 bxtemp Posted 2008-04-29 04:18
新手上路 Posts 6 Credits 14
Question:
Can the entire XP system be made into IMG format or not?
Floor11 yanglin Posted 2008-04-29 19:50
新手上路 Posts 2 Credits 4
I like your stuff

Just great, lately this is exactly the kind of stuff I've been lacking!!!

Thanks!!!!!!!!!!!!!!!!!!
Floor12 haiou327 Posted 2008-05-04 18:54
高级用户 Posts 348 Credits 713
ULTRAiso9.12 and DISKGEN both support making bootable floppy and hard disk IMG files










[ Last edited by haiou327 on 2008-5-4 at 07:00 PM ]
Floor13 yzh016 Posted 2008-05-10 19:40
新手上路 Posts 6 Credits 3
Floor14 kisslz Posted 2009-04-22 22:32
初级用户 Posts 8 Credits 22
What does DISK I/O ERROR mean??
I've got all my settings right.
Floor15 phlyer Posted 2009-08-04 08:37
新手上路 Posts 8 Credits 16
Many thanks for the reminder, I had thought only winimage was easy to use.
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023