Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save minanagehsalalma/249a9e717a5c6b5b46fb2e03b3eef3fd to your computer and use it in GitHub Desktop.

Select an option

Save minanagehsalalma/249a9e717a5c6b5b46fb2e03b3eef3fd to your computer and use it in GitHub Desktop.
0x7B (INACCESSIBLE_BOOT_DEVICE) Fix for windows

0) Prep

  • Have your BitLocker 48-digit key ready (if device encryption is on).
  • Boot a Windows USB installer, then press Shift+F10 at the first Setup screen to open Command Prompt.

1) Identify Windows + EFI partitions

diskpart
list vol          :: note Windows volume letter (C:) and the small FAT32 EFI (Vol 3)
sel vol 3
assign letter=S
exit

2) Rebuild UEFI boot files

bcdboot C:\Windows /s S: /f UEFI

3) Repair the OS image & system files (non-destructive)

(Use Win11 media for /Source if the OS is Win11.)

chkdsk C: /f
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows
:: If SFC finds issues:
dism /get-wiminfo /wimfile:D:\sources\install.wim
dism /image:C:\ /cleanup-image /restorehealth /source:wim:D:\sources\install.wim:<index> /limitaccess
sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows

4) Fix the 0x7B (INACCESSIBLE_BOOT_DEVICE) root cause

It was a leftover AOMEI disk filter (EPMVolFlt) (or whatever last program you installed the same steps applies) preventing the storage stack from loading.

4a) Remove 3rd-party filters from the DiskDrive class

reg load HKLM\OFF C:\Windows\System32\Config\SYSTEM
:: Keep only Microsoft’s PartMgr as the upper filter (all control sets)
for %S in (001 002 003) do @reg add "HKLM\OFF\ControlSet%S\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}" /v UpperFilters /t REG_MULTI_SZ /d PartMgr /f
for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}" /v LowerFilters /f

IMG_20250817_043143


4b) Nuke any other storage filters (besides Microsoft) from key classes

Partitioning/backup tools (AOMEI/Acronis/EaseUS, some AVs) sometimes leave a filter driver that prevents the disk driver from loading early.

reg load HKLM\OFF C:\Windows\System32\Config\SYSTEM

:: Storage Volumes
reg query "HKLM\OFF\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}"
:: IDE/ATA controllers
reg query "HKLM\OFF\ControlSet001\Control\Class\{4D36E96A-E325-11CE-BFC1-08002BE10318}"
:: SCSI/RAID controllers
reg query "HKLM\OFF\ControlSet001\Control\Class\{4D36E97B-E325-11CE-BFC1-08002BE10318}"

If UpperFilters or LowerFilters appear and include anything non-Microsoft (e.g., EPMVolFlt, epmntdrv, ambakdrv, snapman, etc.), remove the value:

:: Example for each place you saw filters:
reg delete "HKLM\OFF\ControlSet001\Control\Class\{GUID-HERE}" /v UpperFilters /f
reg delete "HKLM\OFF\ControlSet001\Control\Class\{GUID-HERE}" /v LowerFilters /f

(Deleting these values is safe for boot; Windows will recreate what it needs later.)

Also make sure AOMEI services are gone in all sets:

for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Services\EPMVolFlt" /f
for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Services\epmntdrv"  /f

And keep the Microsoft stack boot-start:

for %S in (001 002 003) do @for %K in (disk partmgr classpnp volmgr volmgrx mountmgr fvevol storahci stornvme) do @reg add "HKLM\OFF\ControlSet%S\Services\%K" /v Start /t REG_DWORD /d 0 /f
for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Services\storahci\StartOverride" /f
for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Services\stornvme\StartOverride" /f

reg unload HKLM\OFF

4c) Delete AOMEI services from all control sets

:: Remove AOMEI services outright
reg delete "HKLM\OFF\ControlSet001\Services\EPMVolFlt" /f
reg delete "HKLM\OFF\ControlSet001\Services\epmntdrv"  /f
reg delete "HKLM\OFF\ControlSet002\Services\EPMVolFlt" /f
reg delete "HKLM\OFF\ControlSet002\Services\epmntdrv"  /f
reg delete "HKLM\OFF\ControlSet003\Services\EPMVolFlt" /f
reg delete "HKLM\OFF\ControlSet003\Services\epmntdrv"  /f
reg unload HKLM\OFF

(Driver files weren’t present, which is fine—the registry entries were the problem.)


4d) Ensure the inbox storage stack always starts

reg load HKLM\OFF C:\Windows\System32\Config\SYSTEM
for %S in (001 002 003) do @for %K in (disk partmgr classpnp volmgr volmgrx mountmgr fvevol storahci stornvme) do @reg add "HKLM\OFF\ControlSet%S\Services\%K" /v Start /t REG_DWORD /d 0 /f
for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Services\storahci\StartOverride" /f
for %S in (001 002 003) do @reg delete "HKLM\OFF\ControlSet%S\Services\stornvme\StartOverride" /f
reg unload HKLM\OFF

4e) Clear stale volume mappings (important after resizing)

reg load HKLM\OFF C:\Windows\System32\Config\SYSTEM
reg export HKLM\OFF\MountedDevices X:\MountedDevices-backup.reg /y
reg delete HKLM\OFF\MountedDevices /f
reg unload HKLM\OFF

4f) Re-write boot files again (quick)

diskpart
sel vol 3
assign letter=S
exit
bcdboot C:\Windows /s S: /f UEFI

Reboot → Windows boots successfully 🎉


5) Fix keyboard not working after boot

Sets the correct keyboard services & filters:

  • i8042prt + kbdclass → start
  • kbdhid, i2cHid, HidUsb, HidClass → enabled
  • Keyboard class UpperFilters = kbdclass only

(We also showed Device Manager > uninstall PS/2 keyboard → Scan for hardware changes / pick “Standard PS/2 Keyboard”.)


What actually broke

Extending C: left AOMEI’s EPMVolFlt filter in the boot path. That filter hooked the disk class and stopped the kernel from mounting the system volume during early boot → 0x7B. Removing that filter/service across all control sets, forcing Microsoft’s storage drivers on, and clearing MountedDevices brought it back.


Prevent next time

  • Avoid installing disk/backup tools that add storage filter drivers; or uninstall them before major partitioning.
  • If you must resize, keep a Win11 USB handy and your BitLocker key saved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment