|
areyong
中级用户
  
积分 211
发帖 39
注册 2003-6-25
状态 离线
|
『第 196 楼』:
回复
使用 LLM 解释/回答一下
多谢WINDRV及不点!!
WINDRV的方法还没有测试。等测试之后再回答。
不点:
其实我要用GRUB的主要目的,就是GRUB能恢复被DOS污染了的BIOS环境。还原到一个真实的BIOS环境。因为我要启动的程序,可能就是基于BIOS上运行的(而不是基于DOS上运行的)。然而,我的电脑是无盘,必须先从网卡ROM启动,而网卡ROM的代码也会污染BIOS环境的。
我的设想是这样:用网卡ROM启动无盘电脑,启动无盘DOS,在DOS下加载网卡驱动后,把我需要启动的sys.img下载到DOS中的虚拟内存盘中(XMSDSK虚拟出来的内存盘)。然后,我用一个DOS程序来退出网卡ROM的代码,这个程序是现成的,已经过测试的。
此时,无盘机的状态是:已启动了DOS,DOS文件放成内存盘(XMSDSK虚拟出来的)中,而且这个DOS是个相对干净的DOS,(因为网卡启动代码已被我的退出程序退出了).这时DOS中也已经没有网卡启动代码所虚拟出来的A盘了。
在这种情况下,我需要用GRUB,来调用DOS内存虚拟盘中的sys.img,模拟启动。
不点:要是你有时间,可以有环境测试的,这样:你用有盘启动一个DOS,并具加载XMSDSK,让它模拟一个DOS内存虚拟盘,然后你拷一个FLOPPY.IMG到这个内存盘中。这样环境就好了,现在要做的是:
1:编个DOS程序,把XMSDSK内存盘里的FLOPPY.IMG推到你指定的物理内存之中。
2:把你刚才指定的物理内存虚拟成一个硬盘并告诉BIOS
3:用GRUB调用这个刚生成硬盘,并从它启动。或者调用这个里面的FLOPPY.IMG并启动。
4:完成。
也就是说,我的要求与是不是曾经用无盘启动芯片启动过无关,因为我可以在DOS中,把启动芯片程序退出来,就相当于没有用过无盘启动一样。
例如,我用启动光盘启动了一个DOS,此时会生成一个虚拟的A盘,同时,我又加载XMSDSK,生成一个虚拟的DOS内存盘,之后,假设我运行一个DOS程序,把启动光盘的控制代码退出,启动光盘所生成的虚拟A盘自然就消失了。这时,我的电脑就相当于是正常有盘启动一样,相当于不曾用光盘启动过。在这种情况下,我还需要用GRUB,来调用DOS内存盘(xmsdsk生成的)里的FLOPPY.IMG。但是,GRUB无法指向DOS的内存虚拟盘,GRUB不支持MAP J:\FLOPPY.IMG (FD0) 这个格式,所以,我们需要用另外的程序,把这个内存盘里的FLOPPY.img推到我们指定的物理内存段中,然后再把这个物理内存段虚拟成硬盘并从它启动。或者调用这个里面的FLOPPY.IMG再启动。---------当然这只是一个例子,事实上我们没有一个把启动光盘的控制代码退出的程序,但是我们有把启动芯片的控制代码退出的程序。
Thanks to WINDRV and Budian!!
WINDRV's method hasn't been tested yet. I'll reply after testing.
Budian:
Actually, the main purpose for me to use GRUB is that GRUB can restore the BIOS environment polluted by DOS. Restore it to a real BIOS environment. Because the program I want to boot may run based on the BIOS (not based on DOS). However, my computer is diskless, and I must boot from the network card ROM first, and the code of the network card ROM will also pollute the BIOS environment.
My idea is like this: Boot the diskless computer from the network card ROM, start diskless DOS, after loading the network card driver under DOS, download the sys.img I need to the virtual memory disk (XMSDSK virtualized memory disk) in DOS. Then, I use a DOS program to exit the code of the network card ROM. This program is ready-made and has been tested.
At this time, the state of the diskless machine is: DOS has been started, the DOS files are placed in the memory disk (XMSDSK virtualized), and this DOS is a relatively clean DOS (because the network card boot code has been exited by my exit program). At this time, there is no longer the A drive virtualized by the network card boot code in DOS.
In this case, I need to use GRUB to call sys.img in the DOS memory virtual disk to simulate booting.
Budian: If you have time and can test in an environment, do it like this: You use a disked computer to boot into a DOS and load XMSDSK to simulate a DOS memory virtual disk, then copy a FLOPPY.IMG to this memory disk. Then the environment is ready. Now what needs to be done is:
1: Compile a DOS program to push the FLOPPY.IMG in the XMSDSK memory disk into the physical memory you specify.
2: Virtualize the physical memory you just specified as a hard disk and tell the BIOS.
3: Use GRUB to call this newly generated hard disk and boot from it. Or call this FLOPPY.IMG inside and boot from it.
4: Done.
That is to say, my requirement has nothing to do with whether it was ever started with a diskless boot chip, because I can exit the boot chip program in DOS, which is equivalent to not having used diskless boot.
For example, I boot into a DOS with a boot CD, which will generate a virtual A drive. At the same time, I load XMSDSK to generate a virtual DOS memory disk. Then, suppose I run a DOS program to exit the control code of the boot CD, and the virtual A drive generated by the boot CD will naturally disappear. At this time, my computer is equivalent to a normal disked boot, equivalent to not having been booted with the CD. In this case, I still need to use GRUB to call FLOPPY.IMG in the DOS memory disk (generated by xmsdsk). However, GRUB cannot point to the DOS memory virtual disk. GRUB does not support the format MAP J:\FLOPPY.IMG (FD0). So, we need another program to push the FLOPPY.img in this memory disk into the specified physical memory segment, then virtualize this physical memory segment as a hard disk and boot from it. Or call this FLOPPY.IMG inside and boot from it. ---------Of course, this is just an example. In fact, we don't have a program to exit the control code of the boot CD, but we have a program to exit the control code of the boot chip.
|
|
2005-4-21 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 197 楼』:
使用 LLM 解释/回答一下
hnlyzhd:
1.现有的GRLDR能否实现复制自身启动代码到MBR呢,还有上次我说的启动时的热键问题,最好能指定一个热键,时间有一秒就够了,不能等太长时间,任意键也不安全。如果没有热键来激活每次都会出现GRUB菜单的。启动时,肯定得有一段等待时间,如果没有的话,你还没来得及按你的热键,就已经进入下一步了。这段等待时间是 5 秒,应当说是比较合理的。如果只有一秒,也会容易造成按键太慢而无效。
现在,GRLDR 第三个字节默认是 0x80 ,也就是禁止了优先启动 previous MBR 的功能。要打开这个功能,必须手动将 GRLDR 的第三个字节变成 0. 这段程序虽然简单,但也够用了。想要优先启动 previous MBR 的人是少数,想要优先启动 GRLDR 的人是多数,所以,默认值照顾想要优先启动 GRLDR 的人。
如果按照你所说, 不用等待时间,而用热键,那么,要么你在程序运行之前来不及抢先按到热键,要么你过早地按了热键,此时,有些 BIOS 认为键盘操作失败,认为键盘失灵,强制锁住不运行了。所以,像目前这样给出提示比较好,你看到提示就按任意键,这是安全的。GRLDR 写入 MBR 的安装命令,就再等待一下吧。我考虑了,这在支持了LINUX分区之后实现比较合适,那时候可以通盘考虑这一问题。如果现在就做,到时候可能还得修正,比较费劲。
2.对于 GRUB从ROM中运行,我觉得应该可以的,就像ROMOS的FREEDOS在BIOS中启动一样。我觉得不太可行,也不太必要。我们可不是 ROM 生产厂家,还是让 ROM 厂家来做吧。不过,即使 ROM 厂家,应当也不容易,因为 GRUB 的体积太大了。
3.GRUB的CHAINLOADER能否启动BIOS中的PCI模块呢,在这方面来说BIOS的模拟器还是一个空白。如果需要相应模块,我可以提供给你,包括DOS和硬盘保护模块。
不太明白你这里所说的意思。启动这些模块,不知道有什么用。按道理来说,ROM 模块只能由 BIOS统一调用,当进入用户程序之后,就不应当再调用 ROM 模块了,因为 ROM 模块本来就没有设计成让用户来调用的。在 GRUB接管控制的时刻,BIOS 的启动已经完成,用户程序已经开始。所有的 ROM 模块都已经完成了它的初始化,并把相关信息记录到了中断向量表,BIOS 数据区,以及扩展的 BIOS 数据区,因此也无需重复执行它了,或者说,重复执行可能还会造成冲突。当然在 GRUB之下,你确实可以执行任意的命令,但是,你总得知道你要执行的命令的内存地址才行,也就是说,你想要执行的 JMP跳转指令的目的地是在哪里。如果你能确定这个,那么,用 GRUB 实现它,是轻而易举的。
hnlyzhd:
1. Can the existing GRLDR implement copying its own boot code to the MBR? Also, the hotkey issue during startup I mentioned last time. It's best to specify a hotkey, and one second is enough, not too long to wait. A random key isn't safe either. If there's no hotkey, the GRUB menu will appear every time. During startup, there must be a waiting time. If there isn't, you won't have time to press your hotkey before moving on. This waiting time is 5 seconds, which is relatively reasonable. If it's only one second, it's also easy to cause the key press to be too slow and ineffective.
Currently, the third byte of GRLDR is 0x80 by default, which prohibits the function of preferentially booting the previous MBR. To enable this function, you must manually change the third byte of GRLDR to 0. Although this program is simple, it's sufficient. There are few people who want to preferentially boot the previous MBR, and most people want to preferentially boot GRLDR, so the default value caters to those who want to preferentially boot GRLDR.
If, as you said, there is no waiting time and a hotkey is used, then either you can't press the hotkey in time before the program runs, or you press the hotkey too early. At this time, some BIOSes think the keyboard operation has failed, think the keyboard is malfunctioning, and forcefully lock it and not run. So, it's better to give a prompt like the current one. When you see the prompt, press any key, which is safe. The installation command to write GRLDR to the MBR will wait a bit more. I considered that it's more appropriate to implement this after supporting the LINUX partition. At that time, this issue can be considered comprehensively. If it's done now, it might need to be corrected later, which is more laborious.
2. Regarding GRUB running from ROM, I think it should be possible, just like FREEDOS in ROMOS booting in BIOS. I think it's not very feasible and not very necessary. We are not ROM manufacturers, let ROM manufacturers do it. However, even for ROM manufacturers, it shouldn't be easy because the size of GRUB is too large.
3. Can GRUB's CHAINLOADER boot the PCI module in BIOS? In this regard, the emulator of BIOS is still a blank. If relevant modules are needed, I can provide them to you, including DOS and hard disk protection modules.
I don't quite understand what you mean here. I don't know what the use is to boot these modules. In theory, ROM modules can only be uniformly called by BIOS. When entering the user program, the ROM modules should not be called again because the ROM modules are not designed to be called by users. At the moment when GRUB takes over control, the BIOS startup has been completed and the user program has started. All ROM modules have completed their initialization and recorded relevant information in the interrupt vector table, BIOS data area, and extended BIOS data area, so there's no need to execute them repeatedly, or repeated execution might cause conflicts. Of course, under GRUB, you can indeed execute any command, but you always need to know the memory address of the command you want to execute, that is, where the destination of the JMP jump instruction you want to execute is. If you can determine this, then implementing it with GRUB is very easy.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-21 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 198 楼』:
使用 LLM 解释/回答一下
areyong:
终于明白了你的意思。我现在还没有明确的思路,只有一些直觉上初步的看法,陈述如下。
根据你的描述,你此时可以在 DOS 下访问你的虚拟盘,以及其中的 SYS.IMG文件。但是,有个重要的问题,不知你注意过没有,就是,这个内存盘在物理内存中的位置,未必是连续的。第二个问题,该内存盘占据的物理内存地址,究竟在哪里?如果这两点不能确定,恐怕我们也就没有后续手段了。
假定在最理想的情况下,该内存盘所占据的物理内存空间是连续的一整块,而且正好占据物理内存的最顶端,那么在这种情况下,我们或许能够比较容易地给GRUB.EXE 增加某些个参数,用来传递内存盘的地址,这样也就可以在 GRUB 下访问到该内存盘里面的任意文件包括(sys.img文件)了。
如果太复杂,我们可能就不容易做了。
areyong:
Finally, I understand what you mean. I don't have a clear idea yet, but I have some initial intuitive thoughts, which are stated as follows.
According to your description, you can access your virtual disk and the SYS.IMG file in it under DOS at this time. However, there is an important issue. I wonder if you have noticed that the physical memory location of this memory disk may not be continuous. The second question is, where exactly is the physical memory address occupied by this memory disk? If these two points cannot be determined, I'm afraid we won't have subsequent means.
Assuming that in the most ideal case, the physical memory space occupied by this memory disk is a continuous block and exactly occupies the top of the physical memory, then in this case, we may be able to relatively easily add some parameters to GRUB.EXE to pass the address of the memory disk, so that we can access any file in this memory disk, including the sys.img file, under GRUB.
If it's too complicated, it may be difficult for us to do.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-21 00:00 |
|
|
areyong
中级用户
  
积分 211
发帖 39
注册 2003-6-25
状态 离线
|
『第 199 楼』:
回复:
使用 LLM 解释/回答一下
++++++++++++++++++++++++++++++++++++++++++++
不太明白你这里所说的意思。启动这些模块,不知道有什么用。按道理来说,ROM 模块只能由 BIOS统一调用,当进入用户程序之后,就不应当再调用
ROM 模块了,因为 ROM 模块本来就没有设计成让用户来调用的。在 GRUB接管控制的时刻,BIOS
的启动已经完成,用户程序已经开始。所有的ROM 模块都已经完成了它的初始化,并把相关信息记录到了中断向量表,BIOS
数据区,以及扩展的BIOS 数据区,因此也无需重复执行它了,或者说,重复执行可能还会造成冲突。当然在
GRUB之下,你确实可以执行任意的命令,但是,你总得知道你要执行的命令的内存地址才行,也就是说,你想要执行的
JMP跳转指令的目的地是在哪里。如果你能确定这个,那么,用 GRUB 实现它,是轻而易举的。
++++++++++++++++++++++++++++++++++++++++++++++
BIOS的PCI标准的ROM模块,一般是BIOS在初始化之后,如果找到了合符标准的ROM模块,则把这个ROM模块调入到内存0000:d800处,
(以32K为单位吧???我不太清楚),然后,BIOS来了个跳转,jmp 0000:d800,把控制权交给ROM。大致如此吧。 BIOS
数据区,以及扩展的BIOS 数据区等不用管它吧。
++++++++++++++++++++++++++++++++++++++++++++++
假定在最理想的情况下,该内存盘所占据的物理内存空间是连续的一整块,而且正好占据物理内存的最顶端,那么在这种情况下,我们或许能够比较容易地给
GRUB.EXE 增加某些个参数,用来传递内存盘的地址,这样也就可以在 GRUB 下访问到该内存盘里面的任意文件包括(sys.img文件)了。
+++++++++++++++++++++++++++++++++++++++++++++++
你知道,我们已经在DOS下,能读到XMSDSK内存盘里的SYS.IMG文件了,我们不需要去管这个文件在物理内存空间里是不是连在一起,我们可以在DOS下编个程序,强行把sys.img推到我们自已定义的物理内存空里,而且是连续的,不就行了。
另:我已用WINDRV所说的方法,用带网络功能的GRUB,来实现了我先前的要求。我很高兴!
但这个带网络功能的GRUB,是基于GRUB4DOS 0.2.0版本的,没有“--MEM”这个功能。略有遗憾。
还有一个小问题,用GRUB之后,启动WINXP之后,WINXP就会发现两个软驱,但都用不了。表现为软驱灯闪一下之后,就说软盘没有格式化,其实软盘是好的。不知道用GRUB启动WIN9X之后,还可不可以用软驱?有没有好的解决办法?
++++++++++++++++++++++++++++++++++++++++++++
I don't quite understand what you mean here. I don't know what the use is of starting these modules. In theory, ROM modules can only be called uniformly by the BIOS. When entering the user program, the ROM modules should not be called again because the ROM modules are not designed for user calls. At the moment when GRUB takes over control, the BIOS startup has been completed and the user program has started. All ROM modules have completed their initialization and recorded relevant information in the interrupt vector table, BIOS data area, and extended BIOS data area, so there is no need to execute them repeatedly, or repeated execution may cause conflicts. Of course, under GRUB, you can indeed execute any command, but you always need to know the memory address of the command you want to execute, that is, where the destination of the JMP jump instruction you want to execute is. If you can determine this, then it is very easy to implement it with GRUB.
++++++++++++++++++++++++++++++++++++++++++++++
The BIOS PCI standard ROM module is generally that after the BIOS is initialized, if a conforming ROM module is found, the ROM module is loaded into memory 0000:d800 (in units of 32K??? I'm not sure), then the BIOS makes a jump, jmp 0000:d800, and hands over control to the ROM.大致 like this. You don't need to care about the BIOS data area and extended BIOS data area, etc.
++++++++++++++++++++++++++++++++++++++++++++++
Assuming that in the most ideal case, the physical memory space occupied by this memory disk is a continuous block and exactly occupies the top of the physical memory, then in this case, we may be able to more easily add some parameters to GRUB.EXE to pass the address of the memory disk, so that we can access any file in the memory disk, including the (sys.img file), under GRUB.
+++++++++++++++++++++++++++++++++++++++++++++++
You know, we have been able to read the SYS.IMG file in the XMSDSK memory disk under DOS. We don't need to care whether this file is connected together in the physical memory space. We can compile a program under DOS to force the sys.img to be pushed into our own defined physical memory space and be continuous, isn't that okay.
Another: I have used the method mentioned by WINDRV to implement my previous requirement with GRUB with network function. I'm very happy!
But this GRUB with network function is based on GRUB4DOS 0.2.0 version and does not have the "--MEM" function. A bit regrettable.
There is also a small problem. After starting WINXP with GRUB, WINXP will find two floppy drives but neither can be used. It shows that the floppy drive light flashes and then says the floppy disk is not formatted. In fact, the floppy disk is good. I don't know if the floppy drive can still be used after starting WIN9X with GRUB? Is there a good solution?
|
|
2005-4-21 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 200 楼』:
使用 LLM 解释/回答一下
> 但这个带网络功能的GRUB,是基于GRUB4DOS 0.2.0版本的,没有“--MEM”这个功能。略有遗憾。
不要紧,在 0.2.0 之下,你可以用 memdisk 的方法来实现和 --mem 类似的功能。
> 我们不需要去管这个文件在物理内存空间里是不是连在一起,我们可以在DOS下编个程序,强行把sys.img推到我们自已定义的物理内存空里,而且是连续的,不就行了。
关键是,在 DOS 下,可能根本无法编程达到你的目的。你要是不知道由 xmsdsk 虚拟出来的内存盘的物理地址,你有可能在拷贝 sys.img 到你所确定的目的地这一过程中,覆盖掉虚拟盘,从而使得拷贝归于失败。
另外还有一个问题,就是,XMS内存,有可能不等于物理内存。XMS所访问到的最大内存,不一定等于物理的最大内存。这恐怕是两个很不相同的概念。如果你能确定 XMS内存和物理内存是一回事,那么可能就好办一些。如果它们不是一回事,那么,你就很难把 SYS.IMG 拷贝到物理内存中指定的地址处。
既然你的问题已经通过别的途径解决了,那么我认为,这个讨论也就不用再继续了。正如上面所说,虽然表面上看,该问题不难解决,但实际上,要解决它,还有不少困难需要克服。表面上看,我们不用去了解 XMS 规范的细节,实际上,由于涉及到内存操作,因此不了解 XMS 规范是不行的。如果要处理 XMS规范,这个问题就不能算做简单的问题了,我们也没有必要费这么大的劲去获得这么一个可有可无的功能。
> 用GRUB之后,启动WINXP之后,WINXP就会发现两个软驱,但都用不了。
用 GRUB 虚拟磁盘之后,XP 不承认虚拟盘的,XP 不承认实模式下的一切东西,而 GRUB 的虚拟恰恰就是一个实模式的概念。XP的任何行为,都是 XP 自己的事情,与 GRUB 无关。既然已经知道 XP 不接受实模式的东西,所以,在 GRUB下实施的仿真,明确地不支持 XP。
在 win98 下,由 --mem 所仿真的磁盘是可以安全访问的。由不带 ----mem 所进行的仿真,可能会带来严重问题,比如,导致整个磁盘数据的全部丢失,都是有可能的。这在 readme 文件中已经提醒过了。
win98 下访问软驱是没问题的。
> But this network-enabled GRUB is based on GRUB4DOS version 0.2.0 and does not have the "--MEM" function. A bit of a pity.
It doesn't matter. Below version 0.2.0, you can use the memdisk method to achieve a similar function to --mem.
> We don't need to care whether this file is contiguous in the physical memory space. We can compile a program under DOS to forcefully push sys.img into our own defined physical memory space and make it contiguous, right?
The key is that under DOS, it may be根本 impossible to program to achieve your purpose. If you don't know the physical address of the memory disk virtualized by xmsdsk, you may overwrite the virtual disk during the process of copying sys.img to the destination you determined, thus making the copy fail.
Another problem is that XMS memory may not be equal to physical memory. The maximum memory accessed by XMS may not be equal to the physical maximum memory. This is probably two very different concepts. If you can be sure that XMS memory is the same as physical memory, then it may be easier. If they are not the same, then it is very difficult for you to copy SYS.IMG to the specified address in physical memory.
Since your problem has been solved through other means, then I think this discussion doesn't need to continue. As mentioned above, although it seems easy to solve on the surface, in reality, there are still many difficulties to overcome to solve it. On the surface, we don't need to understand the details of the XMS specification, but in reality, since it involves memory operations, it is necessary to understand the XMS specification. If we have to deal with the XMS specification, this problem cannot be regarded as a simple problem, and we don't need to go to so much trouble to get such a dispensable function.
> After using GRUB, after starting WINXP, WINXP will find two floppy drives, but neither can be used.
After GRUB virtualizes the disk, XP does not recognize the virtual disk. XP does not recognize anything in real mode, and GRUB's virtualization is exactly a real-mode concept. Any behavior of XP is XP's own business, irrelevant to GRUB. Since it is already known that XP does not accept real-mode things, the simulation implemented under GRUB clearly does not support XP.
Under win98, the disk simulated by --mem can be accessed safely. The simulation without --mem may bring serious problems, such as the possibility of losing all disk data, which has been reminded in the readme file.
Accessing the floppy drive under win98 is no problem.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-22 00:00 |
|
|
hnlyzhd
高级用户
   
积分 544
发帖 164
注册 2004-10-17
状态 离线
|
『第 201 楼』:
使用 LLM 解释/回答一下
T不点
我已经想了多种方法,在BIOS中加入GRUB来实现它,GRUB真是个不错的东东。
你那个QLINUX的IMG它不能够寻找硬盘上的GRLDR文件,如果你能做一个IMG,把你现有的GRLDR的前八个扇区做到IMG 的启动扇中,可以寻找硬盘上的GRLDR的话,我自可以用其他方法生成BIN文件加入ROM中,第二种方法是,你如果有时间做一个精简的GRLDR放入IMG中,这样最好,可以不要硬盘上的文件,用ROM就可以单独启动到GRUB。IMG大小不能卖过64K。
T Bu Dian
I have thought of various methods to add GRUB in the BIOS to achieve it. GRUB is really a great thing.
Your QLINUX's IMG can't find the GRLDR file on the hard disk. If you can make an IMG and put the first eight sectors of your existing GRLDR into the boot sector of the IMG so that it can find the GRLDR on the hard disk, then I can use other methods to generate a BIN file and add it to the ROM. The second method is that if you have time to make a streamlined GRLDR and put it in the IMG, that would be best. It can start to GRUB alone with the ROM without the file on the hard disk. The size of the IMG can't exceed 64K.
|

我的留言簿
http://hnlyzhd.ys168.com 我的网络盘
|
|
2005-4-25 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 202 楼』:
使用 LLM 解释/回答一下
> 你那个QLINUX的IMG它不能够寻找硬盘上的GRLDR文件,如果你能做一个IMG,
> 把你现有的GRLDR的前八个扇区做到IMG 的启动扇中,可以寻找硬盘上的GRLDR的话,
> 我自可以用其他方法生成BIN文件加入ROM中
软盘的映像当然无法做到了,因为软盘只有一个扇区,也就是第一扇区可以存放引导文件。你需要的是8个扇区或者更多。因此,要达到这个目的,需要的是一个硬盘映象。你制作一个硬盘映象文件,注意它的每磁道的扇区数不能少于8。然后,你按照 http://grub.linuxeden.com/中的方法,把GRLDR写入该“硬盘”,就成了一个硬盘映象了。
另外,如果你只是想利用这8个扇区的话,那么你无需借助于任何硬盘映象或者软盘映象。你只要将这 8 个扇区装载到 0000:7C00,并用 jmp跳转到这里执行,这就可以查找硬盘和软盘上的 GRLDR 文件了,非常简单,你完全可以在 ROM 中实现这个,因为这只占用 8 个扇区的 ROM空间,也就是 4K,很少的。
> 第二种方法是,你如果有时间做一个精简的GRLDR放入IMG中,这样最好,可以不要硬盘上的文件,
> 用ROM就可以单独启动到GRUB。IMG大小不能卖过64K。
这个可不那么容易了。光是那十多种文件系统的驱动程序,都要占用 80K的空间,更不用说还有别的了。要想大幅减少这段程序的空间占用,必须全部使用汇编语言,但这又是一个庞大的工程了,而且,这可不是一般的困难,而是非常困难的(在我看来),我想,这是没人愿意去做的。
> The IMG of your QLINUX can't find the GRLDR file on the hard disk. If you can make an IMG that embeds the first eight sectors of your existing GRLDR into the boot sector of the IMG so that it can find the GRLDR on the hard disk, then I can use other methods to generate the BIN file and add it to the ROM.
The floppy disk image naturally can't do that because a floppy disk only has one sector, that is, the first sector can store the boot file. What you need is 8 sectors or more. Therefore, to achieve this purpose, a hard disk image is needed. You make a hard disk image file, and note that the number of sectors per track is not less than 8. Then, you follow the method in http://grub.linuxeden.com/ to write GRLDR to this "hard disk", and it becomes a hard disk image.
In addition, if you just want to use these 8 sectors, then you don't need to rely on any hard disk image or floppy disk image. You just need to load these 8 sectors to 0000:7C00 and use jmp to jump here to execute, and then it can find the GRLDR file on the hard disk and floppy disk. It's very simple. You can completely implement this in the ROM because it only occupies 8 sectors of ROM space, that is, 4K, which is very small.
> The second method is that if you have time to make a streamlined GRLDR and put it in the IMG, that would be best. In this way, there is no need for the file on the hard disk, and you can start directly to GRUB with the ROM. The size of the IMG should not exceed 64K.
This is not that easy. Just the driver programs for more than a dozen file systems occupy 80K of space, not to mention other things. To significantly reduce the space occupied by this program, you must use assembly language entirely, but this is also a huge project, and moreover, it's not generally difficult, but very difficult (in my opinion). I think no one is willing to do this.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-25 00:00 |
|
|
hnlyzhd
高级用户
   
积分 544
发帖 164
注册 2004-10-17
状态 离线
|
『第 203 楼』:
使用 LLM 解释/回答一下
TO 不点兄:那么咱们就说别的吧,关于那个骂你的人,我已经回复了,你大可不必那样和他计较,还是我说的,如果一天你在路上被狗咬了,你会和它计较吗?偶已经习惯了!关于下一个GRUB的构思,我简单说一下,如果有可能的话加入,文件列表,文件及文件夹拷贝和删除,以及隐藏和反隐藏最后分区也就是所谓的硬盘高端分区,这几个命令不知有没有实现的可能性,如果这样可以实现对于GRUB来说是个大的发展。我在静候佳音。
TO 不点兄:Then let's talk about something else. Regarding the person who scolded you, I have replied. You don't need to care about him so much. Still what I said, if one day you are bitten by a dog on the road, will you care about it? I'm already used to it! Regarding the next idea of GRUB, I'll briefly say. If possible, add file lists, file and folder copy and delete, as well as hide and unhide the last partition, which is the so-called high-end hard disk partition. I wonder if these commands are achievable. If so, it will be a great development for GRUB. I'm waiting for good news.
|

我的留言簿
http://hnlyzhd.ys168.com 我的网络盘
|
|
2005-4-26 00:00 |
|
|
Esme
初级用户
 
积分 170
发帖 35
注册 2005-2-24
状态 离线
|
『第 204 楼』:
使用 LLM 解释/回答一下
EZBOOT可以生成有24位真彩启动画面的ISO,这个功能是如何实现的呢,如何在不需要显卡驱动的前提下正确的现实了24位色,好像是个不错的功能,如果镶入到MSDOS 7.1里,让24位色启动画面贯穿开机的全过程,直到config和autoexec执行完毕,那多棒啊,我觉得有必要考虑DOS系统的美观情况
EZBOOT can generate an ISO with a 24-bit true color boot screen. How is this function achieved? How does it correctly display 24-bit color without the need for a graphics card driver? It seems like a nice function. If it is embedded into MSDOS 7.1, so that the 24-bit color boot screen runs through the entire boot process until config and autoexec are executed, that would be great. I think it is necessary to consider the aesthetic situation of the DOS system.
|
|
2005-4-26 00:00 |
|
|
Esme
初级用户
 
积分 170
发帖 35
注册 2005-2-24
状态 离线
|
『第 205 楼』:
使用 LLM 解释/回答一下
areyong,我觉得你的设想完全可以用 -mem 参数解决,没必要非要用虚拟的内存盘你把你那个网络bios里的grub换成0.4.0以后的版本不就ok了吗,好像换一下不是很难吧
areyong, I think your idea can be completely solved with the -mem parameter, there's no need to specifically use a virtual memory disk. Just change the grub in your network bios to a version later than 0.4.0, right? It doesn't seem very difficult to change, I guess.
|
|
2005-4-26 00:00 |
|
|
gmy
版主
        操作系统爱好者
积分 1113
发帖 392
注册 2002-11-11
状态 离线
|
『第 206 楼』:
使用 LLM 解释/回答一下
许多软件的版本都是在首次发布后一年之内达到最佳状态,之后体积越来越大,多余的功能越来越多,核心功能倒退。如ACDSee为何在7.0出来之后,又推出了传统版2.44?这是教训,也是经验,希望 不点 时时审视自己和GRUB FOR DOS, 因为你是让我对LINUX有好感的第一人,大家也喜欢你,不要骄傲啊。目前我仅用0.2 ,因为0.4增加的功能一个让我心动的也没有(说实话),也可能你的思维太超前了,我还没有反应过来。
Many software versions reach their best state within one year after the first release. Then the volume gets larger and larger, there are more and more redundant functions, and the core functions regress. For example, why did ACDSee launch the traditional version 2.44 after 7.0 came out? This is a lesson and also an experience. I hope Budian will always review himself and GRUB FOR DOS, because you are the first person who made me have a good impression of LINUX, and everyone likes you. Don't be proud. Currently, I only use 0.2, because there is not a single function added in 0.4 that makes me excited (to be honest). Maybe your thinking is too forward-looking, and I haven't reacted yet.
|

DOS之家 http://doshome.com 站长 葛明阳 |
|
2005-4-26 00:00 |
|
|
Esme
初级用户
 
积分 170
发帖 35
注册 2005-2-24
状态 离线
|
『第 207 楼』:
使用 LLM 解释/回答一下
gmy,0.4版本比0.2版本要安全多了,你难道没发现?新增的 -mem 是破坏硬盘的可能大大降低,虽然0.2也可以借助 memdisk,但还要再增加这个文件,如果grldr本身就有这个功能,不是很好的事情吗,而且体积并没有增加,我觉得这是质的飞跃
gmy, version 0.4 is much safer than version 0.2, didn't you find that? The newly added -mem greatly reduces the possibility of damaging the hard disk. Although 0.2 can also use memdisk, it still needs to add this file. If grldr itself has this function, isn't it a good thing? Moreover, the size has not increased, I think this is a quantum leap
|
|
2005-4-27 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 208 楼』:
使用 LLM 解释/回答一下
有关GRUB for DOS的开发,谢谢兄弟们的意见和建议。我清楚地记得,grub4dos 0.0.x 的版本,就受到很多关注了。由于Wengier 把它介绍给 FreeDOS 等国外网站,使得关注它的人也延伸到了国外。GRLDR的加入,是很晚的事情了,最初是一位兄弟的建议,好像这位兄弟也是本论坛的会员。在他建议的时候,我还不能确定会开发成功。不过现在,GRLDR已经成为很重要的方面了,其重要性甚至超过 grub.exe。论坛中的许多人都对 grub4dos 的开发做出了贡献,有些人的名字已经写入了Changelog 之中,有些则根本没有提及。可以说,grub4dos 是大家的,我也只是其中的一位。当然这是 GPL 的性质所决定的了,“联合DOS论坛”也是提倡这种精神的。
不同的人使用 grub4dos 的目的也不同。那些 Linux 使用者,可能不太关心Grub4dos,或者虽然关心,但只关心个别简单的功能,比如,他们可能不需要磁盘仿真的功能。有些人只使用 grub.exe,有些人只使用grldr。很自然地,在这些人看来,他所用不到的功能都是多余的。如果他们可以全盘考虑的话,他们就会了解别人可能会有不同于自己的看法。事实上,世界上很难有绝对的“正确”和绝对的“错误”,都是从不同角度的不同观点和感受而已。大家多一些互相理解,那么这对于grub4dos或许是很有好处的。grub4dos是大家的,大家都希望它好。如果把大家比作一个“家庭”的话,那么 grub4dos就像是一锅饭(或一盘菜),有的人喜欢多放一些盐,有些人则喜欢淡一些。不可能做到让每个人都很满意,最多只能照顾多数,因此需要让我们当中的一些人,牺牲自己的需要,来满足别人的需要。微软这么大的公司,生产出的 WinXP 也不一定适合所有的人,有些人还要用 DOS/WIn98/WIn2000。
任何软件,它可改进的地方可能都很多。我们优先开发什么,这里面有个取舍,另外,还有一个开发难度、以及开发者的个人特长、爱好等等问题。还有一点,我们是基于 GNU GRUB 的,有些适合 GNU 去解决的问题,就不太适合由我们来解决。
当然,大家提建议,这本身就是对这一软件的承认、鞭策和促进,其目的还是希望这个软件能够更好。gmy对我本人有些过奖了,不必如此夸张,如此客气,努力是大家的,我也会更尽力。谢谢诸位。
Regarding the development of GRUB for DOS, thank you brothers for your opinions and suggestions. I clearly remember that the versions of grub4dos 0.0.x have received a lot of attention. Since Wengier introduced it to foreign websites such as FreeDOS, the people paying attention to it have also extended to foreign countries. The addition of GRLDR is a very late thing. Originally, it was a suggestion from a brother. It seems that this brother is also a member of this forum. When he made the suggestion, I wasn't sure if it would be successfully developed. But now, GRLDR has become a very important aspect, and its importance even exceeds that of grub.exe. Many people in the forum have contributed to the development of grub4dos. Some people's names have been written in the Changelog, and some have not been mentioned at all. It can be said that grub4dos belongs to everyone, and I am just one of them. Of course, this is determined by the nature of the GPL, and the "United DOS Forum" also advocates this spirit.
Different people have different purposes for using grub4dos. Those Linux users may not care much about Grub4dos, or although they care, they only care about individual simple functions. For example, they may not need the disk emulation function. Some people only use grub.exe, and some only use grldr. Naturally, in the eyes of these people, the functions they don't need are all redundant. If they can consider it comprehensively, they will understand that others may have different views from their own. In fact, it is very difficult to have absolute "correct" and absolute "wrong" in the world. They are all different views and feelings from different angles. If everyone is more understanding, then this may be very beneficial to grub4dos. Grub4dos belongs to everyone, and everyone hopes it is good. If we compare everyone to a "family", then grub4dos is like a pot of rice (or a plate of dishes). Some people like to put more salt, and some like it lighter. It is impossible to satisfy everyone. At most, we can take care of the majority. Therefore, some of us need to sacrifice our own needs to meet others' needs. Such a big company as Microsoft produces WinXP, which may not be suitable for everyone. Some people still need DOS/Win98/Win2000.
For any software, there may be many areas for improvement. There is a trade-off in what we develop first. Also, there are issues such as development difficulty, and the personal strengths and hobbies of the developers, etc. Another point is that we are based on GNU GRUB. Some problems suitable for GNU to solve are not very suitable for us to solve.
Of course, everyone's suggestions are, in themselves, an acknowledgment, motivation, and promotion of this software. The purpose is still to hope that this software can be better. gmy has overly praised me. There is no need to be so exaggerated and polite. The efforts are from everyone, and I will work harder. Thank you all.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-4-27 00:00 |
|
|
wangsea
中级用户
  
积分 445
发帖 110
注册 2004-5-28
状态 离线
|
『第 209 楼』:
使用 LLM 解释/回答一下
请教不点: 能否开发一个精简的Gurb版本,功能:Grub XXX.img 命令行功能的版本(不需要menu.lst),如果可能的话,最好是.com,这样内嵌Grubfordos方便一些。 这样可能更利于Grubfordos的推广(因为大家都可以在自已的程序中直接调用它来完成Grub的功能了)。
Asking not to point: Can we develop a streamlined version of Gurb? The function: the command-line function of Grub XXX.img command (no need for menu.lst). If possible, it is best to be in.com format, so that it is more convenient to embed Grub for dos. This may be more conducive to the promotion of Grub for dos (because everyone can directly call it in their own programs to complete the Grub function).
|
|
2005-4-27 00:00 |
|
|
Gandalf
中级用户
   CPU
积分 362
发帖 96
注册 2004-7-8 来自 北京
状态 离线
|
『第 210 楼』:
使用 LLM 解释/回答一下
我到有两个想法: - 从 Avldr.exe 的构架来说, 他可以实现 FAT1x/FAT32/NTFS/Ext2 分区载入任意大小的文件, 那么他也能够将 memdisk 和 FDD 的磁盘镜像文件按照 grub / syslinux 的方式读取到内存里面, 从而实现虚拟启动; - 而,如果 fdd 磁盘镜像文件较小, 我个人觉得,用 Grub4DOS 的 map 也可以 实现. 毕竟, 低端内存只有 640KB, 如果用上压缩技术, 估计 1.44 MB 的磁盘也都比较困难. 此外, 我们似乎可以"投机"一下,作一个类似于 NTOSKrnl.exe 的程序, 让 ntldr 从任何位置载入到内存,在保护模式下运行, 他可以包括一个 fdd 镜像的资源,然后进行(多)启动; 不过,这个东东,需要在安装了 NT 系统的机器上使用. 当然,也许我们可以精简载入需要的文件. ;-)
I have two ideas: - From the architecture of Avldr.exe, it can implement FAT1x/FAT32/NTFS/Ext2 partitions to load files of any size, so it can also read disk image files of memdisk and FDD into memory in the way of grub/syslinux, thereby realizing virtual boot; - And, if the FDD disk image file is small, I personally think that Grub4DOS's map can also be used. After all, the low-end memory is only 640KB. If compression technology is used, it is estimated that it is relatively difficult for a 1.44 MB disk. In addition, we seem to be able to "speculate" a bit, make a program similar to NTOSKrnl.exe, let ntldr load into memory from any position, run in protected mode, it can include a resource of FDD image, and then perform (multiple) boot; However, this thing needs to be used on a machine with an NT system installed. Of course, maybe we can streamline the files that need to be loaded. ;-)
|

f22_storm@163.com
http://sysoft.zdwx.com/
|
|
2005-4-27 00:00 |
|
|