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 21:47
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Contiguous Block File Creation Tool FDefrag for grub View 4,221 Replies 19
Original Poster Posted 2003-11-20 00:00 ·  中国 广东 深圳 教育网
初级用户
Credits 150
Posts 18
Joined 2003-10-13 00:00
22-year member
UID 11178
Gender Male
Status Offline
Thanks to the work of Budian and lyh728, grub for dos and Vfloppy have brought us a lot of convenience

Budian mentioned that it is not feasible to let grub support files with non-contiguous blocks. Just then, lyh728 provided a test tool for contiguous blocks, blklst.exe. I just wrote a batch script to create contiguous block files using blklst. It's very simple. The main idea is to keep copying files and test whether they are already contiguous.

It passed the test under Windows XP. Under Win98 and Dos, maybe it's due to the environment problem of Djgpp. My blklstds.exe can't work normally (I have installed it according to the instructions of Djgpp). If blklstds.exe can work normally under your Win98 and Dos, replacing blklst with blklstds in FDefrag.bat should make it work under win98 or dos.

Usage:
FDefrag File_To_Be_Defrag
For example: FDefrag super.img

Download:
Open attachment
Floor 2 Posted 2003-11-21 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Thanks. Following... Hope someone can directly write a FDefrag program (instead of using the copy + test method) to just defragment a single file. First, search to see if such a thing already exists.
因为我们亲手创建,这个世界更加美丽。
Floor 3 Posted 2003-11-22 00:00 ·  中国 广东 深圳 教育网
初级用户
Credits 150
Posts 18
Joined 2003-10-13 00:00
22-year member
UID 11178
Gender Male
Status Offline
Just as you said, writing a disk defragmentation program requires a deep understanding of the file system, and in terms of efficiency, the speed of disk defragmentation is much slower than that of copy testing.

If it is booting a small image file and the disk has a relatively large remaining space, it is still recommended to use this copy testing method.
Additionally, System.Mechanic.Professional.v4.0c.WinALL.Incl.Keygen.READ.NFO-ViRiLiTY supports defragmenting individual files

Hope that lyh728 can test blklstds.exe under DOS again, so that a universal FDefrag script for both DOS and Windows can be written.
Floor 4 Posted 2003-11-22 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Thanks, brother cavvie.

As you mentioned, the method of copy testing is only suitable for small files. For large files such as ISO disc image files or hard disk image files (measurable in GB), it is not suitable.

So, if this copy testing method is used, it is not a complete solution in the end. Eventually, someone has to start from the file system to solve it. Instead of that, it is better to adopt this ultimate solution now, and also avoid wasting effort .

Is the software you mentioned above useful? It seems to be commercial software. If it is useful, just use it for the time being.
因为我们亲手创建,这个世界更加美丽。
Floor 5 Posted 2003-11-22 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
I don't know on which platforms the "System.Mechanic.Professional.v4.0c.WinALL.Incl.Keygen.READ.NFO-ViRiLiTY" can run. It would be nice if it could run under DOS, because GRUB for DOS and the like originally all run under DOS.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 6 Posted 2003-11-22 00:00 ·  中国 广东 深圳 教育网
初级用户
Credits 150
Posts 18
Joined 2003-10-13 00:00
22-year member
UID 11178
Gender Male
Status Offline
System.Mechanic.Professional.v4.0c.WinALL.Incl.Keygen.READ.NFO-ViRiLiTY
Go to my FTP to download:
ftp://219.223.194.139/

But unfortunately, it can only be used on Windows

Floor 7 Posted 2003-11-22 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Alas! I also found a sorting tool under Windows, very small, only 92K.

If only someone could transform it into a DOS version, heh heh.

Web description here: UNFRAG file fragmentation sorting tool:
http://www.mcadtools.net/show.asp?id=290

Download:

http://www.mcadtools.net/old/down/unfrag.zip

Operating environment: Windows 95/NT4.0
因为我们亲手创建,这个世界更加美丽。
Floor 8 Posted 2003-11-22 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Another thing under winNT, DefragMentor Lite 1.0, also very small, 140K, but can't download it:

http://www.zjbbs.he.cninfo.net/softdown/soft.asp?id=701
http://zj-www.he.cninfo.net/soft/defragml.zip

Also, the document obtained from

http://ftp.ncnu.edu.tw/cpatch/arc/unfrag/

says that unfrag has source code available for download. That's convenient now, right?

Supplement: Searching for unfrag source in http://www.google.com/ can find all the source code you want.
因为我们亲手创建,这个世界更加美丽。
Floor 9 Posted 2003-11-22 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
OK, here is another tool called Fraginator, with the source code download:

http://www.wsu.edu/~rolo/Fraginator.html

It is for FOR WIN2000/XP.
因为我们亲手创建,这个世界更加美丽。
Floor 10 Posted 2003-11-23 00:00 ·  中国 广东 深圳 教育网
初级用户
Credits 150
Posts 18
Joined 2003-10-13 00:00
22-year member
UID 11178
Gender Male
Status Offline
Fraginator is just a Gui front end of unfrag. I have searched all over Google for the source code of unfrag but can't find it.

In addition, I installed the stage2 file you gave me into the mbr, and most of the msdos boot disks can be booted, but there is still a problem when booting Wengier's "Super Universal msdos 7.1 Boot Disk".
map (hd0,0)/msdos711.img (fd0)
chainloader (hd0,0)/msdos711.img
boot
The result is just showing
stage1
and then nothing is displayed.
Because Wengier's "Super Universal msdos 7.1 Boot Disk" is also guided by grub, I don't know if grub can't re-enter?
Floor 11 Posted 2003-11-23 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
It should not be that GRUB cannot be reentrant. GRUB is reentrant. I have booted the GRUB floppy image with GRUB.

The problem here seems to be related to the version matching of GRUB. The GRUB version in the "Super Universal msdos 7.1 Boot Disk" is too old.

Regarding the unfrag source code, it should be available? I'll look for it again. How about this division of labor: I am responsible for finding, and you are responsible for programming? :-)


====================

Correction, what I said just now is incorrect, a bit far-fetched. It should belong to a BUG of GRUB. If I can reproduce this problem on my machine, I may be able to dig out this BUG.


因为我们亲手创建,这个世界更加美丽。
Floor 12 Posted 2003-11-23 00:00 ·  加拿大 安大略省 多伦多
系统支持
★★★★★★
“新DOS时代”站长
Credits 27,736
Posts 10,521
Joined 2002-10-09 12:00
23-year member
UID 9
Status Offline
Budian: Regarding the reentrancy issue of GRUB, my test results are as follows:

1: GNU GRUB can reenter GNU GRUB or GRUB for DOS;

2: GRUB for DOS can mostly reenter GNU GRUB, but it cannot reenter GRUB for DOS, otherwise it will crash or display the following prompt:

Sorry! Currently supported DOS versions are: MS-DOS 3.30 and later; FreeDOS
kernel build 2029 and 2032, and, hopefully, any later FreeDOS versions.

Programs such as TSRs and device drivers may also change the BIOS interrupt
vector table. Make sure those programs are not running, then try again.

In fact, it is all used in the MS-DOS environment, not other DOS, and the CONFIG.SYS/AUTOEXEC.BAT and other files have not been modified.

As for the relatively old version of GNU GRUB in the "Super MS-DOS 7.10 Boot Disk" is to save space, because the stage2 file in the new version of GNU GRUB is much larger than the stage2 file in this version. And the other DOS boot disk made last time used the latest version of GNU GRUB.
Wengier - 新DOS时代

欢迎大家来到我的“新DOS时代”网站,里面有各类DOS软件和资料,地址:
http://wendos.mycool.net/

E-Mail & MSN: wengierwu AT hotmail.com (最近比较忙,有事请联系DOSroot和雨露,谢谢!)

Floor 13 Posted 2003-11-23 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Okay, I'll take a look at the program for any problems when I have time.

================

So lucky! Just found it. The UNFRAG source code I found is in this package:

http://www.lanet.lv/ftp/simtelnet/msdos/pcmag/v16n22.zip

My task is successfully completed. :-)

If I'm even luckier, I might even over-fulfill the task and find a few more.

---------------

Found another CHKFRAG:

http://www.lanet.lv/ftp/simtelnet/msdos/pcmag/v16n22.zip

And a DEFRAG:

http://www.lanet.lv/ftp/simtelnet/msdos/pcmag/v12n04.zip

Hehe, really over-fulfilled the task. :-)

----------------

Oh! Correct it. The UNFRAG software I just found might not be useful because it seems to be for compressing word and excel files, not for organizing physical file fragments .

But DeFrag and CHKFrag should be useful.



因为我们亲手创建,这个世界更加美丽。
Floor 14 Posted 2003-11-23 00:00 ·  中国 广东 深圳 教育网
初级用户
Credits 150
Posts 18
Joined 2003-10-13 00:00
22-year member
UID 11178
Gender Male
Status Offline
Hehe, this defrag is for fat16, not for fat32
Floor 15 Posted 2003-11-23 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
There isn't much difference between FAT16 and FAT32. In the FAT table, entries of FAT16 occupy 2 bytes, and entries of FAT32 occupy 4 bytes. That's all. With the source code, it can always be modified. It should be better than starting from scratch. Don't lose heart :-)

Make full preparations. You can search for articles about the FAT file system structure again and then you can start working.
因为我们亲手创建,这个世界更加美丽。
Forum Jump: