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-07-25 06:01
中国DOS联盟论坛 » DOS启动盘 & LOGO技术 (启动盘室) » How to edit and make an image larger than 2.88M! View 1,030 Replies 2
Original Poster Posted 2005-11-18 21:13 ·  中国 浙江 金华 电信
新手上路
Credits 6
Posts 1
Joined 2005-11-18 19:34
20-year member
UID 45496
Status Offline
I'm a newbie, and I only started getting into DOS not long ago. I'm learning Grub now, so I need to make an image myself.
I'm planning to combine the strengths of lots of systems into one, so the image size will be around 5M..
With winimg I can only edit 1.44 or 2.88 images,, and I don't know what tool can edit a 5M one,.
I also looked through the moderator's sticky posts and didn't find anything mentioning this.
Please advise! Thanks!

[ Last edited by sufu44 on 2005-11-18 at 21:45 ]
Floor 2 Posted 2005-11-18 22:29 ·  中国 浙江 杭州 电信
中级用户
★★
Credits 416
Posts 125
Joined 2005-06-09 00:00
21-year member
UID 39497
Gender Male
Status Offline
winimg can edit it
Right now I just don't know how to change the size of an img file
I downloaded a 6m one from the Internet
There is a 128m one on a linux download site (but booting with this one will be a bit slower)
If your img file is going to be used as a DOS file
you need to change the boot sector properties
before it can boot
Floor 3 Posted 2005-11-18 23:01 ·  中国 河南 南阳 联通
初级用户
★★
Credits 137
Posts 57
Joined 2005-09-29 21:23
20-year member
UID 42974
Status Offline
First I want to say that if this floppy disk image is ultimately going to be placed on a CD as a boot image, then it can only be in one of three formats: 1.2M, 1.44M, and 2.88M. An image that is not in one of these three formats can only be placed in the boot area of the CD as a hard disk boot image (by the standard, that hard disk image can only contain one partition, and it must be in the position of the first partition in the MBR).

If you still want to make a 5M floppy disk image, the following method may be useful.

First, you need to have a 1.44M floppy DOS image. Or having a win98 on your hard disk is also fine. In short, you need some way to boot into pure DOS, and you also need Microsoft's FORMAT DOS utility. On your hard disk you need to prepare a 5M file, for example called 5M.IMG, and since we are going to write into it, everything already inside this 5M.img file will be overwritten.

All right, install the latest version of GRUB4DOS on your hard disk, and boot into GRUB.

At the GRUB command line, type in the following reference command(s) (the exact file locations need to be adjusted according to your own setup):

map --sectors-per-track=18 --heads=2 --unsafe-boot (hd0,0)/5m.img (fd1)

If it succeeds, continue with the steps below. If it fails (the failure message says the file is not contiguous), then you need to go back to DOS or WINDOWS and make several copies of 5M.IMG, such as 5M_001.img, 5M_002.img, and so on, then enter GRUB again until the above command executes successfully on one of those 5M.img files.

All right, assuming everything is OK, next do this:

map --mem (hd0,0)/DOS1440K.img (fd0)
map --floppies=2
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
boot

The above step is for booting into DOS. If you have DOS or Win98 on your hard disk, you can also replace it with the following steps:

chainloader (hd0,0)+1
map --floppies=2
rootnoverify (hd0)
boot

Be sure to hold down the ctrl key quickly, so you don't enter win98. You must only enter DOS, because when using map, WIN98 may damage your hard disk!

All right, you've successfully entered DOS. Now you should understand that drive B: is your target floppy, namely 5M.img. Now perform the format operation:

format B:

After formatting is finished, you can copy the files you need into B::

copy MY_FILE B:

All right, reboot the machine and enter DOS or Windows. The contents you just operated on in B: are actually in 5M.img. You have already made your 5M.img file.

As you have seen, without any special tools, as long as you have GRUB4DOS and your usual DOS utility disk, you can very easily make a floppy disk image file of any size.

[ Last edited by tinybit on 2005-11-18 at 23:10 ]
Forum Jump: