|
timeout 12
default 1
gfxmenu (ud)/WXPE/message
title 【 01 】ISO (自动搜ISO)
configfile /BOOT/GRUB/MENU.LST || configfile /BOOT/MENU.LST || configfile /GRUB/MENU.LST || configfile /MENU.LST
configfile (ud)/BOOT/GRUB/MENU.LST || configfile (ud)/BOOT/MENU.LST || configfile (ud)/GRUB/MENU.LST || configfile (ud)/MENU.LST
configfile (cd)/BOOT/GRUB/MENU.LST || configfile (cd)/BOOT/MENU.LST || configfile (cd)/GRUB/MENU.LST || configfile (cd)/MENU.LST
configfile (hd0,0)/BOOT/GRUB/MENU.LST || configfile (hd0,0)/BOOT/MENU.LST || configfile (hd0,0)/GRUB/MENU.LST || configfile (hd0,0)/MENU.LST
title 【 03 】小内存专用PE
map --mem (ud)/50m.iso (0xff)
map --hook
chainloader (0xff)
title 【 04 】50m.iso
find --set-root /pe/50m.iso
map /pe/TangoPE.ISO (0xff)
map --hook
chainloader (0xff)
title 【 05 】图形iso (另一个自动搜ISO)
debug off
#清除边框
calc 29<<2+*0x8304 > nul
calc [email=*%@retval%+8]*%@retval%+8[/email] > nul
calc [email=*%@retval%=*%@retval%&0xffffff]*%@retval%=*%@retval%&0xffffff[/email] > nul
#字间距
terminal --font-spacing=1:3
(ud)/GRUB/AUTOMENU
看看能合么? AUTOMENU的菜单
!BAT
debug off
checkrange 20110918:-1 read 0x8278 || echo Please use grub4dos-0.4.5b-2011-09-18 or above! && exit 1
::记录启动设备
set bootdev=%~d0
::如果有分区号,则取出分区号
if '%bootdev:~-3,1%'==',' set bootpart=%bootdev:~-2,1%
::获得菜单用bd变量
echo -e \x25bootdev\x25 | set menudev=
echo -e debug off\ndefault 0\ntimeout 60\ngfxmenu %menudev%/GRUB/main.msg\nsplashimage %menudev%/GRUB/bg.lzma\nfont %menudev%/GRUB/ufont.gz\n > (md)0x23000+0x10
ls %bootdev%/GRUB/IMGS/ | call :automenu
call :defaultmenu
configfile (md)0x23000+0x10
:automenu
if "%1"=="" exit
if not "%1"=="" call :makemenu %1
shift
goto :automenu
exit
:makemenu
if /i "%~x1"==".iso" && call :iso %1
if /i "%~x1"==".img" && call :img %1
if /i "%~x1"==".ima" && call :ima %1
exit
:iso
echo -e title \xE5\x90\xAF\xE5\x8A\xA8\x20\x20%~n1 >> (md)0x23000+0x10
echo -e clear >> (md)0x23000+0x10
echo configfile (md)0x23000+0x10 | echo -e \x20\x7C\x7C\x20 | echo map --mem %menudev%/GRUB/IMGS/%1 (0xff) | echo -e \x20\x7C\x7C\x20 | echo map %menudev%/GRUB/IMGS/%1 (0xff) >> (md)0x23000+0x10
echo -e map --hook \x7C\x7C configfile (md)0x23000+0x10 >> (md)0x23000+0x10
echo -e chainloader (0xff) \x7C\x7C configfile (md)0x23000+0x10 >> (md)0x23000+0x10
exit
:img
:ima
echo -e title \xE5\x90\xAF\xE5\x8A\xA8\x20\x20%~n1 >> (md)0x23000+0x10
echo -e clear >> (md)0x23000+0x10
echo configfile (md)0x23000+0x10 | echo -e \x20\x7C\x7C\x20 | echo map --mem %menudev%/GRUB/IMGS/%1 (fd0) >> (md)0x23000+0x10
echo -e map --hook \x7C\x7C configfile (md)0x23000+0x10 >> (md)0x23000+0x10
echo -e rootnoverify (fd0) \x7C\x7C configfile (md)0x23000+0x10 >> (md)0x23000+0x10
echo -e chainloader (fd0)+1 \x7C\x7C configfile (md)0x23000+0x10 >> (md)0x23000+0x10
exit
:defaultmenu
echo -e title \xE8\xB5\x84\xE6\xBA\x90\xE7\xAE\xA1\xE7\x90\x86\xE5\x99\xA8 >> (md)0x23000+0x10
echo -e command %menudev%/GRUB/filelist >> (md)0x23000+0x10
echo -e >> (md)0x23000+0x10
echo -e title \xE9\xAB\x98\xE7\xBA\xA7\xE8\x8F\x9C\xE5\x8D\x95 >> (md)0x23000+0x10
echo -e configfile (md)0x23100+0x10 >> (md)0x23000+0x10
echo -e >> (md)0x23000+0x10
echo -e title \xE9\x87\x8D\xE6\x96\xB0\xE5\x90\xAF\xE5\x8A\xA8 >> (md)0x23000+0x10
echo -e reboot >> (md)0x23000+0x10
echo -e >> (md)0x23000+0x10
echo -e title \xE5\x85\xB3\xE6\x9C\xBA >> (md)0x23000+0x10
echo -e halt >> (md)0x23000+0x10
echo -e debug off\ndefault 0\ntimeout 60\ngfxmenu %menudev%/GRUB/main.msg\nsplashimage %menudev%/GRUB/bg.lzma\nfont %menudev%/GRUB/ufont.gz\n > (md)0x23100+0x10
echo -e title GRUB\x20\x20\xE5\x91\xBD\xE4\xBB\xA4\xE8\xA1\x8C >> (md)0x23100+0x10
echo -e commandline >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title F6IMG(x86) >> (md)0x23100+0x10
echo -e %menudev%/GRUB/F6IMG %menudev%/GRUB/SRS \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title F6IMG(x64) >> (md)0x23100+0x10
echo -e %menudev%/GRUB/F6IMG --X64 %menudev%/GRUB/SRS \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title \xE7\xA3\x81\xE7\x9B\x98\xE6\x98\xA0\xE5\xB0\x84\xE5\xB7\xA5\xE5\x85\xB7 >> (md)0x23100+0x10
echo -e command %menudev%/GRUB/devmap \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title \xE4\xBB\x8E\xE5\x85\x89\xE9\xA9\xB1\x30\xE5\x90\xAF\xE5\x8A\xA8 >> (md)0x23100+0x10
echo -e cdrom --init \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e map --hook \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e chainloader (cd0) \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title \xE4\xBB\x8E\xE5\x85\x89\xE9\xA9\xB1\x31\xE5\x90\xAF\xE5\x8A\xA8 >> (md)0x23100+0x10
echo -e cdrom --init \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e map --hook \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e chainloader (cd1) \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title \xE6\x90\x9C\xE7\xB4\xA2\xE5\xB9\xB6\xE5\xBC\x95\xE5\xAF\xBC\x57\x69\x6E\x64\x6F\x77\x73\x20\x58\x50\x2F\x32\x30\x30\x33\x2F\x4E\x54 >> (md)0x23100+0x10
echo -e command %menudev%/GRUB/findboot ntldr \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title \xE6\x90\x9C\xE7\xB4\xA2\xE5\xB9\xB6\xE5\xBC\x95\xE5\xAF\xBC\x57\x69\x6E\x64\x6F\x77\x73\x20\x37\x2F\x32\x30\x30\x38\x2F\x56\x49\x53\x54\x41 >> (md)0x23100+0x10
echo -e command %menudev%/GRUB/findboot bootmgr \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10
echo -e title \xE6\x90\x9C\xE7\xB4\xA2\xE5\xB9\xB6\xE5\xBC\x95\xE5\xAF\xBC\x4C\x69\x6E\x75\x78 >> (md)0x23100+0x10
echo -e find --set-root --ignore-floppies --ignore-cd /sbin/init \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e configfile /boot/grub/menu.lst \x7C\x7C configfile (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e >> (md)0x23100+0x10 >> (md)0x23100+0x10
echo -e title \xE8\xBF\x94\xE5\x9B\x9E\xE4\xB8\xBB\xE8\x8F\x9C\xE5\x8D\x95 >> (md)0x23100+0x10
echo -e configfile (md)0x23000+0x10 >> (md)0x23100+0x10
exit |
|