共用方式為


停止錯誤 7B 或 Inaccessible_Boot_Device 的進階疑難排解

本文提供針對「停止錯誤 7B:Inaccessible_Boot_Device」進行疑難解答的步驟。 此錯誤可能會在對計算機進行一些變更之後,或在您在計算機上部署 Windows 之後立即發生。

Applies to: Windows 10

Inaccessible_Boot_Device停止錯誤的原因

下列任一因素都可能導致停止錯誤:

  • 與記憶體堆疊相關的篩選驅動程式遺失、損毀或行為錯誤
  • 檔案系統損毀
  • BIOS 中記憶體控制器模式或設定的變更
  • 使用與安裝 Windows 時所使用的記憶體控制器不同
  • 將硬碟移至具有不同控制器的不同電腦
  • 故障的主機板或儲存設備控制器,或故障的硬體
  • 在不尋常的情況下,TrustedInstaller 服務無法認可新安裝的更新是因為元件型存放區損毀
  • Corrupted files in the Boot partition (for example, corruption in the volume that's labeled SYSTEM when you run the diskpart>list vol command)
  • 如果在開機磁碟分區的專案之前有空白 GPT 專案

針對Inaccessible_Boot_Device停止錯誤進行疑難解答

遵循下列步驟,以 Windows 修復模式 (WinRE) 啟動電腦。

  1. 使用 已安裝 Windows 版本的安裝媒體啟動系統。
  2. On the Install Windows screen, select Next>Repair your computer.
  3. 在 [系統復原選項] 畫面上,選取 [下一個>命令提示字元]。

確認開機磁碟已連線且可存取

Step 1

在 WinRE 命令提示字元中,執行 diskpart,然後執行 list disk

應顯示連接至計算機的實體磁碟清單,如下所示:

  Disk ###  Status         Size     Free     Dyn  Gpt

  --------  -------------  -------  -------  ---  ---

  Disk 0    Online         **size*  GB      0 B        *

如果計算機使用整合可擴展韌體介面 (UEFI) 啟動介面,數據行中*將會有星號 (GPT)。

如果計算機使用基本輸入/輸出系統 (BIOS) 介面,則數據行中 Dyn 不會有星號。

Step 2

list disk如果命令正確列出 OS 磁碟,請在 中list vol執行 diskpart 命令。

list vol 會產生類似下列顯示的輸出:

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info

  ----------  ---  -----------  -----  ----------  -------  ---------  --------

  Volume 0         Windows RE   NTFS   Partition    499 MB  Healthy

  Volume 1     C   OSDisk       NTFS   Partition    222 GB  Healthy    Boot

  Volume 2         SYSTEM       FAT32  Partition    499 MB  Healthy    System

Note

如果包含 OS 的磁碟未列在輸出中,您必須與 OEM 或虛擬化製造商互動。

確認開機設定資料庫的完整性

檢查開機設定資料庫 (BCD) 是否有所有正確的專案。 若要執行此步驟,請在 WinRE 命令提示字元中執行 bcdedit

若要驗證 BCD 專案:

  1. 檢查具有 {bootmgr} 標識符的 Windows 開機管理員區段。 Make sure that the device and path entries point to the correct device and boot loader file.

    如果計算機是以 UEFI 為基礎,以下是範例輸出:

    device                  partition=\Device\HarddiskVolume2
    path                    \EFI\Microsoft\Boot\bootmgfw.efi
    

    如果機器是以 BIOS 為基礎,以下是範例輸出:

    Device                partition=C:
    

    Note

    此輸出可能不會包含路徑。

  2. 具有 {default} 標識符的 Windows 開機載入器中,確定裝置、路徑osdevicesystemroot 指向正確的裝置或分割區、winload 檔案、OS 磁碟分區或裝置,以及 OS 資料夾。

    Note

    If the computer is UEFI-based, the file path value that's specified in the path parameter of {bootmgr} and {default} contains an .efi extension.

    bcdedit 輸出的螢幕快照,其中包含 Windows 開機載入器的詳細資訊。

如果有任何資訊錯誤或遺失,建議您建立 BCD 存放區的備份。 若要這麼做,請執行 bcdedit /export C:\temp\bcdbackup。 This command creates a backup in C:\temp\ that's named bcdbackup. 若要還原備份,請執行 bcdedit /import C:\temp\bcdbackup。 This command overwrites all BCD settings by using the settings in bcdbackup.

備份完成之後,請執行下列命令來進行變更:

bcdedit /set *{identifier}* option value

例如,如果 {default} 下的裝置錯誤或遺失,請執行此命令來設定它: bcdedit /set {default} device partition=C:

如果您想要完全重新建立 BCD,或收到指出「無法開啟開機設定數據存放區」的訊息。系統找不到指定的檔案, 「執行 bootrec /rebuildbcd

If the BCD has the correct entries, check whether the winload and bootmgr entries exist in the correct location, which is in the specified path in the bcdedit command. By default, bootmgr in the BIOS partition is in the root of the SYSTEM partition. 若要檢視檔案,請執行 Attrib -s -h -r

如果檔案遺失,而且您想要重建開機檔案,請遵循下列步驟:

  1. Copy all the contents under the SYSTEM partition to another location. Alternatively, you can use the command prompt to navigate to the OS drive, create a new folder, and then copy all the files and folders from the SYSTEM volume, like shown here:

    D:\> Mkdir  BootBackup
    R:\> Copy *.* D:\BootBackup 
    
  2. 如果您使用 Windows 10,或在 Windows 預安裝環境命令提示字元中使用 Windows 10 ISO 進行疑難解答,您可以使用 bcdboot 命令來重新建立開機檔案,如下所示:

    Bcdboot <**OSDrive* >:\windows /s <**SYSTEMdrive* >: /f ALL
    

    例如,如果我們指派 <System Drive> (WinRE 磁碟驅動器) 字母 R,而 <OSdrive> 是字母 D,我們會使用下列命令:

    Bcdboot D:\windows /s R: /f ALL
    

    Note

    The ALL part of the bcdboot command writes all the boot files (both UEFI and BIOS) to their respective locations.

If you don't have a Windows 10 ISO, format the partition and copy bootmgr from another working computer that has a similar Windows build. 若要執行格式設定和複製,請遵循下列步驟:

  1. Start Notepad.
  2. Press Ctrl+O.
  3. 流覽至系統分割區(在此範例中為 R)。
  4. 以滑鼠右鍵按鍵單擊數據分割,然後將它格式化。

在 Windows Update 安裝之後發生此問題的疑難解答

執行下列命令來驗證 Windows Update 安裝和日期:

Dism /Image:<Specify the OS drive>: /Get-packages

After you run this command, you'll see the Install pending and Uninstall Pending packages:

Dism 輸出擱置更新的螢幕快照。

  1. 執行 dism /Image:C:\ /Cleanup-Image /RevertPendingActions 命令。 將 C:取代為電腦的系統分割區。

    Dism 輸出還原擱置的螢幕快照。

  2. Navigate to OSdriveLetter:\Windows\WinSxS, and then check whether the pending.xml file exists. If it does, rename it to pending.xml.old.

  3. To revert the registry changes, type regedit at the command prompt to open Registry Editor.

  4. Select HKEY_LOCAL_MACHINE, and then go to File>Load Hive.

  5. Navigate to OSdriveLetter:\Windows\System32\config, select the file that's named COMPONENT (with no extension), and then select Open. When you're prompted, enter the name OfflineComponentHive for the new hive.

    [載入 Hive] 視窗開啟的註冊表編輯器螢幕快照。

  6. Expand HKEY_LOCAL_MACHINE\OfflineComponentHive, and check whether the PendingXmlIdentifier key exists. Create a backup of the OfflineComponentHive key, and then delete the PendingXmlIdentifier key.

  7. 卸載登錄區。 To do this unloading, highlight OfflineComponentHive, and then select File>Unload hive.

    已選取 [離線] 的 [註冊表編輯器] 螢幕快照。

    [登錄編輯器] 的螢幕快照,其中已選取 [卸除 Hive] 選項。

  8. Select HKEY_LOCAL_MACHINE, go to File>Load Hive, navigate to OSdriveLetter:\Windows\System32\config, select the file that's named SYSTEM (with no extension), and then select Open. When you're prompted, enter the name OfflineSystemHive for the new hive.

  9. Expand HKEY_LOCAL_MACHINE\OfflineSystemHive, and then select the Select key. Check the data for the Default value.

  10. If the data in HKEY_LOCAL_MACHINE\OfflineSystemHive\Select\Default is 1, expand HKEY_LOCAL_MACHINE\OfflineHive\ControlSet001. If it's 2, expand HKEY_LOCAL_MACHINE\OfflineHive\ControlSet002, and so on.

  11. 展開 Control\Session Manager。 Check whether the PendingFileRenameOperations key exists. If it does, back up the SessionManager key, and then delete the PendingFileRenameOperations key.

驗證開機關鍵驅動程式和服務

Check services

  1. 請遵循<在 Windows Update 安裝之後發生此問題的疑難解答>一節中的步驟 1-10。 (步驟 11 不適用於此程式。

  2. Expand Services.

  3. Make sure that the following registry keys exist under Services:

    • ACPI
    • DISK
    • VOLMGR
    • PARTMGR
    • VOLSNAP
    • VOLUME

    If these keys exist, check each one to make sure that it has a value that's named Start, and that it's set to 0. If it's not, set the value to 0.

    If any of these keys don't exist, you can try to replace the current registry hive by using the hive from RegBack. 若要執行此步驟,請執行下列命令:

    cd OSdrive:\Windows\System32\config
    ren SYSTEM SYSTEM.old
    copy OSdrive:\Windows\System32\config\RegBack\SYSTEM OSdrive:\Windows\System32\config\
    

檢查上下篩選驅動程式

檢查計算機上是否有任何非Microsoft的上下篩選驅動程式,而且它們不存在於另一部類似的工作計算機上。 如果它們確實存在,請移除上下篩選驅動程式:

  1. 展開 HKEY_LOCAL_MACHINE\OfflineHive\ControlSet001\Control

  2. Look for any UpperFilters or LowerFilters entries.

    Note

    這些篩選主要與記憶體相關。 After you expand the Control key in the registry, you can search for UpperFilters and LowerFilters.

    您可能會在下列一些登錄專案中找到這些篩選驅動程式。 These entries are under ControlSet and are designated as Default:

    • \Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}
    • \Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}
    • \Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}
    • \Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}

    [註冊表編輯器] 的螢幕快照,其中顯示ControlSet底下的專案。

    If an UpperFilters or LowerFilters entry is non-standard (for example, it's not a Windows default filter driver, such as PartMgr), remove the entry. 若要移除它,請在右窗格中按兩下它,然後只刪除該值。

    Note

    可能會有多個專案。

    These entries might affect us because there might be an entry in the Services branch that has a START type set to 0 or 1, which means that it's loaded at the Boot or Automatic part of the boot process. 此外,所參考的檔案遺失或損毀,或可能命名方式與專案所列的內容不同。

    Note

    If there's a service that's set to 0 or 1 that corresponds to an UpperFilters or LowerFilters entry, setting the service to disabled in the Services registry (as discussed in steps 2 and 3 of the Check services section) without removing the Filter Driver entry causes the computer to crash and generate a 0x7b Stop error.

執行 SFC 和 Chkdsk

如果計算機仍然未啟動,您可以嘗試在系統磁碟驅動器上執行 chkdisk 進程,然後再執行系統檔案檢查程式。 在 WinRE 命令提示字元中執行下列命令,以執行下列步驟:

  • chkdsk /f /r OsDrive:
    

    chkdsk 命令輸出的螢幕快照。

  • sfc /scannow /offbootdir=OsDrive:\ /offwindir=OsDrive:\Windows
    

    SFC 掃描命令輸出的螢幕快照。