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-25 03:00
中国DOS联盟论坛 » GRUB4DOS、SYSLINUX及其它启动管理软件讨论专区 » Troubles when using USB-ZIP+ bootable USB drive to boot HDD and ZIP machines with Grub4DOS? View 3,097 Replies 5
Original Poster Posted 2008-06-26 20:25 ·  中国 福建 厦门 电信
新手上路
Credits 6
Posts 2
Joined 2008-03-22 02:05
18-year member
UID 113650
Gender Male
Status Offline
Because there are multiple PE and IMG files, the method of booting to DOS and then using Grub.exe for booting was chosen. But then there was a problem. For example, after booting some machines, the drive letter is C: while after booting others, the drive letter is A:. Then AUTOEXEC.BAT is not so automatic. On the machines where it is recognized as C:, it can be written as: grub --config-file=/menu.lst, but on the machines that only recognize A: drive, it must be changed to: grub --config-file=(fd0)/menu.lst, otherwise it prompts that the file is not found. Moreover, the items in menu.lst also need to be changed,

fontfile /grub/fonts => fontfile (fd0)/grub/fonts

chainloader /MTLDR => chainloader (fd0)/MTLDR

map --mem /grub/ar4.img (fd0)
map --hook
chainloader (fd0)+1 =>
rootnoverify (fd0)

map --mem (fd0)/grub/ghost.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

Otherwise, it cannot boot into the items in the menu.

The Grub4DOS help document says:
"For example, you can create a feature file in the root directory of the USB flash drive, such as myudisk.txt
Then use the following command to boot a project:
find --set-root /myudisk.txt
chainloader /ldrxpe
"
I tried it but still didn't succeed.

It will be very troublesome to take the USB flash drive to different machines.
Is there any good method?
Floor 2 Posted 2008-06-26 21:19 ·  中国 河南 南阳 电信
银牌会员
★★★★
不甘寂寞的人
Credits 2,491
Posts 1,115
Joined 2003-09-24 00:00
22-year member
UID 10292
Gender Male
Status Offline
The inherent drawback of grub.exe is that it is too flexible and can boot from any disk and any directory. In this way, there is no concept of "current default device" in the booted grub environment. Therefore, one can only use methods like find --set-root /mytag and so on.

If it is changed to grldr, it will be much easier, because after grldr is booted, the default device is the device where grldr is located. However, some people like to boot DOS first, which is a situation of "can't have both fish and bear's paw".

In addition to find --set-root /myudisk.txt, in fact, one can also use the conditional judgment (that is, logical operators) of grub4dos to flexibly perform certain operations. grub4dos does not have the powerful programming capabilities like bash, but only has two simple logical operators && and ||. Refer to the readme file.

For example, if myudisk.txt is on (hd0), then cat (hd0)/myudisk.txt returns a "true", otherwise, if myudisk.txt is on (fd0), then cat (hd0)/myudisk.txt returns a "false".
因为我们亲手创建,这个世界更加美丽。
Floor 3 Posted 2008-06-27 11:53 ·  中国 福建 泉州 晋江市 电信
新手上路
Credits 9
Posts 4
Joined 2007-07-28 01:39
18-year member
UID 94160
Gender Male
Status Offline
How to write detailed commands?
Floor 4 Posted 2008-06-27 23:38 ·  中国 福建 厦门 电信
新手上路
Credits 6
Posts 2
Joined 2008-03-22 02:05
18-year member
UID 113650
Gender Male
Status Offline
Temporary method:
First, we randomly create two folders under the root directory of the USB flash drive, such as FD and HD, and then write two menu.lsts respectively for the situations where the BIOS recognizes the USB flash drive as A: and C:.
If entering Grub automatically through AUTOEXEC.BAT or config.sys, you can press the "C" key to enter the command line and then enter quit to return to the DOS state.
If there is no the above settings, then booting is into DOS.
In the DOS state, you can copy a menu.lst to the root directory of the USB flash drive,
For example, in the case where the USB flash drive is recognized as A::
copy \FD\menu.lst \menu.lst
Then write
grub --config-file=(fd0)/menu.lst
That's it.
Floor 5 Posted 2008-07-10 16:13 ·  中国 广东 广州 越秀区 电信
新手上路
Credits 4
Posts 2
Joined 2008-07-05 09:55
17-year member
UID 121114
Gender Male
Status Offline
if not exist a:\king.520 goto C
boot\grub\GRUB.exe --config-file=(fd0)/boot/grub/menu.lst
goto end
:C
boot\grub\GRUB.exe --config-file=(hd0,0)/boot/grub/menu.lst
:end
(Note: king.520 is just an identification file of mine, you can set your own)

Try writing your AUTOEXEC.BAT like this, mine is also ZIP+
And don't bring (FD0) or (HDO,?) in the path in the menu
Here's mine, take a look
splashimage /boot/grub/bj2008.xpm.gz
fontfile /boot/grub/fonts

timeout 10
default 0

title Start Mini WIN-PE (Computer Man Edition)
chainloader /maotao/peldr2
boot

title Start Mini WIN-PE (Xiao Ma Enhanced Edition)
chainloader /maotao2/LDRXPE2
boot

title Start Mini WIN-PE (by Lao Maotao)
chainloader /peldr
boot

title Start Mini WIN-PE (by Deep Mountain Red Leaf)
chainloader /WXPE/SETUPLDR
boot

title Start矮人DOS Toolkit V5.0
kernel /boot/grub/memdisk.gz c=160 h=2 s=36 floppy
initrd /boot/grub/ar5.zip c=160 h=2 s=36 floppy

title Start MaxDOS Toolkit V5.7S
kernel /boot/grub/memdisk.gz c=274 h=2 s=18 floppy
initrd /boot/grub/System.zip c=274 h=2 s=18 floppy

title Start mini98
kernel /boot/grub/memdisk.gz
initrd /boot/grub/mini98.gz

title Start PQ Partition Magic Bilingual Edition
kernel /boot/grub/memdisk.gz c=160 h=2 s=36 floppy
initrd /boot/grub/pm805.img c=160 h=2 s=36 floppy

title Start DM9.75
kernel /boot/grub/memdisk.gz
initrd /boot/grub/dm957.img

title Start Fault Recovery Console
chainloader /setupldr.001
boot

title Start HWINFO System Test
kernel /boot/grub/memdisk.gz
initrd /boot/grub/hwinfo.img

title Start Hard Disk Regenerator
kernel /boot/grub/memdisk.gz
initrd /boot/grub/hddreg15.img

title Start Efficiency Source Hard Disk Repair
kernel /boot/grub/memdisk.gz
initrd /boot/grub/xly2004.img

title Start GDISK Single Hard Disk Quick Partition
kernel /boot/grub/memdisk.gz
initrd /boot/grub/gdisk83.img

title Start KV2006 DOS Antivirus Companion (2006-12-31)
kernel /boot/grub/memdisk.gz c=160 h=2 s=36 floppy
initrd /boot/grub/kv2006.img c=160 h=2 s=36 floppy

title Clear 2000/XP Password
kernel /boot/grub/memdisk.gz
initrd /boot/grub/PASSWORD.IMA

title Clear CMOS Password
kernel /boot/grub/memdisk.gz
initrd /boot/grub/icmos.ima

title Return to WINDOWS Boot Menu
rootnoverify
makeactive
chainloader +1

title Boot Operating System from Local Hard Disk
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
chainloader (hd1,0)+1
boot

title Restart Computer
reboot

title Shutdown Computer
halt


But these two items have problems and can't enter, I don't know where the mistake is, friends who know also hope to answer, thank you

title Return to WINDOWS Boot Menu
rootnoverify
makeactive
chainloader +1

title Boot Operating System from Local Hard Disk
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
chainloader (hd1,0)+1
boot

[ Last edited by king3060 on 2008-7-10 at 04:15 PM ]
Floor 6 Posted 2008-09-07 15:19 ·  中国 安徽 合肥 电信
中级用户
★★
Credits 334
Posts 154
Joined 2007-03-24 02:14
19-year member
UID 82713
Gender Male
Status Offline
Forum Jump: