|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 211 楼』:
使用 LLM 解释/回答一下
wangsea:
> 能否开发一个精简的Grub版本
我目前的答复是,不能。原因前面说过,要真正大规模精简,就得转向汇编语言,有可能将 GRUB 精简至 30K 以内。不过,你可以尝鲜 gandalf 新近创作的 avldr.exe。
> 功能:Grub XXX.img 命令行功能的版本(不需要menu.lst)
此处的问题是(前面也曾经提到过),XXX.img 要装入扩展内存的话,有可能失败。如果此时没有 himem等内存管理程序,那么这有可能实现,但是,在有 himem 等内存管理程序存在的情况下,这将变得很复杂,很困难了。也就是说,把 XXX.img拷贝到物理内存的顶端,这个目的恐怕达不到,拷贝过程有可能会失败(比如如果覆盖掉已经分配了的关键的 XMS内存的话)。如果谁能详细研究 XMS等等这些 DOS下的扩展内存规范,能够顺利实现拷贝的话,那么,他就可能制作出你所说的这种工具。我支持有人做,但我没有时间,也没有兴趣做,即使不考虑内存管理程序的影响,我也不想做(我认为其意义不是很大)。
如果你说的是脱离扩展内存,只使用磁盘介质的仿真(相当于没有 --mem 参数),并且假定 XXX.img 是连续的。这样可以实现你的要求,但是,仍然存在下面的问题:
如果你说的是用 grub 命令实现仿真,然后退回到-------原来的------ DOS,那么,这可是在欺骗 DOS,注意 DOS 有时可以被欺骗,有时它不能被欺骗。
如果你的系统中有一个真实的软驱,你用 XXX.img 仿真(fd0)软盘,这是可以欺骗 DOS 的。如果你的系统中有 n 个硬盘,而你用XXX.img 仿真第 n + 1 个硬盘,这恐怕不行,即使你同时修改了 BIOS 数据区中的软盘和硬盘个数字节,也不行。这是因为,DOS在启动时已经确定了磁盘的总数,在启动之后新增加的磁盘,它都可能不承认的。
还有一个问题是,此时很容易死机,我能想到的死机原因,大致有以下两个方面:
1. 如果仿真程序没有处理好 DOS 常规内存的 arena 结构,则 直接就死掉。
2. 如果仿真了当前 DOS 正在使用的磁盘,则当仿真之后 DOS 可能因为找不到原来真实磁盘上的内容而出错,甚至死掉。
有鉴于以上这些复杂的原因,所以,我不主张别人去做这样的开发。当然了,如果确实有 DOS 高手愿意做,那么这些问题可能都会得到解决的,虽然很不容易。
wangsea:
> Can you develop a streamlined version of Grub?
My current response is no. The reason has been mentioned earlier. To truly streamline it on a large scale, one would have to switch to assembly language, and it's possible to streamline GRUB to within 30K. However, you can try gandalf's newly created avldr.exe for a taste.
> Function: A command-line version of Grub XXX.img (no menu.lst needed)
The problem here is (as mentioned earlier) that if XXX.img is loaded into extended memory, it may fail. If there are no memory management programs like himem at this time, it might be achievable, but in the presence of such memory management programs, it becomes very complicated and difficult. That is, the goal of copying XXX.img to the top of physical memory may not be achieved, and the copying process may fail (for example, if it overwrites critical XMS memory that has already been allocated). If someone can study the extended memory specifications under DOS such as XMS in detail and can successfully implement the copying, then they may be able to make the tool you mentioned. I support someone doing it, but I don't have the time or interest to do it. Even without considering the impact of memory management programs, I don't want to do it (I think its significance is not very great).
If you mean without using extended memory, only using disk media emulation (equivalent to no --mem parameter), and assuming that XXX.img is continuous. This can meet your requirement, but there are still the following problems:
If you mean using the grub command to implement emulation and then return to the original DOS, then this is deceiving DOS. Note that DOS can sometimes be deceived and sometimes not.
If your system has a real floppy drive, you can deceive DOS by emulating (fd0) floppy disk with XXX.img. If your system has n hard disks and you use XXX.img to emulate the (n + 1)-th hard disk, this may not work. Even if you modify the bytes of the number of floppy disks and hard disks in the BIOS data area at the same time, it won't work. This is because DOS has determined the total number of disks at startup, and it may not recognize newly added disks after startup.
There is also a problem that it is very easy to crash. The possible crash reasons I can think of are roughly in the following two aspects:
1. If the emulation program does not handle the arena structure of DOS conventional memory well, it will directly crash.
2. If the currently used disk by DOS is emulated, then after emulation, DOS may make a mistake because it cannot find the content on the original real disk, and even crash.
In view of these complex reasons, I do not advocate others to develop such things. Of course, if there are really DOS experts willing to do it, then these problems may all be solved, although it is very difficult.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-28 00:00 |
|
|
wangsea
中级用户
  
积分 445
发帖 110
注册 2004-5-28
状态 离线
|
『第 212 楼』:
使用 LLM 解释/回答一下
不点:
我想可能是我没把意思表达清楚,比如我有一个批处理:menu.bat
grub.exe --config-file=(hd0,0)/test/menu.lst
我的menu.lst是这样的:
timeout 0
default 0
kernel (hd0,0)/test/memdisk.gz
initrd (hd0,0)/test/Grub.zip
boot
上面的批处理的内容仅仅是启动一个仿真的磁盘进入系统(不再退回),所以我想如果能去掉menu.lst(如果俺只是想仿真一个磁盘,不使用Grub的菜单功能,那么何必又要写menu.lst呢?),直接地在命令行输入:grub.exe -mem -fdo xxx.img 多好啊。
既然grubfordos可以在批处理中调用menu.lst直接仿真磁盘,那么命令行直接给参数应该可以的吧?(即便有一些目录路径限制这么做也值得的呀!)
Buddy:
I think maybe I didn't express my meaning clearly. For example, I have a batch file: menu.bat
grub.exe --config-file=(hd0,0)/test/menu.lst
My menu.lst is like this:
timeout 0
default 0
kernel (hd0,0)/test/memdisk.gz
initrd (hd0,0)/test/Grub.zip
boot
The content of the above batch file is just to start a simulated disk to enter the system (and not return), so I think if I can remove menu.lst (if I just want to simulate a disk and don't use the menu function of Grub, then why write menu.lst?), and directly enter in the command line: grub.exe -mem -fdo xxx.img would be great.
Since grubfordos can call menu.lst in the batch file to directly simulate the disk, then it should be possible to give parameters in the command line, right? (Even if there are some directory path restrictions, it's worth doing this!)
|
|
2005-4-28 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 213 楼』:
使用 LLM 解释/回答一下
你的意思是将菜单或者命令直接嵌入到命令行中。这个有点意思,应该可以实现。谢谢你提供此建议。请你关注 grub.exe 的开发。
You mean embedding menus or commands directly into the command line. That's interesting and should be achievable. Thank you for providing this suggestion. Please pay attention to the development of grub.exe.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-28 00:00 |
|
|
wangsea
中级用户
  
积分 445
发帖 110
注册 2004-5-28
状态 离线
|
『第 214 楼』:
使用 LLM 解释/回答一下
谢谢不点,期待grub的新功能。
Thanks, looking forward to new features of grub.
|
|
2005-4-28 00:00 |
|
|
gmy
版主
        操作系统爱好者
积分 1113
发帖 392
注册 2002-11-11
状态 离线
|
『第 215 楼』:
使用 LLM 解释/回答一下
GRUB菜单中加入引导U盘,不知能否做到?关键在于BIOS对U盘引导的支持不规范,有的形同虚设(USB-FDD,USB-HDD,USB-HDD)
Can the bootable USB drive be added to the GRUB menu? The key lies in the non-standard support of the BIOS for USB booting, and some are just a sham (USB-FDD, USB-HDD, USB-HDD)
|

DOS之家 http://doshome.com 站长 葛明阳 |
|
2005-4-29 00:00 |
|
|
GOTOmsdos
铂金会员
       C++启程者
积分 5154
发帖 1827
注册 2003-7-18
状态 离线
|
『第 216 楼』:
使用 LLM 解释/回答一下
有些BIOS不支持从U盘启动,GRUB能不能从U盘启动?(这当然需要在GRUB里事先加载U盘驱动的)
另,GRUB现在能不能支持多光驱?
Some BIOS does not support booting from USB drives. Can GRUB boot from a USB drive? (This of course requires pre-loading the USB drive driver in GRUB)
Also, can GRUB currently support multiple optical drives?
|
|
2005-4-30 00:00 |
|
|
dato
高级用户
   
积分 916
发帖 377
注册 2004-3-8
状态 离线
|
『第 217 楼』:
使用 LLM 解释/回答一下
好像有吧 --enable-preset-menu=FILE
preset a menu file FILE in Stage 2不过要是包含菜单的话,分发给别人,想修改就麻烦了
There seems to be, --enable-preset-menu=FILE
preset a menu file FILE in Stage 2But if it contains a menu, when distributing to others, it will be troublesome to modify
|

http://dato.ys168.com
google search bot
http://dato.minidns.net/ |
|
2005-4-30 00:00 |
|
|
hnlyzhd
高级用户
   
积分 544
发帖 164
注册 2004-10-17
状态 离线
|
『第 218 楼』:
使用 LLM 解释/回答一下
以下是引用gmy在2005-4-29 23:38:13的发言:
GRUB菜单中加入引导U盘,不知能否做到?关键在于BIOS对U盘引导的支持不规范,有的形同虚设(USB-FDD,USB-HDD,USB-HDD)
USB-ZIP是最有希望的一种可以引导的方式,不过有的BIOS不支持GRUB引导,你可以用安装到软盘的方法以,把GRUB安装到U盘,然后测试,我仅在ASUS和IBM的机子上成功启动
The following is the statement made by gmy on April 29, 2005 at 23:38:13:
Can we add USB drive booting to the GRUB menu? The key is that the BIOS support for USB drive booting is non-standard, and some are just a formality (USB-FDD, USB-HDD, USB-HDD)
USB-ZIP is the most promising bootable method, but some BIOS do not support GRUB booting. You can use the method of installing to a floppy disk, install GRUB to the USB drive, and then test. I only successfully booted on ASUS and IBM machines
|

我的留言簿
http://hnlyzhd.ys168.com 我的网络盘
|
|
2005-4-30 00:00 |
|
|
GONGXP
初级用户
 
积分 184
发帖 31
注册 2005-3-13
状态 离线
|
『第 219 楼』:
使用 LLM 解释/回答一下
还是关于从netware下远程启动的dos(6.22或者7.1)无法使用grub.exe的问题,试过Avldr情况也一样。netware下远程启动的dos改变了bios向量,int19,和int13,不知可否改改善grub for dos, 能够在这些“污染”了bios的dos中使用?
Still about the problem that DOS (6.22 or 7.1) remotely booted from NetWare cannot use grub.exe. The situation is the same when trying Avldr. The DOS remotely booted from NetWare changes the BIOS vectors, int19, and int13. Is it possible to improve grub for dos to be able to be used in these "polluted" BIOS DOS?
|
|
2005-4-30 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 220 楼』:
使用 LLM 解释/回答一下
gmy和GOTOmsdos的U盘/光盘相关问题,本人以前说过,无能力解决。
GONGXP的问题,也许将来我们可以一并解决,但是,现在我本人没有开发计划。将来如果改进我们的探测算法,就可能顺便把该问题解决掉。我本人不会专门为了这一个问题而去着手解决它。探测算法的改进,是一个巨大的变化,有相当大的开发难度,是不会优先开发它的。如果2006年年底时能做好就很不错了。如果你不能等待,你可以自己尝试修改 dosstart.S 来实现你的目的。
The issues related to U disks/cds of gmy and GOTOmsdos, as I said before, I have no ability to solve.
Regarding the issues of GONGXP, maybe we can solve them together in the future, but currently I have no development plan. If we improve our detection algorithm in the future, then this problem may be solved incidentally. I won't specifically start to solve this one problem. The improvement of the detection algorithm is a huge change, with quite a lot of development difficulties, and it won't be developed preferentially. It would be very good if it can be done by the end of 2006. If you can't wait, you can try to modify dosstart.S by yourself to achieve your purpose.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-30 00:00 |
|
|
hnlyzhd
高级用户
   
积分 544
发帖 164
注册 2004-10-17
状态 离线
|
|
2005-5-20 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 222 楼』:
使用 LLM 解释/回答一下
最近都在搞 wangsea 所提到的 grub.exe 的功能增强。真没想到这很麻烦,有许多困难需要克服,不过现在已经完成,在 0.4.1pre5 中实现了。
具体的实现是这样的:并未给 GRUB.EXE 增加新的命令行参数,而是仍旧沿用旧的 --config-file=FILE 格式,不过,对FILE 有新的解释。当 FILE 是以 左括号 "(" 或者 斜杠"/" 或者加号 "+"开头的时候,就仍旧像以前那样,解释为一个配置文件的名字。当 FILE 不是以上述三个字符之一开头的时候,认为 FILE是命令序列,也就是认为把配置文件的内容直接嵌入到 FILE 处了。注意,写在 FILE处的命令如果多于一条,应当用分号分隔开来,GRUB.EXE 会把“分号”自动转换成“换行符”,然后才交给 GRUB 的主程序。最好在 FILE的两边加上双引号。举例如下:
grub.exe --config-file="root (hd0,0);chainloader +1"
你注意到最后的一条 boot 命令是可以省略的。你甚至可以用
grub.exe --config-file="halt"
来关机,或者用
grub.exe --config-file="reboot"
来重启动机器。
也就是说,在 FILE 的位置,你可以填入任何 GRUB 可以识别的命令。
Recently, everyone has been working on enhancing the functionality of grub.exe mentioned by wangsea. I really didn't expect it to be very troublesome, with many difficulties to overcome, but now it's done and implemented in 0.4.1pre5.
The specific implementation is as follows: No new command-line parameters are added to GRUB.EXE; it still uses the old --config-file=FILE format, but there is a new interpretation of FILE. When FILE starts with the left parenthesis "(", or the slash "/", or the plus sign "+", it is still interpreted as the name of a configuration file as before. When FILE does not start with any of these three characters, it is considered a command sequence, that is, it is considered that the content of the configuration file is directly embedded at the FILE position. Note that if there are more than one command written at the FILE position, they should be separated by semicolons. GRUB.EXE will automatically convert "semicolons" into "newline characters" and then hand them over to the main program of GRUB. It is best to add double quotes around FILE. For example:
grub.exe --config-file="root (hd0,0);chainloader +1"
You notice that the final boot command can be omitted. You can even use
grub.exe --config-file="halt"
to shut down the machine, or use
grub.exe --config-file="reboot"
to restart the machine.
That is to say, at the FILE position, you can fill in any command that GRUB can recognize.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-5-26 00:00 |
|
|
Gandalf
中级用户
   CPU
积分 362
发帖 96
注册 2004-7-8 来自 北京
状态 离线
|
|
2005-5-26 00:00 |
|
|
wangsea
中级用户
  
积分 445
发帖 110
注册 2004-5-28
状态 离线
|
『第 224 楼』:
使用 LLM 解释/回答一下
感谢不点,在第一页提供的Grub地址中下吗?真有些迫不及待想试啦。有个建议: 能不能单独开发一个版本的grubfordos或是gurb带上某个参数后就可实现默认启动与grubfordos同一目录的img,不用填写root (hd0,0)这样的绝对磁盘路径(让程序来完成这个操作)。如果路径指定失败,返回一个错误提示后不再启动Gurb, 感觉这样更方便些。
Thanks to Budian, is it under the Grub address provided on the first page? I'm really eager to try it. There's a suggestion: Can you separately develop a version of grubfordos or gurb that, after bringing in a certain parameter, can achieve the default boot of the img in the same directory as grubfordos without filling in the absolute disk path like root (hd0,0) (let the program complete this operation). If the path specification fails, return an error message and then not start Gurb. I feel this would be more convenient.
|
|
2005-5-26 00:00 |
|
|
wangsea
中级用户
  
积分 445
发帖 110
注册 2004-5-28
状态 离线
|
『第 225 楼』:
使用 LLM 解释/回答一下
刚才做了个测试,成功启动了镜像
偶的参数:
grub.exe --config-file="map --mem (hd0,0)/gxms.img (fd0);map --hook;chainloader (fd0)+1"
使用的镜像是偶写的ghost完美中文shell (http://wangsea.ys168.com/ ghost完美中文shell目录下的gxms_hpa.rar)
发现有个问题:
1:第一次因我忘了指定(hd0,0)/gxms.img ,而直接写的是gxms.img,结果菜单出来后我编辑正确并启动镜像后在偶写的图形界面中死机。
2:参数如果第一次就指定正确进入镜像没有问题。
但不管参数正确与否,grub未启动镜像前软驱都一直在响,,直至屏幕上出现参数时才停止。
再次感谢不点提供了这么好一功能给我们使用,期待提供方法避免这个问题。
另外,因dos命令行的字符限制问题,还是我楼上想说的,能否有个默认当前路径,这样可以写更多的命令参数。
Just did a test just now, and successfully booted the image.
My parameters:
grub.exe --config-file="map --mem (hd0,0)/gxms.img (fd0);map --hook;chainloader (fd0)+1"
The image used is the Ghost perfect Chinese shell I wrote (http://wangsea.ys168.com/ under the Ghost perfect Chinese shell directory gxms_hpa.rar)
Found a problem:
1: The first time I forgot to specify (hd0,0)/gxms.img and directly wrote gxms.img, then after the menu came out I edited it correctly and booted into the image, but it froze in the graphical interface I wrote.
2: If the parameters are specified correctly the first time to enter the image, there is no problem.
But no matter whether the parameters are correct or not, the floppy drive has been beeping before grub boots the image, and it stops until the parameters appear on the screen.
Once again, thank you Budian for providing such a good function for us. Looking forward to a method to avoid this problem.
In addition, because of the character limit of the DOS command line, which is what my upstairs wanted to say, can there be a default current path, so that more command parameters can be written.
|
|
2005-5-26 00:00 |
|