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 21:57
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Questions about installing GRUB on a USB flash drive! View 6,345 Replies 21
Original Poster Posted 2004-06-16 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
I installed GRUB on the MBR of the USB flash drive. After booting the computer with this USB flash drive, several GRUB boot menus appeared.
1: How to change the default boot menu of GRUB? Who has relevant Chinese materials about this.
2: GRUB treats my USB flash drive as hd0, that is, the C drive. How can I make my USB flash drive become the A drive and the original hard drive become the C drive.
Floor 2 Posted 2004-06-16 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
When GRUB is installed to the MBR, its default menu cannot be changed.

The default menu is determined at the moment you install it to the MBR. Generally, it is the /boot/grub/menu.lst file. To change the default menu, you may need to use the GRUB's install command (unfortunately, I don't know how to use this command either). You can type help install under the GRUB command line to see the usage.

I haven't seen a detailed Chinese article explaining it. It's better to look at English articles. Searching grub install setup menu.lst in www.google.com should be able to find the desired information.


-----------------

Your USB flash drive has been recognized by your BIOS as the first hard disk, that is, the 0x80 hard disk. If you want the original hard disk to become 0x80, you can use the grub's map command:

map (hd0) (hd1)
map (hd1) (hd0)

These two commands can swap (hd0) and (hd1)

If you want to change the hard disk (that is, your USB flash drive hd0) to a floppy disk, generally this is not appropriate because a hard disk has a partition table, while a floppy disk does not. This difference is quite significant.




因为我们亲手创建,这个世界更加美丽。
Floor 3 Posted 2004-06-16 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
Thanks. I used to format the USB drive as USB-ZIP, but that only allowed me to install a simple DOS bootable disk on the USB drive. A few days ago I formatted the USB drive as USB-HHD, although this allowed me to install multiple boots on the USB drive, there were many problems during the application process. Now I'll just go back to the USB-ZIP method.
Floor 4 Posted 2004-06-16 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
You can also install multiple boot on a floppy disk, that is, the USB - ZIP method can also be used to install GRUB.
因为我们亲手创建,这个世界更加美丽。
Floor 5 Posted 2004-06-16 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
I can't install GRUB on USB-ZIP, but after I extracted the "Super MS-DOS 7.10 Bootable Disk" downloaded here to the USB flash drive, I can also achieve multi-boot. It seems that GRUB is installed inside, but it's only 1.44MB, which is a bit small. I wonder if it can be made into 2.88MB?
Floor 6 Posted 2004-06-16 00:00 ·  中国 河南 南阳 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
It should be completely okay. The size of the USB-ZIP your BIOS supports, we can make a floppy disk of that size. There is no limit to making floppy disks, the key is whether the BIOS can support the boot problem of large floppy disks.
因为我们亲手创建,这个世界更加美丽。
Floor 7 Posted 2004-06-17 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
The following is a quote from Budian's post at 11:12:45 AM on June 16, 2004:
It should be completely possible. How large a USB-ZIP your BIOS supports, and we can make a floppy of that size. There is no limit to making floppies; the key is whether the BIOS can support the boot issue of large floppies.

Thank you, friend, for your help. I have successfully installed GRUB on the USB flash drive. Now I boot with the USB-ZIP method, and GRUB finally treats my USB flash drive as fd0 (drive A), just like booting from a floppy drive. Moreover, the capacity is no longer 1.44MB but 32MB.
Floor 8 Posted 2004-06-17 00:00 ·  中国 重庆 沙坪坝区 联通
初级用户
Credits 111
Posts 5
Joined 2004-06-12 00:00
22-year member
UID 26544
Gender Male
Status Offline
Simple method: first make the usb into a DOS boot, then execute grub.exe under DOS. The usage is exactly the same as under Linux. You can search on www.linuxeden.com to see. To install grub, it can be like this. I did it on hd and floppy: root (hd0, x) or root (fd0), x represents the hard disk partition, then setup (hd0) or setup (fd0). Now grub has become a boot manager. You can use grub.lst to write the menu. The default is in /boot/grub/menu.lst. Under DOS, the file extension can only be 3 characters, so grub.conf is invalid.
Floor 9 Posted 2004-06-18 00:00 ·  中国 广东 广州 南沙区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
After struggling for a long time, I finally have to put the GRUB configuration file on the hard disk. It fundamentally can't be placed on the USB flash drive!

I'm using GRUB FOR DOS. It took me a few days to find out that it doesn't support the USB flash drive at all.

1: I formatted the USB flash drive in USB-HDD mode, entered MSDOS with the USB flash drive, and when I typed GRUB.EXE, it froze.

2: Also in USB-HDD, I installed NTLDR and GRUB FOR NTLDR, and then I could enter the GRUB menu. At this time, GRUB could completely read the files on my USB flash drive. I also tried installing GRUB to the MBR of the USB flash drive, and it could be used normally. Obviously, GRUB can completely recognize my USB flash drive, but it's different with GRUB FOR DOS. As long as I boot in USB-HDD mode, it will freeze.

3: When booting in USB-ZIP mode, GRUB FOR DOS won't freeze, but it can't read the files on the USB flash drive at all.

4: Forcibly formatting the USB flash drive in USB-FDD mode, GRUB FOR DOS can find the files on my USB flash drive, but it can only find the files in the front 1.44MB of the USB flash drive. If these files are placed at the back of the USB flash drive, they can't be found. Also, the USB flash drive formatted in USB-FDD mode is defective, so everyone must not try it.
Floor 10 Posted 2004-06-18 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
> When using the USB-ZIP method, GRUB FOR DOS no longer crashes during startup, but it completely fails to read files on the USB drive.

The prerequisites for GRUB to recognize disk files are:

1. This disk is recognized by the BIOS, having a BIOS number such as 0, 0x80, etc.
2. This disk is registered in the BIOS data area.
3. The file system of this disk is not in NTFS format.

I suspect you may have violated the third condition. Of course, GRUB has many bugs, which may also lead to the failure situation you described.
因为我们亲手创建,这个世界更加美丽。
Floor 11 Posted 2004-06-18 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
The following is a quote from Buddha doesn't click's post at 09:00:19 AM on June 18, 2004:
>3. When using the USB-ZIP mode, GRUB4DOS doesn't crash during startup, but it completely fails to read files on the USB flash drive.

The prerequisites for GRUB to recognize disk files are:

1. This disk is a disk recognized by the BIOS, having a BIOS number such as 0, 0x80, etc.
2. This disk is registered in the BIOS data area.
3. The file system of this disk is not in NTFS format.

I suspect you may have violated the third condition. Of course, GRUB has many bugs, which may also lead to the failure situation you described.



My USB flash drive is clearly formatted as USB-ZIP, how can it be NTFS? If my USB flash drive is in NTFS format, how can it boot DOS?
After I enter GRUB.EXE --config-file=(fd0)/grub/menu.lst at the DOS prompt, since it can't find the menu.lst on my USB flash drive, it will directly enter the command line mode. And when I enter root (fd0) at the command line, the prompt is: Filesystem type is fat, useing whole disk
This also proves that my USB flash drive is not in NTFS format at this time.

Moreover, I exported the BootSector of the USB flash drive and saw that it also says FAT16.
Could it be that GRUB doesn't support FAT16 format?
Floor 12 Posted 2004-06-18 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
Oops, the mistake lies in the phrase "using whole disk".

Since the FAT has already been recognized, using the "whole disk" mode should be a bug in GRUB. You can submit a report of this bug to the GNU GRUB website.
因为我们亲手创建,这个世界更加美丽。
Floor 13 Posted 2004-06-18 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
I can't submit the report. Not only do I not understand English, but I just found out about the GRUB software a few days ago!
Floor 14 Posted 2004-06-18 00:00 ·  中国 河南 南阳 内乡县 联通
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
You are the same as me. I have never submitted a bug report either. (I don't even know how to submit it.)
因为我们亲手创建,这个世界更加美丽。
Floor 15 Posted 2004-06-19 00:00 ·  中国 广东 广州 番禺区 电信
初级用户
Credits 186
Posts 32
Joined 2004-06-16 00:00
22-year member
UID 26837
Gender Male
Status Offline
Found another problem with GRUB FOR DOS. I booted from a floppy disk and then loaded the USB drive driver, but GRUB FOR DOS still froze.
Forum Jump: