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-20 20:33
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » TinyBit, please come in, about GRUB for DOS virtualization View 3,242 Replies 27
Original Poster Posted 2004-08-30 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
Dear TinyBit,

Regarding using the "map" command to virtualize a disk file into a virtual disk, we have discovered that the "map" command also seems to check whether the disk file is in one continuous block.

Is there any command-line option for the "map" command that we can use to disable this check? Since if the disk file has already been confirmed to be in one continuous block, checking it every time seems to be a waste of time. Therefore, it would be more convenient if we could disable such checking when the user is certain that the disk file is already in one continuous block.

Floor 2 Posted 2004-08-30 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Using a map is inherently dangerous. If you don't check the continuity of the img file, it's even more dangerous!

Therefore, the map always checks the continuity of the img file.

There are no options to disable this function. But the next version 0.3.0 can add an option to avoid checking continuity. It may also rewrite the simulation code part to add the simulation and booting of the CDROM.
因为我们亲手创建,这个世界更加美丽。
Floor 3 Posted 2004-08-30 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is the speech of Budian in 2004-8-30 12:04:27:
Using map is inherently dangerous, and if the continuity of the img file is not checked, it is even more dangerous!
Therefore, map always checks the continuity of the img file.

There is no option to disable this function. But the next version 0.3.0 can add an option to avoid checking continuity. It may also rewrite the simulation code part, add the simulation and startup of CDROM.





Dear TinyBit,
We are about to release a new version of WinGRUB for GRUB For DOS, so could you put up or release a quick patch so that users can disable the checking of continous disk file image of the "map" command so that users can avoid such checking?
Floor 4 Posted 2004-08-30 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Well, fire-ships成,不过,等待一段时间,应当在一两个礼拜之内完成。我不甘心彻底取消check,只想让 check 更快一些,不至于影响大的 img 文件的使用.

(注:原句中“也行吧”可能是口语化表达,按要求直接翻译,“Well”对应;后面内容按字面翻译,其中“fire-ships成”可能是特定表述,保留原样。)
因为我们亲手创建,这个世界更加美丽。
Floor 5 Posted 2004-08-30 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is the speech by Budian on 2004-8-30 15:19:40:
Well, maybe. However, after waiting for a period of time, it should be completed within one or two weeks. I am not willing to completely cancel the check, I just want to make the check faster, so as not to affect the use of large img files.



Dear TinyBit,
Thank you very much!
We do not suggest to disable checking entirely. We hope that users can choose to check or skip checking when using the "map" command.
When using the "map" command for a particular disk file for the first time, it is good to have checking, but when a particular disk file has been checked and the user is sure that the disk file is already in a continuous block, he or she may want to disable the checking so that the system can be up and running fast.
Floor 6 Posted 2004-08-31 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
pre12 released, download:

http://grub.linuxeden.com/
ftp://ftp.linuxeden.com/tinybit/
ftp://ftp2.linuxeden.com/tools/

Changes: Fixed two bugs: 1. GRLDR boots from partitions beyond cylinder 1024; 2. Quickly check the continuity of img files.

Improved algorithm, quickly check, done in a flash, so no need to provide an option to disable checking.
因为我们亲手创建,这个世界更加美丽。
Floor 7 Posted 2004-08-31 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is a post by Budian at 2004-8-31 2:05:56:
pre12 released, download:

http://grub.linuxeden.com/
ftp://ftp.linuxeden.com/tinybit/
ftp://ftp2.linuxeden.com/tools/

Changes: Fixed two bugs: 1. GRLDR boots from partitions beyond cylinder 1024; 2. Quickly check the continuity of img files.

Improved algorithm, quickly check, done in a blink of an eye, so there is no need to provide an option to disable the check.


Dear Tinybit,
We shall test it before we release the new version of WINGRUB incorporating GRUB for DOS.
Bean promised to write the HELP file for WINGRUB.
A new homepage will be posted to sourceforge.net which will have url points to our own homepage for WINGRUB and the homepage/download sites of GRUB for DOS in addition to sourceforge.net
Floor 8 Posted 2004-08-31 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
亲爱的Tinybit,
顺便问一下,你有没有找出为什么有时一些连续的磁盘文件映射或虚拟化为驱动器后在DOS或Windows下无法写入的原因?这是你之前在这个论坛上发布的一个问题。
Floor 9 Posted 2004-08-31 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
There are no known issues under DOS at all.

Windows is not discussed because Windows sometimes uses BIOS and sometimes doesn't. Support for Windows is only "experimental".
因为我们亲手创建,这个世界更加美丽。
Floor 10 Posted 2004-09-03 00:00 ·  中国 广东 广州 天河区 电信
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is a quote from Budian's post on August 31, 2004 at 18:31:31:
No known issues have ever occurred under DOS.

Discussions under Windows are not relevant because Windows sometimes uses BIOS and sometimes doesn't. Support for Windows is only "experimental".





Dear Tinybit,
We have found that it is not feasible to use the "map" command to map a disk file into the c: drive for booting. It is possible to map a disk file as the a: drive for booting.
Have you succeeded in mapping a disk file as a bootable c: drive under DOS?
We have released a new version of WINGRUB. Please refer to bean123's post for download.
In our testing of mapping disk files, we found that a disk file of the correct size and format can be mapped as a bootable a: drive. And this a: drive can also be written to under DOS and Win9x.
A disk file of the correct size and format means that not any image disk file can be used, but the image file should be of a size calculated with the correct Cylinder/Head/Sector parameters and with the corresponding signature. Our WINDRV helps to generate these image files.
We are writing the help files for WINGRUB & WINDRV. They will soon be ready for formal release.
In the meantime, for testing WINGRUB, please leave comments or findings under bean123's post.
Floor 11 Posted 2004-09-04 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
I haven't encountered the situation where the emulation of the C: drive fails.

To emulate (hd0), the img file used must contain an MBR as the first sector. An IMG without an MBR cannot be emulated.

In fact, it's also possible without an MBR. For example, an img file that is all 00 bytes can also be used to emulate a hard disk:

map --unsafe-boot --sectors-per-track=63 --heads-per-cylinder=255 HD.IMG (hd0)

But after you use chainloader (fd0)+1 and the boot command to enter the operating system, the operating system will think that the disk is not partitioned, so it will not recognize the existence of the logical disk.

After you enter DOS with a floppy disk, run FDISK and FORMAT to partition and format the HD.IMG.
因为我们亲手创建,这个世界更加美丽。
Floor 12 Posted 2004-09-06 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is a statement from Budian at 18:25:37 on September 4, 2004:
I haven't encountered a situation where the emulation of the C: drive failed.

To emulate (hd0), the img file used must contain an MBR as the first sector. An IMG without an MBR cannot be emulated.

In fact, it's also possible without an MBR. For example, an img file filled with all 00 bytes can also be used to emulate a hard disk:

map --unsafe-boot --sectors-per-track=63 --heads-per-cylinder=255 HD.IMG (hd0)

But after you use chainloader (fd0)+1 and the boot command to enter the operating system, the operating system will think that the disk is not partitioned, so it will not recognize the existence of the logical drive.

After you enter DOS with a floppy disk, you can use FDISK and FORMAT to partition and format HD.IMG.






Dear Tinybit,
Let's follow your advice above and see if C: drive virtualization can be done.
Another good news for using GRUB4DOS is that we have tested using grldr within boot.ini on NTFS partition.
Win2K/XP can be run as usual. Besides, we are able to run other ramdisk-based OSes, including Win9x, Freebsd and Linux directly through grldr. May be bean123 will illustrate how that can be done in WINGRUB's help file.
Floor 13 Posted 2004-09-07 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is a quote from Budian's post on 2004-8-31 2:05:56:
pre12 released, download:

http://grub.linuxeden.com/
ftp://ftp.linuxeden.com/tinybit/
ftp://ftp2.linuxeden.com/tools/

Changes: Fixed two BUGs: 1. GRLDR boots from partitions after cylinder 1024; 2. Quickly check the continuity of img files.

Improved algorithm, quickly check, done in a blink, so there is no need to provide an option to prohibit checking anymore.







Dear Tinybit,
Today I experienced a strange problem with the 'map' command.
On a disk with only one bootable C: NTFS partition, I created a contiguous disk file. But your map command reports that the file is not contiguous.
I have checked it twice with 2 different defrag programmes; both of the programmes report that the file is contiguous; but your map command insists that the file is not contiguous.
These two free utilities are at:
http://www.defragmentor.com/dml/en/download2.asp
http://www.geocities.com/andreigaceff/DefragNT.html
Another finding is when I copied the disk file to another hard disk with FAT primary partition and the disk file was again detected as contiguous by DefragNT, I could run the same 'map' command successfully when booting up from this hard disk with FAT primary partition using grub.exe under DOS.
So could you give us at least an option for people to bypass the checking of contiguousness of a file when using your 'map' command in case there is a need?
I have also just found another problem with the 'map' command. When I used the 'map' command to mount up a disk file, it returns Error 16: file not found on a computer which has only one disk with only one FAT32 partition installed with XP. That is I booted up grldr within boot.ini on a FAT32 primary partition. Do you experience this problem?
Floor 14 Posted 2004-09-08 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Regarding the issue with map on NTFS, I guess there might be two situations:

1. There is a bug in the NTFS module of GRUB for DOS
2. The two tools you are using are problematic, or the continuity it reports conceptually differs from what GRUB refers to.

In either case, it is not appropriate to remove the check for continuity in map.

For 1. This indicates that GRUB cannot properly determine the physical sector location of a file. Therefore, using the map command on this img file may bring disasters, so this check cannot be removed.
For 2. Since those two tools are not suitable for our purpose, we have no need to refer to them. We first trust the result of GRUB's blocklist command. Only files listed by blocklist as fragmented are discontinuous files.

Since the check cannot be removed, there is no need to add this option.

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

Regarding the issue of not finding files under FAT32, that should not be an issue with GRUB for DOS but rather an issue with GNU GRUB. Report the bug to GNU GRUB.

GRUB cannot find a file with a space in its filename. The following files are all not okay:

(hd0,0)/Program Files/test.txt
(hd0,0)/my file.txt
因为我们亲手创建,这个世界更加美丽。
Floor 15 Posted 2004-09-08 00:00 ·  IANA 局域网IP(Private-Use)
中级用户
★★
Credits 385
Posts 118
Joined 2003-11-11 00:00
22-year member
UID 12678
Gender Male
Status Offline
The following is the speech of Budian in 2004-9-8 12:09:34:
Regarding the problem of map on NTFS, I guess there may be two situations:

1. There is a bug in the NTFS module of GRUB for DOS
2. The two tools you use are problematic, or the continuity it reports is conceptually different from what GRUB says.

In either case above, it is not suitable to remove the check of continuity by map.

For 1. This shows that GRUB cannot properly determine the physical sector position of a file, so using the map command on this img file may bring disaster, so the check cannot be removed.
For 2. Since those two tools are not suitable for our purpose, we have no need to refer to it. We first believe the result of GRUB's blocklist command. Only the files listed by blocklist are discontinuous files.

Since the check cannot be removed, there is no need to add this option.

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

Regarding the problem of not finding the file under FAT32, that should not be a problem of GRUB for DOS, but should be a problem of GNU GRUB, report a BUG to GNU GRUB.

GRUB cannot find a file with a space in the file name. The following files are all not okay:

(hd0,0)/Program Files/test.txt
(hd0,0)/my file.txt




Dear Tinybit,
We have been successful in some occasions of using the 'map' command on NTFS partition. But there are errors sometimes.
Could you tell us in which source file and where therein the 'map' command can be found as well as the NTFS support module so that we understand more about how the bug comes about?
Forum Jump: