China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 20:05
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » [Original] Using WinImage to Create Large IMG Floppy Disk Images View 6,947 Replies 14
Original Poster Posted 2008-03-03 18:04 ·  中国 湖南 株洲 电信
初级用户
Credits 56
Posts 13
Joined 2006-11-19 08:55
19-year member
UID 71039
Gender Male
Status Offline
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
Recent Ratings for This Post ( 2 in total) Click for details
RaterScoreTime
429499381 +20 2008-03-06 12:50
amao +4 2010-04-03 23:59
Floor 2 Posted 2008-03-04 10:56 ·  中国 湖北 武汉 电信
初级用户
Credits 32
Posts 14
Joined 2008-02-27 12:24
18-year member
UID 111535
Gender Male
Status Offline
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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Floor 3 Posted 2008-03-04 11:15 ·  中国 湖北 武汉 电信
初级用户
Credits 32
Posts 14
Joined 2008-02-27 12:24
18-year member
UID 111535
Gender Male
Status Offline
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??
Floor 4 Posted 2008-03-04 11:38 ·  中国 湖北 武汉 电信
初级用户
Credits 32
Posts 14
Joined 2008-02-27 12:24
18-year member
UID 111535
Gender Male
Status Offline
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 ]
Floor 5 Posted 2008-03-06 12:49 ·  中国 湖北 武汉 硚口区 电信
中级用户
★★
Credits 452
Posts 202
Joined 2006-12-21 13:46
19-year member
UID 74161
Gender Female
Status Offline
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
Floor 6 Posted 2008-03-06 19:33 ·  中国 安徽 马鞍山 电信
金牌会员
★★★★
Credits 3,946
Posts 1,884
Joined 2006-01-20 13:00
20-year member
UID 49283
Gender Male
Status Offline
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.
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
yanglin +1 2008-04-29 19:51
Windows 一键还原
http://www.yjhy.com
Floor 7 Posted 2008-03-06 20:53 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
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
第一高手 第二高手

Floor 8 Posted 2008-04-23 08:46 ·  中国 湖北 潜江 电信
中级用户
★★
Credits 376
Posts 164
Joined 2006-12-05 01:28
19-year member
UID 72582
Gender Male
Status Offline
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 ]
Floor 9 Posted 2008-04-28 21:57 ·  中国 湖南 株洲 电信
初级用户
Credits 56
Posts 13
Joined 2006-11-19 08:55
19-year member
UID 71039
Gender Male
Status Offline
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
Floor 10 Posted 2008-04-29 04:18 ·  中国 河南 三门峡 联通
新手上路
Credits 14
Posts 6
Joined 2008-04-09 17:13
18-year member
UID 115377
Gender Male
Status Offline
Question:
Can the entire XP system be made into IMG format or not?
Floor 11 Posted 2008-04-29 19:50 ·  中国 福建 福州 电信
新手上路
Credits 4
Posts 2
Joined 2008-04-22 20:48
18-year member
UID 116633
Gender Male
Status Offline
I like your stuff

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

Thanks!!!!!!!!!!!!!!!!!!
Floor 12 Posted 2008-05-04 18:54 ·  中国 广东 汕头 潮阳区 电信
高级用户
★★★
DOS时空
Credits 713
Posts 348
Joined 2007-02-10 13:59
19-year member
UID 79169
Gender Male
Status Offline
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 ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
fujianabc +1 2008-05-11 10:51
Floor 13 Posted 2008-05-10 19:40 ·  中国 河南 郑州 电信
新手上路
Credits 3
Posts 6
Joined 2007-06-10 11:34
19-year member
UID 90860
Gender Male
Status Offline
Recent Ratings for This Post ( 2 in total) Click for details
RaterScoreTime
fujianabc -5 2008-05-11 10:51
clonecd -2 2008-05-21 00:33
Floor 14 Posted 2009-04-22 22:32 ·  中国 浙江 绍兴 电信
初级用户
Credits 22
Posts 8
Joined 2009-04-11 09:23
17-year member
UID 142685
Gender Male
Status Offline
What does DISK I/O ERROR mean??
I've got all my settings right.
Floor 15 Posted 2009-08-04 08:37 ·  中国 广东 珠海 电信
新手上路
Credits 16
Posts 8
Joined 2009-08-03 12:09
16-year member
UID 149798
Gender Male
Status Offline
Many thanks for the reminder, I had thought only winimage was easy to use.
Forum Jump: