Skip to content

Instantly share code, notes, and snippets.

@mvidaldp
Created October 4, 2022 12:11
Show Gist options
  • Save mvidaldp/9f0d8d8c037322a8c7c965345807e466 to your computer and use it in GitHub Desktop.
Save mvidaldp/9f0d8d8c037322a8c7c965345807e466 to your computer and use it in GitHub Desktop.
Repair Windows' EFI bootloader (e.g. after Linux or another OS overwrittes it)
  1. Use a Windows installation media and boot it
  2. Go to: Repair your computer > Troubleshoot > Advanced options > Startup Repair
  3. If it fails (like most of cases), go to: Repair your computer > Troubleshoot > Advanced options > Command Prompt
  4. There first run: diskpart
  5. Then run: list vol
  6. Select the Windows hidden partition: select volume X (where X is the number of the partition)
  7. Assign it a letter: assign letter=Y (make sure you assign an unused one)
  8. Exit diskpart, run: exit
  9. Run: bootrec /rebuildbcd
  10. Given that your Windows partition has the letter C: assigned, run: bcdboot c:\windows /s c:
  11. Reboot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment