标题: TinyBit 请进,about GRUB for DOS virtualization
[打印本页]
作者: windrv
时间: 2004-8-30 00:00
标题: TinyBit 请进,about GRUB for DOS virtualization
Dear TinyBit,
About using the "map" command for virtualizing a disk file into a virtual disk, we find out that the "map" command seems to check also 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 checking? 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. So it is more convenient that we can disable such checking if the user is sure that such disk file is already in one continous block.
[此贴子已经被作者于2004-8-30 10:08:07编辑过]
作者: 不点
时间: 2004-8-30 00:00
使用 map 本来就危险, 如果不检查 img 文件的连续性, 则更是危险了!
因此, map 总是检查 img 文件的连续性.
没有选项可以禁止该功能. 但下一个 0.3.0 的版本可以增加一个选项以避免检查连续性. 还可能重写仿真代码部分, 把 CDROM 的仿真和启动增加上.
作者: windrv
时间: 2004-8-30 00:00
Quote: |
以下是引用不点在2004-8-30 12:04:27的发言:
使用 map 本来就危险, 如果不检查 img 文件的连续性, 则更是危险了!
因此, map 总是检查 img 文件的连续性.
没有选项可以禁止该功能. 但下一个 0.3.0 的版本可以增加一个选项以避免检查连续性. 还可能重写仿真代码部分, 把 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?
作者: 不点
时间: 2004-8-30 00:00
也行吧. 不过, 等待一段时间, 应当在一两个礼拜之内完成. 我不甘心彻底取消check, 只想让 check 更快一些, 不至于影响大的 img 文件的使用.
作者: windrv
时间: 2004-8-30 00:00
Quote: |
以下是引用不点在2004-8-30 15:19:40的发言:
也行吧. 不过, 等待一段时间, 应当在一两个礼拜之内完成. 我不甘心彻底取消check, 只想让 check 更快一些, 不至于影响大的 img 文件的使用. |
|
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.
作者: 不点
时间: 2004-8-31 00:00
pre12 发布, 下载:
http://grub.linuxeden.com/
ftp://ftp.linuxeden.com/tinybit/
ftp://ftp2.linuxeden.com/tools/
更动: 修复两个 BUG:1,GRLDR 从 1024 柱面之后的分区启动;2,快速检查 img 文件的连续性。
改进算法, 迅速检查, 一眨眼就完成, 因此无须提供禁止检查的选项了.
作者: windrv
时间: 2004-8-31 00:00
Quote: |
以下是引用不点在2004-8-31 2:05:56的发言:
pre12 发布, 下载:
http://grub.linuxeden.com/
ftp://ftp.linuxeden.com/tinybit/
ftp://ftp2.linuxeden.com/tools/
更动: 修复两个 BUG:1,GRLDR 从 1024 柱面之后的分区启动;2,快速检查 img 文件的连续性。
改进算法, 迅速检查, 一眨眼就完成, 因此无须提供禁止检查的选项了. |
|
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
作者: windrv
时间: 2004-8-31 00:00
Dear Tinybit,
By the way, have you found out why sometimes some continuous disk files mapped or virtualized as a drive cannot be written under DOS or Windows? This is a problem you posted in this forum previously.
作者: 不点
时间: 2004-8-31 00:00
DOS 下从未出现任何已知的问题.
windows 下不讨论, 因为 windows 有时使用 BIOS, 有时不使用 BIOS. 对 windows 的支持仅仅是"试验性"的.
作者: windrv
时间: 2004-9-3 00:00
Quote: |
以下是引用不点在2004-8-31 18:31:31的发言:
DOS 下从未出现任何已知的问题.
windows 下不讨论, 因为 windows 有时使用 BIOS, 有时不使用 BIOS. 对 windows 的支持仅仅是"试验性"的. |
|
Dear Tinybit,
We have found that it is not feasible to use "map" command to map a disk file into c: drive for booting. It is possible for mapping disk file as a: drive for booting.
Are you successful in mapping disk file as bootable c: drive under DOS?
We have released a new version of WINGRUB. Please see bean123's posting for download.
In our testing for mapping disk file, we found that disk file of the right size and format can be mapped as bootable a: drive. And this a: drive can be written under DOS and Win9x as well.
Disk file of the right size and format means that not any image disk file can be used, but the image file should be of a size calculated with right 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.
Meanwhile, for testing WINGRUB, please give comments or findings under bean123's posting.
[此贴子已经被作者于2004-9-3 22:53:27编辑过]
作者: 不点
时间: 2004-9-4 00:00
我还没有碰到仿真 C: 驱动器失败的情况.
要仿真 (hd0), 所用的 img 文件必须包含一个 MBR 作为第一扇区, 没有 MBR 的 IMG 是无法仿真的.
其实没有 MBR 也可以, 比如一个全部为 00 字节的 img 文件, 也可以用来仿真硬盘:
map --unsafe-boot --sectors-per-track=63 --heads-per-cylinder=255 HD.IMG (hd0)
但你用 chainloader (fd0)+1 和 boot 命令进入操作系统之后, 操作系统将认为该盘未经过分区, 于是不承认该逻辑盘的存在.
你用软盘进入 DOS 后, 运行 FDISK 和 FORMAT 可以对 HD.IMG 进行分区和格式化操作.
作者: windrv
时间: 2004-9-6 00:00
Quote: |
以下是引用不点在2004-9-4 18:25:37的发言:
我还没有碰到仿真 C: 驱动器失败的情况.
要仿真 (hd0), 所用的 img 文件必须包含一个 MBR 作为第一扇区, 没有 MBR 的 IMG 是无法仿真的.
其实没有 MBR 也可以, 比如一个全部为 00 字节的 img 文件, 也可以用来仿真硬盘:
map --unsafe-boot --sectors-per-track=63 --heads-per-cylinder=255 HD.IMG (hd0)
但你用 chainloader (fd0)+1 和 boot 命令进入操作系统之后, 操作系统将认为该盘未经过分区, 于是不承认该逻辑盘的存在.
你用软盘进入 DOS 后, 运行 FDISK 和 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.
作者: windrv
时间: 2004-9-7 00:00
Quote: |
以下是引用不点在2004-8-31 2:05:56的发言:
pre12 发布, 下载:
http://grub.linuxeden.com/
ftp://ftp.linuxeden.com/tinybit/
ftp://ftp2.linuxeden.com/tools/
更动: 修复两个 BUG:1,GRLDR 从 1024 柱面之后的分区启动;2,快速检查 img 文件的连续性。
改进算法, 迅速检查, 一眨眼就完成, 因此无须提供禁止检查的选项了. |
|
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? [Oh! I got the answer: There should only be letters within the filename and no numerals are allowed!]
[此贴子已经被作者于2004-9-7 16:14:03编辑过]
作者: 不点
时间: 2004-9-8 00:00
关于map在NTFS上的问题, 我猜可能有两种情况:
1. GRUB for DOS 的 NTFS 模块存在BUG
2. 你所用的两个工具有问题, 或者它所报告的连续性, 从概念上不同于 GRUB 所说的连续性.
无论上述哪种情况, 都不适合去掉 map 对于连续性的检查.
对于1. 这表明 GRUB 不能恰当确定一个文件的物理扇区位置, 因此用 map 命令于该 img 文件, 将可能带来灾难, 所以, 不可以去掉这个检查.
对于2. 既然那两个工具不适合我们的用途, 我们也就没有必要参考它了. 我们首先相信 GRUB 的 blocklist 命令的结果. 只有 blocklist 列出碎片的文件,才是不连续的文件.
既然不可以去掉检查, 也就没有必要添加这个选项了.
----------------
关于 FAT32 下找不到文件的问题, 那应当不是 GRUB for DOS 的问题, 而应当是 GNU GRUB 的问题, 向 GNU GRUB 报告 BUG 吧.
GRUB 并不能找到一个文件名中含有空格的文件. 以下文件都不行:
(hd0,0)/Program Files/test.txt
(hd0,0)/my file.txt
作者: windrv
时间: 2004-9-8 00:00
Quote: |
以下是引用不点在2004-9-8 12:09:34的发言:
关于map在NTFS上的问题, 我猜可能有两种情况:
1. GRUB for DOS 的 NTFS 模块存在BUG
2. 你所用的两个工具有问题, 或者它所报告的连续性, 从概念上不同于 GRUB 所说的连续性.
无论上述哪种情况, 都不适合去掉 map 对于连续性的检查.
对于1. 这表明 GRUB 不能恰当确定一个文件的物理扇区位置, 因此用 map 命令于该 img 文件, 将可能带来灾难, 所以, 不可以去掉这个检查.
对于2. 既然那两个工具不适合我们的用途, 我们也就没有必要参考它了. 我们首先相信 GRUB 的 blocklist 命令的结果. 只有 blocklist 列出碎片的文件,才是不连续的文件.
既然不可以去掉检查, 也就没有必要添加这个选项了.
----------------
关于 FAT32 下找不到文件的问题, 那应当不是 GRUB for DOS 的问题, 而应当是 GNU GRUB 的问题, 向 GNU GRUB 报告 BUG 吧.
GRUB 并不能找到一个文件名中含有空格的文件. 以下文件都不行:
(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?
作者: windrv
时间: 2004-9-8 00:00
Quote: |
以下是引用不点在2004-9-4 18:25:37的发言:
我还没有碰到仿真 C: 驱动器失败的情况.
要仿真 (hd0), 所用的 img 文件必须包含一个 MBR 作为第一扇区, 没有 MBR 的 IMG 是无法仿真的.
其实没有 MBR 也可以, 比如一个全部为 00 字节的 img 文件, 也可以用来仿真硬盘:
map --unsafe-boot --sectors-per-track=63 --heads-per-cylinder=255 HD.IMG (hd0)
但你用 chainloader (fd0)+1 和 boot 命令进入操作系统之后, 操作系统将认为该盘未经过分区, 于是不承认该逻辑盘的存在.
你用软盘进入 DOS 后, 运行 FDISK 和 FORMAT 可以对 HD.IMG 进行分区和格式化操作. |
|
Dear Tinybit,
Contrary to what you have said about mapping a disk file as C:, we have been able to boot from such disk file as C: and use it both under DOS and Win9x. And the disk file is bootable and formatted beforehand.
作者: 不点
时间: 2004-9-10 00:00
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?
map 命令在 builtins.c 文件中,但该命令和 NTFS 无关(没有直接关系),所以,可能无需修改它。
NTFS 支持模块是 fsys_ntfs.c 文件,我猜想,如果有 BUG 的话,很可能就是在这个文件里面了。
Contrary to what you have said about mapping a disk file as C:, we have
been able to boot from such disk file as C: and use it both under DOS
and Win9x. And the disk file is bootable and formatted beforehand.
是的,只要 img 文件中有 MBR,你确实可以顺利地用它来仿真硬盘。
作者: windrv
时间: 2004-9-10 00:00
Quote: |
以下是引用不点在2004-9-10 17:35:50的发言:
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?
map 命令在 builtins.c 文件中,但该命令和 NTFS 无关(没有直接关系),所以,可能无需修改它。
NTFS 支持模块是 fsys_ntfs.c 文件,我猜想,如果有 BUG 的话,很可能就是在这个文件里面了。
Contrary to what you have said about mapping a disk file as C:, we have
been able to boot from such disk file as C: and use it both under DOS
and Win9x. And the disk file is bootable and formatted beforehand.
是的,只要 img 文件中有 MBR,你确实可以顺利地用它来仿真硬盘。 |
|
Dear Tinybit,
Thank you for your advice.
Is it possible that the routine of checking contiguous file for the 'map' command cannot handle big numbers when the partition size of the hard disk is too large?
We are in fact able to boot up such contiguous files on partitions of several gigabytes.
作者: 不点
时间: 2004-9-11 00:00
是的, 确实存在 BIG NUMBER 问题.
GRUB 曾经把扇区总数定义为 int 也就是有符号的整数. 新近的版本中已经更正为 unsigned int 了.
然而 GRUB 总是使用 4 字节来表示整数, 所以, 如果你的扇区号码超过 4 字节的表示范围的话, 那么就会出现各种错误.
这是 GNU GRUB 的问题, 我不曾修正过它. 所有与此有关的 BUG 都是有 GNU 的管理者来修正的.
作者: windrv
时间: 2004-9-13 00:00
Quote: |
以下是引用不点在2004-9-11 19:20:34的发言:
是的, 确实存在 BIG NUMBER 问题.
GRUB 曾经把扇区总数定义为 int 也就是有符号的整数. 新近的版本中已经更正为 unsigned int 了.
然而 GRUB 总是使用 4 字节来表示整数, 所以, 如果你的扇区号码超过 4 字节的表示范围的话, 那么就会出现各种错误.
这是 GNU GRUB 的问题, 我不曾修正过它. 所有与此有关的 BUG 都是有 GNU 的管理者来修正的. |
|
Dear Tinybit,
According to your advice, I have used the 'blocklist' command to check that file which fails to be 'mapped', the result is:
blocklist (hd0,0)/part.img
(hd0,0)24810224+11671
The 'blocklist' commands seems to implement correctly and indicates that the image file is in one contiguous block. But the 'map' command fails to load the file.
Is it related to the GNU GRUB problem you referred to above?
Could the 'map' command handle this issue just like the 'blocklist' command does?
作者: 不点
时间: 2004-9-13 00:00
Oh! I got the answer: There should only be letters within the filename and no numerals are allowed!
是这样吗? 太令人吃惊了!
只允许字母, 不允许数字作文件名, 我还从未注意过, 首次听说呢. 准备试试看. 我想, 数字应当是允许的, 但空格却可能不行.
----------------------
关于 map 命令处理连续性, 由于你的不断报告, 我也在研究问题的根源. 我刚刚发现了一处毛病, 或许修改了就好了, 但还不能肯定. 这可能是我改进算法之后的一个疏忽的地方. 谢谢.
作者: windrv
时间: 2004-9-14 00:00
Quote: |
以下是引用不点在2004-9-13 15:02:17的发言:
Oh! I got the answer: There should only be letters within the filename and no numerals are allowed!
是这样吗? 太令人吃惊了!
只允许字母, 不允许数字作文件名, 我还从未注意过, 首次听说呢. 准备试试看. 我想, 数字应当是允许的, 但空格却可能不行.
----------------------
关于 map 命令处理连续性, 由于你的不断报告, 我也在研究问题的根源. 我刚刚发现了一处毛病, 或许修改了就好了, 但还不能肯定. 这可能是我改进算法之后的一个疏忽的地方. 谢谢. |
|
Dear Tinybit,
Thank you for your effort!
I hope that your improvement will bring us great convenience of launching various disk-file based operating systems using boot.ini on NTFS partition. Please give us the update when it is ready.
By the way, we have put up a new webpage on the homepage link of sourceforge.net for the project of GRUB4DOS & WINGRUB. The webpage has pointings to our webpage on our website therein with links to the webpages for GRUB4DOS on linuxeden.com & Wengier's previous link as site 1 and site 2. If you want to put up more links for GRUB4DOS, please email to bean. His address is bean@windrv.net
Also if you have any other ideas about how to design your weblinks or want to have a separate webpage on our site or have a new icon or logo for GRUB4DOS, you are welcome to give us your opinions so that we can serve you.
[此贴子已经被作者于2004-9-14 9:11:13编辑过]
作者: 不点
时间: 2004-9-14 00:00
我没有进一步的建议,只是觉得 sourceforge 的网页上似乎还没有释放出文件来。
作者: windrv
时间: 2004-9-14 00:00
Quote: |
以下是引用不点在2004-9-14 10:05:49的发言:
我没有进一步的建议,只是觉得 sourceforge 的网页上似乎还没有释放出文件来。 |
|
Dear Tinybit,
Bean is writing up the help file for WINGRUB and there may also be some examples of how to use GRUB. As it is ready, files can be uploaded to sourceforge.net or people can download from our site.
作者: 不点
时间: 2004-9-17 00:00
0.3 系列的第三个试验版. 这可以看作是 alpha 测试, 没有版本号, 只是用日期来表示不同的版本. 更正了上次版本不能启动 CDROM 的一个很顽固的 BUG.
这个版本中的 CDROM 相关命令仍然只能用于某些华硕的机器型号. 对于华硕机器, 可以报告 BUG 了. 下载:
http://grub.linuxeden.com/wakka.php?wakka=UploadFile/files.xml&action=download&file=grub-2004-09-17.tar.gz
ftp://ftp.linuxeden.com/tinybit/grldr
ftp://ftp2.linuxeden.com/tools/grldr
ftp://ftp.linuxeden.com/tinybit/grub.exe
ftp://ftp2.linuxeden.com/tools/grub.exe
用法:
map --cdrom=9 这条命令直接引导光驱中可引导的 CDROM 盘片. 如果成功, 光盘中的操作系统将被引导, 因而不可能返回到当前的 GRUB 环境. 如果失败, 将返回到当前的 GRUB 环境.
map --cdrom=8 类似于上面的 map --cdrom=9, 但只是做好启动 CDROM 的准备工作, 需要再敲入一条 boot 命令才真正开始启动 CDROM.
map --cdrom=4 这条命令挂接光驱, 使它成为 BIOS 硬盘 0x80. 机器中原来的硬盘号码相应的都增加 1, 变成 0x81,0x82 等等. 如果成功, 你可以用 root (hd0)/[TAB] (此处表示按 Tab 键)来列出光盘上的文件了. 也就是说, 此时,(hd0) 就是光盘介质, 而 (hd1) 是你原来的硬盘 C: 了.
map --cdrom=-1 这条命令卸载由 map --cdrom=4 所建立的挂接, 恢复 BIOS 各磁盘号码为原始的值.
在微软的 win98 安装盘的情形, 由于 1.44M 的软盘映像的位置是在光盘绝对扇区 0x15, 这个采用的单位是 2048 字节的扇区,翻译成 512 字节的扇区, 则是在光盘绝对扇区 0x54, 也就是十进制的 84, 所以,可以这样来仿真软盘(注意是用光盘上的扇区序列来仿真软盘):
map (hd0)84+2880 (fd0)
map --hook
现在你用 root (fd0)/[TAB] 就可以列出虚拟软盘里的文件了.
另外, 用 blocklist 命令还可以验证, 光盘上的任何文件都是连续的, 没有碎片. 因此, 光盘上的 img 文件总是可以用作磁盘仿真的.
----------------------------------
windrv 可以试试看, 是否已经纠正了 map 判断连续性的错误.
作者: windrv
时间: 2004-9-20 00:00
Dear Tinybit,
Initial testing shows that the updated version of grldr in relation to the 'map' command does not yet work.
[此贴子已经被作者于2004-9-20 11:02:10编辑过]
作者: 不点
时间: 2004-9-20 00:00
旧版本确定文件连续性的方法是: 读出整个文件, 核对每一个读出的扇区, 看看是否连续. 这种方法能够成功, 但是很慢.
新版本确定文件连续性的方法是: 读第一个扇区, 确定起始扇区的位置, 再读最末一个扇区, 确定终止扇区的位置. 有了起始和终止扇区的物理位置,再和文件的长度进行比较, 就可以得出该文件中全部扇区是否连续的结论.
今天晚上准备发布一个调试版本, 专门针对 map 连续性检查的. 仍旧是上述的下载地址, 不过文件的日期会变化,请 windrv 注意查收.
作者: windrv
时间: 2004-9-20 00:00
Quote: |
以下是引用不点在2004-9-20 15:42:30的发言:
旧版本确定文件连续性的方法是: 读出整个文件, 核对每一个读出的扇区, 看看是否连续. 这种方法能够成功, 但是很慢.
新版本确定文件连续性的方法是: 读第一个扇区, 确定起始扇区的位置, 再读最末一个扇区, 确定终止扇区的位置. 有了起始和终止扇区的物理位置,再和文件的长度进行比较, 就可以得出该文件中全部扇区是否连续的结论.
今天晚上准备发布一个调试版本, 专门针对 map 连续性检查的. 仍旧是上述的下载地址, 不过文件的日期会变化,请 windrv 注意查收. |
|
Thanks a lot!
[此贴子已经被作者于2004-9-20 16:55:02编辑过]