Skip to content

Instantly share code, notes, and snippets.

@Krailon
Created June 1, 2016 07:30
Show Gist options
  • Save Krailon/9a94fea2f2bc9c061deff4c319403147 to your computer and use it in GitHub Desktop.
Save Krailon/9a94fea2f2bc9c061deff4c319403147 to your computer and use it in GitHub Desktop.
Rebuild Windows 10 EFI Boot Sector
REM Start diskpart to assign the boot partition a drive letter to allow access
diskpart
REM Replace X with the number of the listed Windows disk
list disk
sel disk X
REM Replace Y with the number of the listed boot volume (type: SYSTEM)
list vol
sel vol Y
REM Feel free to use a different drive letter; I've always been a fan of v:
assign letter=v
exit
REM Repair boot record
cd /d v:\EFI\Microsoft\Boot
bootrec /fixboot
REM Back up the existing Boot Configuration Data (BCD) store and repair it
REM (Make sure the BCD parameters match your install!)
ren BCD BCD.bak
bcdboot c:\Windows /l en-us /s v: /f ALL
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment