|
command --set-path=(fd0)/grub/
default 0
timeout 3
root (fd0)
menuset 15 15 15 15 15 21 20 40 5 3 10
debug off
write 0x60000 0
title 0.Boot your Win7 VHD \n\tBOOT your VHD system.
WENV set name=$input,Enter Your name :
WENV get name || fallback --go 3
WENV set tmp=/win7/${name}.vhd
WENV run find --set-root --ignore-cd --ignore-floppies ${tmp} || fallback --go 0
write --offset=0x4E74 (fd0)/boot/bcd b
WENV get tmp=0x600000
cat --locate=\\x2F --replace=\\x5C (md)0x3000+3
WENV run write --offset=0x7D72 (fd0)/boot/bcd *0x600000
WENV run write --offset=0x82EA (fd0)/boot/bcd *0x600000
WENV calc cur_drv=*0x82A0 & 0x7F
WENV calc cur_pri=*0x829C >> 16 & 0xFFFF
WENV run pause --wait=1 It will boot ${name}'s Win7 VHD system.
write 0x60004 0
write 0x60000 0
WENV calc cur_drv=*0x82A0 & 0x7F
WENV run dd if=(hd${cur_drv})+1 of=(md) bs=1 count=4 skip=0x1b8 seek=0x60000
cat --length=0 ()-1
dd if=(md) of=(md) bs=1 count=8 skip=0x8290 seek=0x60008
cat --locate=\x2E\xB5\x41\x7D --replace=*0x60000 (fd0)/boot/bcd
cat --locate=\0\x7E\0\0 --replace=*0x60008 (fd0)/boot/bcd
chainloader (fd0)/boot/bootmgr
boot
title 1.Boot Windows XP \n\tBOOT WINDOWS XP
find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader /ntldr
title 2.Rebuild your VHD system. \n\tRebuild your VHD system
WENV set name=$input,Enter Your name : || fallback --go 3
WENV get name || fallback --go 3
WENV run find --set-root --ignore-cd --ignore-floppies /win7/${name}.vhd || WENV run pause --wait=0 It will creative a new user's vhd system! && fallback --go 4
WENV run pause All date in ${name}'vhd system will be lost!
WENV run write --offset=0x3d (fd0)/vhd.bat ${name}.vhd
quit
#3
title
pause Press any key return to menu && configfile (fd0)/menu.lst
#4
title
password =wuyou
WENV run write --offset=0x3d (fd0)/vhd.bat ${name}.vhd && quit
[ 本帖最后由 xiaoy 于 2010-12-29 09:25 编辑 ] |
|