|
waffle
中级用户
  
积分 230
发帖 37
注册 2003-5-24
状态 离线
|
『楼 主』:
WinGrub的问题
使用 LLM 解释/回答一下
我把Grub装在了u盘的启动扇区上,grldr放u盘根上,menu.lst放u盘/grub目录下。但是启动的时候老说找不到menu.lst,进grub控制台,root一看u盘被当成了fd0,照理说应该找得到menu.lst。从控制台能进其他系统。后来在(hd0,0)上放了个menu.lst马上找到了。请问是什么原因?
I installed Grub on the boot sector of the USB drive, placed grldr on the root of the USB drive, and placed menu.lst in the USB/grub directory. But when booting, it always said that menu.lst was not found. Entered the Grub console, and when I checked root, the USB drive was treated as fd0. It should have been able to find menu.lst. From the console, other systems could be booted. Later, when I placed a menu.lst on (hd0,0), it was found immediately. What is the reason?
|
|
2005-1-9 00:00 |
|
|
zdq789
初级用户
 
积分 182
发帖 10
注册 2004-12-28
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
我也有同样的问题,我是把u盘格式化为zip模式,用它启动电脑,在dos下运行grub,可以读出硬盘的menu文件,却读不出u盘上的menu! 而且我还无法把grub装入u盘的mbr,grub能够root出fd(0),但读不出u盘里的stage文件! 但我觉得,你既然能把归入把写入u盘,那grub应该可以读出u盘里的stage,也应该可以读出menu啊! 我是这样做的,root (fd0) setup (fd0)然后提示找不到stage文件,但文件确实存在!你是怎样把grub写入u盘的呢?请教?
I also have the same problem. I formatted the USB flash drive to ZIP mode, used it to boot the computer, ran GRUB under DOS, could read the menu file on the hard drive, but couldn't read the menu on the USB flash drive! Also, I can't install GRUB into the MBR of the USB flash drive. GRUB can root to fd(0), but can't read the stage file in the USB flash drive! But I think, since you can write to the USB flash drive, GRUB should be able to read the stage in the USB flash drive and should also be able to read the menu! This is what I did: root (fd0) setup (fd0) Then it prompts that the stage file is not found, but the file does exist! How did you write GRUB to the USB flash drive? Please teach?
|
|
2005-1-9 00:00 |
|
|
waffle
中级用户
  
积分 230
发帖 37
注册 2003-5-24
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
我的u盘好像只能USB-ZIP启动,FAT16格式,我发现用这种方式启动的时候主板不会理会u盘的扇区0(MBR),而是直接读引导扇区(扇区32),和软盘启动类似。我没有直接在物理机器上装wingrub,而是在虚拟机上的win98装了wingrub,然后把grub装在一个软盘上(实际用的是物理机上的一个软盘镜像),并且把虚拟机里硬盘上的menu.lst删除了,在虚拟机里用软盘启动能从软盘读到menu.lst,一切正常。再把这个软盘的启动扇区(也就是物理机上软盘镜像的第一个扇区)写到u盘的启动扇区(但要保留原本u盘启动扇区的BPB)。
My USB flash drive seems to only support USB-ZIP boot, FAT16 format. I found that when booting in this way, the motherboard ignores the sector 0 (MBR) of the USB flash drive and directly reads the boot sector (sector 32), similar to floppy disk boot. I didn't install wingrub directly on the physical machine, but installed wingrub in Win98 in a virtual machine, then installed GRUB on a floppy disk (actually using a floppy disk image on the physical machine), and deleted the menu.lst on the hard disk in the virtual machine. Booting from the floppy disk in the virtual machine can read menu.lst from the floppy disk, everything is normal. Then write the boot sector of this floppy disk (that is, the first sector of the floppy disk image on the physical machine) to the boot sector of the USB flash drive (but keep the original BPB of the USB flash drive's boot sector).
|
|
2005-1-10 00:00 |
|
|
waffle
中级用户
  
积分 230
发帖 37
注册 2003-5-24
状态 离线
|
『第 4 楼』:
使用 LLM 解释/回答一下
又发现个问题,如果用别的格式化工具格式化u盘,GRLDR非但不能找到menu.lst,连cat (fd0)/+TAB都会说没有找到文件。如果用win98的format,也不能找到menu.lst,但是cat (fd0)/+TAB会出来乱码,u盘上找不到文件可能和格式化工具有密切关系。出现乱码表示什么,目录被破坏还是怎么了,在windows系统里可是能正常看到文件的。
Another problem is found. If you use other formatting tools to format the USB flash drive, GRLDR not only fails to find menu.lst, but also cat (fd0)/+TAB will say that the file is not found. If you use win98's format, it also cannot find menu.lst, but cat (fd0)/+TAB will come out with garbled characters. The fact that there are no files found on the USB flash drive may be closely related to the formatting tool. What does the garbled characters indicate, is the directory damaged or something? But in the Windows system, the files can be normally seen.
|
|
2005-1-12 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
可惜我的机器太旧,不支持 USB 启动。猜想原因应该在 BIOS 上。
It's too old, so it doesn't support USB booting. I guess the reason is in the BIOS.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-12 00:00 |
|
|
waffle
中级用户
  
积分 230
发帖 37
注册 2003-5-24
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
感觉好像不是BIOS的问题,因为同样的机器和u盘,做成USB-ZIP启动方式的Dos启动盘就一切正常,就跟真的软驱一样,也是用盘符A:。
It feels like it's not a BIOS issue, because with the same machine and USB flash drive, the DOS boot disk made in USB-ZIP boot mode works perfectly fine, just like a real floppy drive, and it also uses drive letter A:.
|
|
2005-1-12 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
似乎与 GRUB4DOS 无关。
那么,问题可能是 GNU GRUB 的软盘处理部分有 BUG 了。我们大家都可以研究一下 GNU GRUB 的源代码,尤其是 asm.S 中有关软盘的处理。
另外,将 USB 仿真为硬盘(USB-HDD)时,出现不出现问题呢?问题都搜集起来,或许能提示我们 BUG 在哪。
It seems to have nothing to do with GRUB4DOS.
Then, the problem may be that there is a bug in the floppy disk handling part of GNU GRUB. We all can study the source code of GNU GRUB, especially the part related to floppy disks in asm.S.
In addition, when USB is emulated as a hard disk (USB-HDD), does the problem occur? Collecting all the problems may hint at where the bug is.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-13 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
请研究这条消息,看是否有用:
http://lists.gnu.org/archive/html/bug-grub/2004-11/msg00035.html
Please study this message to see if it is useful:
http://lists.gnu.org/archive/html/bug-grub/2004-11/msg00035.html
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-13 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 9 楼』:
使用 LLM 解释/回答一下
在上述 http://lists.gnu.org/archive/html/bug-grub/2004-11/msg00035.html 的情况下,用
map (fd1) (hd?)
应当就可以了。也就是,把 (fd1) 当作硬盘 (hd?),其中 ? 是一个你认为空闲的硬盘号码,比如用 0 就行。
In the case of the above http://lists.gnu.org/archive/html/bug-grub/2004-11/msg00035.html, using
map (fd1) (hd?)
should be okay. That is, treat (fd1) as the hard disk (hd?), where? is a hard disk number you think is free, for example, using 0 is fine.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-13 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
补充:
需要再用一条
map --hook
以便你在 grub 下使用硬盘 (hd?) 中的分区和文件。
该“硬盘” 上的文件应当是类似如下的表示法:
(hd?,0) ------------- 第一主分区
(hd?,1) ------------- 第二主分区
(hd?,2) ------------- 第三主分区
(hd?,3) ------------- 第四主分区
(hd?,5) ------------- 第一扩展分区
......................................
Supplement:
Need to use another line
map --hook
so that you can use the partitions and files in the hard disk (hd?) under grub.
The files on this "hard disk" should be represented as follows:
(hd?,0) ------------- First primary partition
(hd?,1) ------------- Second primary partition
(hd?,2) ------------- Third primary partition
(hd?,3) ------------- Fourth primary partition
(hd?,5) ------------- First extended partition
......................................
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-13 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 11 楼』:
使用 LLM 解释/回答一下
另外一点提示,或许有用:
如果你能获得 GRUB> 的提示符,在提示符下敲入
root (
也就是 root,一个空格,一个左括号,然后按键盘上的 TAB 制表键,那么,GRUB 将列出 GRUB 所识别到的系统中全部磁盘的号码。
你看看有没有多余的,如果有的话,那么那个多余的磁盘号码,可能就是你的 USB 盘了。如此,你就可以找到 USB 盘上的所有文件了。
Another hint that might be useful:
If you can get the GRUB> prompt, type in at the prompt
root (
That is, root, a space, a left parenthesis, then press the TAB key on the keyboard, then GRUB will list all the disk numbers of the systems recognized by GRUB.
See if there are any extra ones. If there are, that extra disk number might be your USB flash drive. In this way, you can find all the files on the USB flash drive.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-13 00:00 |
|
|
waffle
中级用户
  
积分 230
发帖 37
注册 2003-5-24
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
USB-HDD方式没法启动,据说一般的u盘是可以在USB-ZIP和USB-HDD两种方式之间切换的,但这种切换只有用厂商发布的专用软件才能完成,遗憾的是我这个u盘没有厂家的专用软件。我的u盘128M,全部容量只分了个主分区,FAT16格式。现在是以USB-ZIP方式启动的,grldr是能加载的,但是它不认u盘上的其他文件。root (+TAB的结果是Grub列出了fd0,hd0,hd1,这符合情况,我机器上是有2块硬盘和1个u盘,u盘被认做了fd0。关于map命令,我总觉得用fd0去map个硬盘似乎不妥当,因为既然系统把u盘认成了fd0,那么就会按照软盘的规范来操作了,而软盘是没有分区的概念的,硬盘又是有分区概念的。然后我map (fd0) (fd2)map --hook然后root (+TAB看到fd0,hd0,hd1,hd2root (hd2,0)结果报错error 19:selected cylinder exceeds maximum supported by BIOS
The USB - HDD mode cannot boot. It is said that general USB flash drives can switch between USB - ZIP and USB - HDD modes, but this switching can only be done with the special software released by the manufacturer. Unfortunately, my USB flash drive doesn't have the manufacturer's special software. My USB flash drive is 128M, and all the capacity is only divided into a primary partition, in FAT16 format. Now it is booted in USB - ZIP mode, grldr can be loaded, but it doesn't recognize other files on the USB flash drive. The result of root (+TAB) is that Grub lists fd0, hd0, hd1, which is in line with the situation. There are 2 hard drives and 1 USB flash drive in my machine, and the USB flash drive is recognized as fd0. Regarding the map command, I always feel that it is improper to map a hard drive with fd0, because since the system recognizes the USB flash drive as fd0, it will operate according to the specification of a floppy disk, and a floppy disk has no concept of partition, while a hard drive has the concept of partition. Then map (fd0) (fd2)map --hook Then root (+TAB) sees fd0, hd0, hd1, hd2root (hd2,0) results in an error error 19:selected cylinder exceeds maximum supported by BIOS
|
|
2005-1-13 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 13 楼』:
使用 LLM 解释/回答一下
为什么不这样呢:
map (fd0) (hd2)
map --hook
然后root (+TAB看到fd0,hd0,hd1,hd2然后root (hd2,+TAB
(此处显示hd2中的全部分区信息)
Why not do it like this:
map (fd0) (hd2)
map --hook
Then root (+TAB to see fd0, hd0, hd1, hd2 and then root (hd2,+TAB
(Here all partition information in hd2 is displayed)
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-14 00:00 |
|
|
不点
银牌会员
     不甘寂寞的人
积分 2491
发帖 1115
注册 2003-9-24
状态 离线
|
『第 14 楼』:
使用 LLM 解释/回答一下
不过你贴出的错误信息很能说明问题。基本可以断定,错误仍然属于 BIOS 的。
情况可能是这样的:BIOS 虽然实现了 USB 的扇区读写(int13/ah=02和03),但还有某些功能没有实现,比如 int13/ah=08h,或者 int13/ah=15h,或者这些功能实现得不正确,有错误。这些将直接导致 GRUB 不能承认该实现。
但是,缺少这些实现,又可以使得 DOS 能够正常启动,这就给人一个假象,使得我们误认为 GRUB 有 BUG。
那些写这段 BIOS 程序的人,他们只测试 DOS 能够启动就完事了,其实这里面潜藏着问题的。GRUB 不能正常识别它,这就是一个表现。如果你足够多地测试其它 DOS 软件,你还会发现还有别的程序无法运行,或者得到莫名其妙的结果。
But the error message you posted is quite indicative. It can basically be concluded that the error still belongs to the BIOS.
The situation might be like this: Although the BIOS has implemented sector reading and writing for USB (int13/ah=02 and 03), there are still some functions not implemented, such as int13/ah=08h, or int13/ah=15h, or these functions are implemented incorrectly. These will directly cause GRUB not to recognize the implementation.
However, the lack of these implementations can make DOS start normally, which gives a false impression, making us mistakenly think that GRUB has a bug.
Those who wrote this BIOS program only tested that DOS can start and that's it. In fact, there are hidden problems here. GRUB not being able to recognize it normally is one manifestation. If you test other DOS software enough, you will also find that other programs cannot run or get strange results.
|

因为我们亲手创建,这个世界更加美丽。 |
|
2005-1-14 00:00 |
|
|
waffle
中级用户
  
积分 230
发帖 37
注册 2003-5-24
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
map (fd0) (hd2)
map --hook
root (hd2,+TAB然后出来3个错,分区0,error 19:selected cylinder exceeds maximum supported by BIOS;分区1,error 19:selected cylinder exceeds maximum supported by BIOS分区3,error 19:selected cylinder exceeds maximum supported by BIOS不知道为什么没有分区2。grub把软盘map成硬盘的根据是什么,软盘没有分区这个概念,grub从哪里搞个分区表出来呢?有什么dos软件可以用到你说的那些bios功能?
map (fd0) (hd2)
map --hook
root (hd2,+TAB then three errors come out, partition 0, error 19: selected cylinder exceeds maximum supported by BIOS; partition 1, error 19: selected cylinder exceeds maximum supported by BIOS; partition 3, error 19: selected cylinder exceeds maximum supported by BIOS. There is no partition 2 for some reason. What is the basis for grub to map the floppy disk as a hard disk? The floppy disk has no concept of partitions. Where does grub get a partition table from? What DOS software can use those BIOS functions you mentioned?
|
|
2005-1-14 00:00 |
|