|
用fbt可以完整查看了 发现差不多,也就是可以用了。用fbt也可以复制出来了。
;Special MENU for 0PE
terminal console
debug off
checkrange 20110825:-1 read 0x8278 || clear && pause You should use grub4dos-0.4.5b-2011-08-25 or above. && reboot
write 0x60368 0
checkrange 0x80 read 0x8280 && write 0x60368 1
checkrange 0x23 read 0x8280 && checkrange 0x80 calc *0x82B9&0xff && write 0x60368 1
echo -e \n\nPress a key within 3 seconds:
echo -e \n\t<Enter>--Continue(by default)\n\t<Esc>--Grub4Dos Commandline\n\t<Space>--Load 0PE.ISO into memory entirely\n
set tkey= && pause --wait=3 && set /A tkey=*0x4CB00
if not exist tkey commandline
debug off
set mapmem=
if /i "%tkey%"=="0x20" set mapmem=1
set tkey=
#可在这里指定整体启动0PE.ISO的路径、名字。默认/0PE.ISO。指定的不存在,就找/0PE/0PE.ISO。
if not exist PEISO set PEISO=/0PE.ISO
#可改SRS路径。
set SRS0PE=/0PE/SRS/
checkrange 0x21 read 0x8280 && pxe detect NotExist
write 0x60064 0
write 0x6006C 0
write 0x60130 0
checkrange 0x21 read 0x8280 && write 0x60064 1
set noacc=
read 0x60064 && set noacc=1 ! if not exist (bd)/BOOT/GRUB/USB_ACC.0PE if not exist (224)/BOOT/GRUB/USB_ACC.0PE set noacc=1
if not exist noacc if exist (bd)/BOOT/GRUB/USB_ACC.0PE (bd)/BOOT/GRUB/USB_ACC.0PE --time-out-disable:0
if not exist noacc if not exist (bd)/BOOT/GRUB/USB_ACC.0PE (224)/BOOT/GRUB/USB_ACC.0PE --time-out-disable:0
default 0
timeout 0
#0
title
echo
echo 0PE by Pseudo
read 0x60064 || if exist /0PE/0PE.GZ && goto 2 ! echo -n
read 0x60064 || if exist %PEISO% && goto 1 ! echo -n
read 0x60064 || if exist /0PE/0PE.ISO set PEISO=/0PE/0PE.ISO && goto 1 ! echo -n
find --devices=uh --set-root /0PE/0PE.GZ && goto 2 ! echo -n
find --devices=uh --set-root %PEISO% && goto 1 ! echo -n
find --devices=uh --set-root /0PE/0PE.ISO && set PEISO=/0PE/0PE.ISO && goto 1 ! echo -n
find --devices=cfp --set-root /0PE/0PE.GZ && goto 2 ! echo -n
find --devices=cfp --set-root %PEISO% && goto 1 ! echo -n
find --devices=cfp --set-root /0PE/0PE.ISO && set PEISO=/0PE/0PE.ISO && goto 1 ! echo -n
if exist (pd)/0PE/0PE.GZ rootnoverify (pd) && goto 2 ! echo -n
if exist (pd)%PEISO% && rootnoverify (pd) && goto 1 ! echo -n
if exist (pd)/0PE/0PE.ISO set PEISO=/0PE/0PE.ISO && rootnoverify (pd) && goto 1 ! echo -n
pause Error:/0PE/0PE.GZ, %PEISO% and /0PE/0PE.ISO not found!
#1
title
read 0x60064 && goto 3
if not exist noacc goto 3
map %PEISO% (0xff) || goto 3
map --hook
(0xff)/BOOT/GRUB/USB_ACC.0PE --time-out-disable:0 || echo -n
map --unmap=0xff
map --rehook
goto 3
#2
title
set noacc=
set mapmem=
dd if=(md) of=(md) bs=1 count=8 skip=0x829c seek=0x60130
echo
read 0x60064 && pxe || echo -n
echo Device of 0PE.GZ:
debug on
root || echo :(:(:
debug off
checkrange 0xC0 read 0x8280 && write 0x6006C 1
read 0x6006C && cdrom --stop
echo Loading /0PE/0PE.GZ...
map --mem ()/0PE/0PE.GZ (hd)
map --hook
read 0x6006C && cdrom --init
read 0x6006C && map --hook
write --offset=200 (hd-1,0)/BAT/_ENV.BAT set PEISO=%PEISO%\r\n
cat --locate=/ --replace=\\ (hd-1,0)/BAT/_ENV.BAT
if exist ()/0PE/GRUB.0PE (hd-1,0)/BIN/FAT copy /o ()/0PE/GRUB.0PE (hd-1,0)/GRUB.EXE || pause /0PE/GRUB.0PE not found. && reboot
#set burgcd=
#if exist (224)/0PE/0PE.GZ set burgcd=1 && find --set-root %PEISO% && map %PEISO% (0xff) && map --hook && set burgcd= ! echo -n
#if exist burgcd map --floppies=1 && map (fd0,0)%PEISO% (0xff) && map --hook && echo %PEISO% is in (fd0,0) && set burgcd= ! if exist burgcd pause --wait=5 %PEISO% not found.
set PEISO=
echo && configfile (hd-1,0)/BAT/M1.LST
#3
title
echo Device of 0PE.ISO:
debug on
root || echo :(:(:(:(:(:(
debug off
echo Loading %PEISO%...
read 0x60064 && checkrange 0x21 read 0x82A0 && set mapmem=1
checktime
if not exist mapmem echo Direct map %PEISO% && map %PEISO% (0xff) || set mapmem=1 && echo Warnning: Fail to direct map %PEISO%, try to map with --mem.
if exist mapmem echo Map %PEISO% with --mem && map --mem %PEISO% (0xff) || pause Error: Fail to map --mem %PEISO% (0xff). && reboot
checktime
map --hook
rootnoverify (0xff)
goto 2 |
|