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-24 18:26
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Problems with WinGrub View 4,543 Replies 44
Original Poster Posted 2005-01-09 00:00 ·  中国 江苏 苏州 电信
中级用户
Credits 230
Posts 37
Joined 2003-05-24 00:00
23-year member
UID 2394
Gender Male
Status Offline
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?
Floor 2 Posted 2005-01-09 00:00 ·  中国 四川 成都 电信
初级用户
Credits 182
Posts 10
Joined 2004-12-28 00:00
21-year member
UID 34975
Gender Male
Status Offline
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?
Floor 3 Posted 2005-01-10 00:00 ·  中国 江苏 苏州 电信
中级用户
Credits 230
Posts 37
Joined 2003-05-24 00:00
23-year member
UID 2394
Gender Male
Status Offline
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).
Floor 4 Posted 2005-01-12 00:00 ·  中国 江苏 苏州 电信
中级用户
Credits 230
Posts 37
Joined 2003-05-24 00:00
23-year member
UID 2394
Gender Male
Status Offline
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.
Floor 5 Posted 2005-01-12 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
It's too old, so it doesn't support USB booting. I guess the reason is in the BIOS.
因为我们亲手创建,这个世界更加美丽。
Floor 6 Posted 2005-01-12 00:00 ·  中国 江苏 苏州 电信
中级用户
Credits 230
Posts 37
Joined 2003-05-24 00:00
23-year member
UID 2394
Gender Male
Status Offline
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:.
Floor 7 Posted 2005-01-13 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
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.
因为我们亲手创建,这个世界更加美丽。
Floor 8 Posted 2005-01-13 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Please study this message to see if it is useful:
http://lists.gnu.org/archive/html/bug-grub/2004-11/msg00035.html
因为我们亲手创建,这个世界更加美丽。
Floor 9 Posted 2005-01-13 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
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.
因为我们亲手创建,这个世界更加美丽。
Floor 10 Posted 2005-01-13 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
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
......................................
因为我们亲手创建,这个世界更加美丽。
Floor 11 Posted 2005-01-13 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
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.
因为我们亲手创建,这个世界更加美丽。
Floor 12 Posted 2005-01-13 00:00 ·  中国 江苏 苏州 电信
中级用户
Credits 230
Posts 37
Joined 2003-05-24 00:00
23-year member
UID 2394
Gender Male
Status Offline
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
Floor 13 Posted 2005-01-14 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
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)
因为我们亲手创建,这个世界更加美丽。
Floor 14 Posted 2005-01-14 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
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.
因为我们亲手创建,这个世界更加美丽。
Floor 15 Posted 2005-01-14 00:00 ·  中国 江苏 苏州 电信
中级用户
Credits 230
Posts 37
Joined 2003-05-24 00:00
23-year member
UID 2394
Gender Male
Status Offline
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?
Forum Jump: