注意

1. 建置前需要準備 Windows 7 32位元安裝光碟與 USB 隨身碟。

 

執行 diskpart

 

SETP 1. 使用管理者權限開啟命令提示字元。

 

SETP 2. 輸入 diskpart 指令。

 

 

清空 USB 隨身碟 (隨身碟為磁碟 2 7400MB)

 

SETP 1. 輸入 list disk 查看磁碟

 

SETP 2. 輸入 select disk 2 選擇磁碟 2

 

SETP 3. 輸入 clean 清除隨身碟

 

 

建立 partition 與 format

 

SETP 1. 輸入 create partition primary 建立

 

SETP 2. 輸入 format fs=fat32 quick 將隨身碟 format 為 fat32 格式

 

 

設定 Partition ative

 

SETP 1. 輸入 select partition 1 選擇分割區 1

 

SETP 2. 輸入 active 設定該分割區為 active

 

 

設定 USB Boot

 

SETP 1. 輸入 exit 離開 diskpart,之後將Windows 7 光碟放進光碟機 。

(目前本機中的光碟機位於 D 槽)

 

SETP 2. 輸入 D: 跳到光碟機。

 

SETP 3. 輸入cd boot 進入到 boot 目錄。

 

SETP 4. 輸入 bootsect /nt60 e: 建立開機程式到 E 槽中。

 

 

SETP 5. 輸入 xcopy d:\boot /s /e /f e:\boot後輸入 D

( 將 boot 目錄 copy 到隨身碟 )

 

SETP 6. 輸入 copy bootmgr* e:\

( 將 bootmgr檔案 copy 到隨身碟 )

 

擷取 WinRE.wim

 

SETP 1. 輸入 mkdir c:\test在 C 槽中建立 test 目錄

 

SETP 2. 輸入 copy d:\sources\install.wim c:\ 將Windows 安裝光碟中的 Install.wim 檔案 copy 到 c槽

 

SETP 3. 輸入 dism /mount-wim /wimfile:c:\install.wim /index:1 /mountdir:c:\test  將 install.wim mount 到 c:\test 目錄

 

 

SETP 4. 輸入 copy c:\test\Windows\System32\Recovery\winRE.wim e:\ 將 Winre.wim Copy 到隨身碟

 

SETP 5. 輸入 dism /unmount-wim /mountdir:c:\test /discard 將 install.wim 檔案 unmount

 

 

設定 BCD

(Legacy Boot)

SETP 1. 開啟 Bootice 程式,選擇 BCD 編輯頁籤 -> 其他BCD檔案 -> 選擇 e:\boot\bcd後點選高級編輯模式。


 

可到以下網址下載

https://sites.google.com/site/gbrtools/home/software/bootice-portable/bootice-downloads

 

 

SETP 2. 修改 ApplicationDevice 與 OSDevice 中的 boot wim 檔案

 

 

USB 隨身碟開機

 

之後使用 USB 隨身碟開機,就可以進入 Winre

 

 

 

 

 

USB 隨身碟開機後自動啟動命令提示字元

Winre 開機後會檢查 Windows 版本,來決定是否進入 Winre 系統,這裡將把這個檢測動作關閉,並自動開啟命令提示字元。

 

SETP 1. 輸入 dism /mount-wim /wimfile:e:\winre.wim /index:1 /mountdir:c:\test  將 winre.wim mount 到 c:\test 目錄

 

SETP 2. 輸入 attrib –r c:\test\Windows\System32\winpeshl.ini

取消檔案唯讀

 

SETP 3. 輸入 notepad c:\test\Windows\System32\winpeshl.ini

 

 

SETP 4. 將下方 AppPath 路徑改為 cmd.exe 路徑

 

[LaunchApp]

AppPath=X:\sources\recovery\recenv.exe

更改後

[LaunchApp]

AppPath=X:\Windows\System32\cmd.exe

SETP 5. 輸入 dism /unmount-wim /mountdir:c:\test /commit 將 winre.wim 檔案 unmount

 

USB 隨身碟開機後畫面

 

 

參考資料:

https://www.thomas-krenn.com/en/wiki/Creating_Windows_UEFI_Boot-Stick_in_Windows

https://technet.microsoft.com/zh-tw/library/cc766156(v=ws.10).aspx



 

arrow
arrow
    全站熱搜

    iammic 發表在 痞客邦 留言(0) 人氣()