|
本帖最后由 hhh333 于 2021-4-8 11:32 编辑
请yaya解惑,或者也算一个bug
G4D(grub4dos-0.4.6a-2021-01-27)一启光盘,先根下的menu.lst,再根据类型启动相应的子菜单
这是menu.lst
debug off
calc *0x8205=*0x8205|0x20
timeout 1
set h3cd=H3CDALL.ISO
#默认启动菜单
set grmenu=H3_GR2HD.LST
#UD启动菜单(注意:menu.lst位于UD内时表示启动文件和内核均藏于UD内启动,即H3PE约定menu.lst总是跟着BOOT和内核走,切记!)
if %@root%==(ud) set grmenu=H3_GR2UD.LST
#光启菜单
if %?_BOOT%==(cd) set grmenu=H3_GR2CD.LST
checkrange 0xA0:0xFF read 0x82A0 > nul && set grmenu=H3_GR2CD.LST
#网启菜单
if %?_BOOT%==(pd) pxe keep && set grmenu=H3_GRPXE.LST
#ISO整体启动菜单
if %?_BOOT%==(ud) if exist (ud)/%h3cd% root (ud)
if /i exist /%h3cd% goto H3CDALL
:H3CD-HD-UD-PXE
#以下内容用于多启动方式时调用相应菜单文件启动
terminal console
font /BOOT/GRUB/UNIFONT.HEX
graphicsmode -1 1024
splashimage /BOOT/GRUB/BACK.BMP.GZ
terminal --font-spacing=0:3
setmenu --box x=16 w=200 y=5 h=40 l=0 --lang=zh --auto-num-on
setmenu --string=-200=-6=0x00FF33="date&time=yyyy-MM-dd HH:mm:ss"
setmenu --string=32=3=0xffff00="Grub4DOS-Bios CD启动菜单"
configfile /BOOT/%grmenu%
:H3CDALL
#以下内容用于整体启动
timeout 15
default 1
color white/blue white/red yellow/blue white/magenta
title __________Load %h3cd% _________
clear
title [1]--"map --mem /%h3cd%" at first\nNeed large memory and spend more time to load iso to memory,but support all function besides win7pe,don't use on usb1.x.
set ldiso=NO
pause --wait=0 Tring to load ISO to mem...
map --mem /BOOT/IMGS/FIRADISK.IMA (fd0) || map --mem /FIRADISK.IMA (fd0)
map --mem /%h3cd% (0xff) && set ldiso=YES
if %ldiso%==NO pause --wait=0 Tring to direct map link to ISO... && map /%h3cd% (0xff) && set ldiso=YES
if %ldiso%==YES map --e820cycles=3 && map --hook && rootnoverify (0xff) && chainloader (0xff)
boot
title [2]--"map /%h3cd%" at first\nNeedn't more memory and very fast,but the iso must be contig and can't support all function.
set ldiso=NO
pause --wait=0 Tring to direct map link to ISO...
map /%h3cd% (0xff) && set ldiso=YES
if %ldiso%==NO pause --wait=0 Tring to load ISO to mem... && map --mem /BOOT/IMGS/FIRADISK.IMA (fd0) || map --mem /FIRADISK.IMA (fd0)
if %ldiso%==NO map --mem /%h3cd% (0xff) && set ldiso=YES
if %ldiso%==YES map --e820cycles=3 && map --hook && rootnoverify (0xff) && chainloader (0xff)
boot
这是h3_gr2cd.lst的内容
- debug off
- timeout 30
- #setmenu --string=32=3=0xffff00="Grub4DOS-Bios CD启动菜单"
- #不显示版本信息
- call Fn.0 0x40000 "!BAT\necho -P:0000 $[0000]\t\t\t\t\t\t\t\t\t\0" && initscript (md)0x200+1
- title 启动 WIN7 PE Boot Win7 PE\n含较新的磁盘控制器驱动,不支持USB3
- chainloader /BOOT/H3_MGRW7.BIN
- title 启动 WIN8 PE Boot Win8 PE\n支持USB3等新硬件
- chainloader /BOOT/H3_MGRW8.BIN
复制代码
setmenu --string=32=3=0xffff00="Grub4DOS-Bios CD启动菜单"
这一条语句如果在主菜单中,则不能显示中文(注:字库无论是否简单或压缩),但如果在子菜单中则可以显示中文。
|
|