向Window BCD 文件添加VHD開機啟動項的相關筆記


********************************************************************************
* BCD_YE_MIN文件說明:(精簡后配置可見下面的BCD_YE_MIN_Enum_All)
********************************************************************************
使用Visual BCD Editor刪除了很多不需要的配置:
- 啟動時顯示亂碼的“Windows 內存診斷”(因為沒有保留中文字體)
- 休眠項(使用VHD引導,無法使用正常的休眠)
- 內核調試
- 虛擬機監控程序設置

********************************************************************************
* 常用命令:
********************************************************************************
1.添加VHD引導命令:
bcdedit /store "BCD" /set {default} device vhd=[locate]\System.VHD
bcdedit /store "BCD" /set {default} osdevice vhd=[locate]\System.VHD
//默認有一個DEVICE項指向了當前指定盤符,而它本身又沒用礙眼,可以刪除
bcdedit /store "BCD" /deletevalue {bootmgr} device

2.無GUI引導:(使用固態硬盤時,可使用)
bcdedit /store "BCD" /set {default} quietboot Yes
bcdedit /store "BCD" /set {default} detecthal No

3.禁用、啟用顯示開機啟動界面
bcdedit /store "BCD" /set {bootmgr} displaybootmenu Yes
bcdedit /store "BCD" /set {bootmgr} displaybootmenu No

4.設置開機啟動界面超時時間
bcdedit /store "BCD" /set {bootmgr} timeout 3

5.顯示當前BCD內容
bcdedit /store "BCD"
bcdedit /store "BCD" /enum all

6.導入系統
bcdedit /import "BCD"

7.導出為新BCD文件
bcdedit /export "NEW_BCD"

********************************************************************************
* 如何獲得純凈的BCD文件:
********************************************************************************
    1.釋放干凈系統鏡像到磁盤,假設在z:\windows
    2.在PE(window 修復模式等)或者任意存在BCDBOOT.EXE的DOS里
    3.使用命令bcdboot z:\windows /s z:即可
    4.在z盤里,就多出了boot目錄、bootmgr文件
    5.在z:\boot里提取bcd文件即可!

********************************************************************************
* 備注:
********************************************************************************
· 【為了保證可遷移性,device和osdevice的路徑盤符使用[locate]來代替固定[c:]盤符】否則遷移磁盤時,會藍屏。
· 可使用Visual BCD Editor
· 可使用EasyBCD
·《向引導菜單添加本機引導的虛擬硬盤》
    	http://technet.microsoft.com/zh-cn/library/dd799299(v=ws.10).aspx
    1.復制 Windows 7 安裝的現有引導項目。然后修改此副本以便用作 VHD 引導項目。在命令提示符下,鍵入: bcdedit /copy {default} /d "vhd boot (locate)" 2.BCDedit 命令成功完成后,它將在“命令提示符”窗口中返回 {GUID} 作為輸出。 在先前命令的命令提示符輸出中找到 {GUID}。復制在以下步驟中使用的 GUID,包括大括號。 對 VHD 引導項目設置 device 和 osdevice 選項。在命令提示符下,鍵入: bcdedit /set {guid} device vhd=[locate]\windows7.vhd bcdedit /set {guid} osdevice vhd=[locate]\windows7.vhd
    3.將 VHD 的引導項目設置為默認引導項目。計算機重新啟動時,引導菜單將顯示計算機上的所有 Windows 安裝並將在操作系統選擇遞減計數完成后引導至 VHD。在命令提示符下,鍵入:
    	bcdedit /default {guid}
    4.一些基於 x86 的系統需要使用針對內核的引導配置選項,以便檢測到某些硬件信息並成功地從 VHD 進行本機引導。在命令提示符下,鍵入: 
    	bcdedit /set {guid} detecthal on

********************************************************************************
* BCD_YE_MIN_Enum_All:
********************************************************************************

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Windows 啟動管理器
--------------------
標識符                  {bootmgr}
description             Windows Boot Manager By Ye
locale                  en-us
inherit                 {globalsettings}
default                  { default }
displayorder            { default }
timeout                  3
displaybootmenu         No
 
Windows 啟動加載器
-------------------
標識符                  { default }
device                  vhd=[locate]\System.VHD
path                    \windows\system32\winload.exe
description             Windows  7
locale                  en-us
inherit                 {bootloadersettings}
osdevice                vhd=[locate]\System.VHD
systemroot              \windows
detecthal               Yes
 
EMS 設置
------------
標識符                  {emssettings}
bootems                 Yes
 
RAM 故障
-----------
標識符                  {badmemory}
 
全局設置
---------------
標識符                  {globalsettings}
inherit                 {emssettings}
                         {badmemory}
 
啟動加載器設置
--------------------
標識符                  {bootloadersettings}
inherit                 {globalsettings}

 

作者: Asion Tang


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM