網頁

2013年7月17日 星期三

PE開機分析

PE可以從硬碟、光碟、隨身碟、記憶卡、ISO檔、虛擬光碟開機。

光碟開機又分實體光碟開機及虛擬光碟開機。

卡碟機(CardROM)虛擬光碟是把可開機的ISO 檔『燒錄』到記憶卡,卡碟機的USB接頭插入電腦,開機時可以讓電腦把卡碟機上MicroSD卡,識別成虛擬 CD-ROM+記憶卡。

USB隨身碟量產的虛擬光碟,是把可開機的ISO 檔『燒錄』到USB隨身碟,USB隨身碟插入電腦,開機時可以讓電腦把USB隨身碟,識別成虛擬 CD-ROM+USB隨身碟。

功能與vmware相似的虛擬機器,建立的虛擬作業系統環境,可以掛載可開機的ISO檔來開機,製作WIN8PE、XPE、Win7PE、2003PE的作者,大都會先做成可開機的ISO檔,在虛擬作業系統環境下測試,通過之後,再實機測試。

USB隨身碟、USB隨身硬碟、記憶卡等UD開機,製作完成時,被分成[隱藏的UD][不隱藏的資料區]UD區存放PE開機檔及應用程式檔,須執行FbinstTool.exe才可以增刪或修改檔案,資料區就是隨身碟放檔案的地方,剛製作完成的隨身碟[資料區]是空無一物。USB隨身碟UD開機方式與一般USB隨身碟開機方式相同。

GRUB 4DOS 引導PE開機流程:
開機檔案->GRLDR->MENU.LST-> setupldr.bin(XPE、2003PE) 或 bootmgr (WIN7PE、WIN8PE)

光碟開機從 開機檔案->GRLDR->到顯示 MENU.LST 選單的時間,不同的開機檔案,在同一台電腦,相同執行環境,所需的時間,可能不一樣,曾測到相差約3秒。

拿別人做好的.FBA檔,來製作UD 開機;以及拿別人做好的ISO檔,燒錄至光碟、記憶卡(虛擬光碟)、隨身碟(虛擬光碟),就不用去操心開機檔案,別人都幫您做好了。

 自己要製作UD的.FBA檔或可開機的ISO檔,就要了解開機檔案,更新GRLDR,設計MENU.LST選單。

要製作PE在USB隨身碟可見區開機或硬碟開機,又是另一個要學習的主題。

光碟開機GRLDR選單:(預設選單)
說明:有蠻多PE製作者,把menu.lst選單放在 /boot/grub/menu.lst 。
pxe detect
configfile
default 0
timeout 1

title find /menu.lst, /boot/grub/menu.lst, /grub/menu.lst
errorcheck off
configfile /boot/grub/menu.lst
configfile /grub/menu.lst
if "%@root%"=="(ud)" && calc *0x82A0=*0x82b9&0xff
if "%@root:~1,1%"=="f" && find --set-root --devices=f /menu.lst && configfile /menu.lst
find --set-root --ignore-floppies --ignore-cd /menu.lst && configfile /menu.lst
find --set-root --ignore-floppies --ignore-cd /boot/grub/menu.lst && configfile /boot/grub/menu.lst
find --set-root --ignore-floppies --ignore-cd /grub/menu.lst && configfile /grub/menu.lst
errorcheck on
commandline

title commandline
commandline

title reboot
reboot

title halt
halt


光碟開機 MENU.LST範例如下:
說明:每行開頭如有#,表示該行是註解,不執行。
          指令如有不明白的,請參考本Blogger相關文章或上網查詢。
debug off
calc 29<<2+*0x8304 > nul
calc *%@retval%+8 > nul
calc *%@retval%=*%@retval%&0xffffff > nul
call Fn.0 0x40000 "!BAT\necho -P:0000 $[0000]\t\t\t\t\t\t\t\t\t\0" && initscript (md)0x200+1
splashimage /BOOT/GRUB/BG.lzma
font /BOOT/GRUB/MENU.HEX
set spacing=5
terminal --font-spacing=0:%spacing%
color black/cyan yellow/cyan
timeout 15
default 0
title     【01】極速Win03PE系统(SRS,Native) \n
command ()/BOOT/GRUB/SRSF6 --wvblk|--wvblk64
map --mem ()/ISO/NATIVE.ISO (0xff)
map --mem ()/iso/03pe.ISO (0xfa)
map --e820cycles=3
map --rehook
chainloader (0xff) || chainloader (0xff)/AXPE/SETUPLDR.BIN
title     【02】繁體中文NoName XPE 2012 \n
## 單點式 免按F6鍵安裝SRS驅動
## 配合主機板晶片組,從官方網站下載SRS驅動(包含txtsetup.oem),只適用該晶片組SRS
## map --mem /scsisrs.img (fd0)
## map --hook
## chainloader (fd0)+1
## rootnoverify (fd0)
## map --floppies=1
####
## 套餐式 免按F6鍵安裝SRS驅動
## SRS驅動包,適用各種晶片組SRS
command ()/BOOT/GRUB/SRSF6 --wvblk|--wvblk64
####
find --set-root /AXPE/SETUPLDR.BIN
chainloader /AXPE/SETUPLDR.BIN
title     【03】啟動Win8 PE(32位元繁體中文-NoName Team 網友分享版) \n
find --set-root /BOOTMGR
chainloader /BOOTMGR
title     【04】啟動 IT天空 Windows 2003 PE (舊電腦) \n http://bbs.itiankong.com/
clear
echo Loading Windows 2003 PE ...  ( Www.iTianKong.Com )
echo
map --mem ()/52pe.iso (0xff)
map --hook
chainloader (0xff)/52pe/SETUPLDR.BIN
title     【05】啟動 IT天空 Windows 7 PE (新電腦)  \n http://bbs.itiankong.com/
clear
echo Loading Windows 7 PE ...  ( Www.iTianKong.Com )
echo
map --mem ()/61pe.iso (0xff)
map --hook
chainloader (0xff)/61pe/BOOTMGR
title     【06】啟動Win8 PE(32位元簡體-紅毛櫻木版) \n
find --set-root /boot/bcemgr
chainloader /boot/bcemgr
title     【07】啟動Win8 PE(64位元簡體-望月空長嘆版)  \n
find --set-root /boot/bcfmgr
chainloader /boot/bcfmgr
title     【08】>>啟動硬碟 Windows 系統<<   \n
find --set-root --ignore-floppies --ignore-cd /bootmgr || find --set-root --ignore-floppies --ignore-cd /ntldr
map () (hd0)
map (hd0) ()
map --rehook || echo 無需交換磁碟順序,直接從硬碟啟動
find --set-root --ignore-floppies --ignore-cd /bootmgr || find --set-root --ignore-floppies --ignore-cd /ntldr
chainloader (hd0)+1
boot
title     【09】HDD Regenerator-硬碟檢查修復工具(DOS版) \n
find --set-root /BOOT/IMGS/HDDREG.img
map --mem /BOOT/IMGS/HDDREG.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title     【10】執行MS-DOS工具(ghost、spfdisk、PQMAGIC) \n
map --mem /setup98.IMg (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1
boot
title     【11】DiskGenius-硬碟分割工具(DOS版)  \n
find --set-root /BOOT/IMGS/DGDOS_IMG.img
map --mem /BOOT/IMGS/DGDOS_IMG.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title     【12】啟動 Slitaz Linux(含無線網路破解) \n
find --set-root /boot/bzImage
kernel /boot/bzImage rw root=/dev/null vga=normal autologin
initrd /boot/rootfs.gz
title     【13】執行MaxDos9.3工具箱 \n
find --set-root /BOOT/IMGS/MAXDOS.IMG
map --mem /BOOT/IMGS/MAXDOS.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title     【14】>>跳轉到增強功能選單 \n
configfile /BOOT/GRUB/run.lst
title     【15】重開機 \n 電腦重開機。
reboot
title      [16] 關機  \n
halt

USB 隨身碟UD開機GRLDR選單範例:
default 0
timeout 0

title LoadMenuList
errorcheck off
configfile (ud)/boot/grub/menu.lst

title reboot
reboot

title halt
halt


USB 隨身碟UD開機MENU.LST選單範例:
debug off
calc 29<<2+*0x8304 > nul
calc *%@retval%+8 > nul
calc *%@retval%=*%@retval%&0xffffff > nul
call Fn.0 0x40000 "!BAT\necho -P:0000 $[0000]\t\t\t\t\t\t\t\t\t\0" && initscript (md)0x200+1
splashimage (ud)/AXPE/VBE/BG.lzma
font (ud)/AXPE/VBE/MENU.HEX
set spacing=5
terminal --font-spacing=0:%spacing%
color black/cyan yellow/cyan
timeout 30
default 0

title       [01] 極速Win03PE系统(SRS,USB速度慢老機感覺最明顯) \n
command (ud)/boot/grub/SRSF6 --wvblk|--wvblk64
map --mem  (ud)/ISO/NATIVE.ISO (0xff)
map --mem  (ud)/iso/03pe.ISO (0xfa)
map --e820cycles=3
map --rehook
chainloader (0xff) || chainloader (0xff)/AXPE/SETUPLDR.BIN

title       [02] 繁體中文 NONAME XPE 2012  \n http://nonameteam.cc/ 繁體中文 XPE  
command (ud)/boot/grub/SRSF6 --wvblk|--wvblk64
map --mem (ud)/AXPE/xpe.ISO (0xff)
map --hook
chainloader (0xff)/AXPE/SETUPLDR.BIN

title       [03] 啟動Win8 PE(繁體中文32位元-NoName Team 網友分享版) \n
clear
echo Loading Windows 8 PE 繁體中文32位元 ...
echo
map --mem (ud)/WIN8PE_x86_tw_2.iso (0xff)
map --hook
chainloader (0xff)/BOOTMGR || chainloader (0xff)

title       [04] 啟動 IT天空 Windows 2003 PE (舊電腦) \n http://bbs.itiankong.com/ IT天空U盤裝機助理
clear
echo Loading Windows 2003 PE ...  ( Www.iTianKong.Com )
echo
map --mem (ud)/52pe.iso (0xff)
map --hook
chainloader (0xff)/52pe/SETUPLDR.BIN

title       [05] 啟動 IT天空 Windows 7 PE (新電腦)  \n http://bbs.itiankong.com/ IT天空U盤裝機助理
clear
echo Loading Windows 7 PE ...  ( Www.iTianKong.Com )
echo
map --mem (ud)/61pe.iso (0xff)
map --hook
chainloader (0xff)/61pe/BOOTMGR

title       [06] 啟動 Windows 8 PE(簡體32位元-紅毛櫻木版)  \n
clear
echo Loading Windows 8 PE 簡體32位元紅毛櫻木版 ...
echo
map --mem (ud)/8PE.iso (0xff)
map --hook
chainloader (0xff)/BOOTMGR || chainloader (0xff)

title       [07] 啟動 Windows 8 PE(簡體64位元-望月空長嘆版)  \n
clear
echo Loading Windows 8 PE 簡體64位元-望月空長嘆版 ...
echo
map --mem (ud)/Win8PE64.iso (0xff)
map --hook
chainloader (0xff)/BOOTMGR || chainloader (0xff)

title       [08] 啟動硬碟 Windows 系統 \n 啟動 Windows XP 7 8 vista 2000 2003
set sw=No
checkrange 0x80 read 0x8280 && if exist (hd0)/fb.cfg && set sw=yes
checkrange 0x23 read 0x8280 && if not exist (fd0)/fb.cfg && set sw=yes
set /a hdn=*0x475&0xff
if %hdn%>=2 && if "%sw%"=="yes" && map (hd1) (hd0) && map (hd0) (hd1)
map (ud)/boot/IMGS/BOOTFIX.ISO (0xff) || map --mem (ud)/boot/IMGS/BOOTFIX.ISO (0xff)
map --rehook
chainloader (0xff)
boot

title       [09] 執行 DOS版 Diskgenius 硬碟分割工具 \n IT天空 dos tool
map --mem (ud)/boot/imgs/DGDOS_IMG.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

title       [10] HDD Regenerator-硬碟檢查修復工具(DOS版) \n
map --mem (ud)/BOOT/IMGS/HDDREG.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

title       [11] 密碼相關工具 \n Windows及BIOS密碼相關工具
configfile (ud)/boot/grub/crack.LST

title       [12] 執行MS-DOS工具(ghost、spfdisk、PQMAGIC) \n taiwin 版
map --mem (ud)/boot/imgs/setup98.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

title       [13] 執行記憶體硬碟檢測工具   \n
configfile (ud)/boot/grub/test.lst

title       [14]啟動 Slitaz Linux(含無線網路破解)
kernel (ud)/boot/bzImage rw root=/dev/null vga=normal autologin
initrd (ud)/boot/rootfs.gz

title       [15] 執行 maxdos工具箱   \n IT天空 dos tool
map --mem (ud)/boot/imgs/maxdos.img (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

title       [16] 執行 自定義映像 (.img/.ima/.iso) \n
command (ud)/boot/grub/run --set-ext=.img|.ima|.iso (ud)/myext/.AUTOMENU

title       [17] 電腦關機  \n
halt                  

title       [18] 電腦重開機  \n
reboot

沒有留言:

張貼留言