(This is an update on knotheu's excellent answer.)
An EFI boot must be repaired with the proper tool. (The mostly-legacy MBR-BIOS disk setups would use the fixmbr
tool.)
To fix an EFI boot either boot into the Windows Recovery Environment by:
- using the UEFI-defined function key too boot the Win RE partition (if your computer has one)
- using a USB recovery drive to boot Win RE (hopefully the reader had the foreknowledge to create this) [additionally an UEFI setting may have to be edited to allow a USB device boot priority]
When Win RE has booted, get to the command prompt by something akin to: Troubleshoot… → Advanced Options → Command Prompt. From there:
diskpart # disk-partition editor/formatter…
list disk
select disk [0-9] # the EFI System partition is usually on disk 0
list partition
sel partition [0-9] # the EFI _System_ partition is usually the first [1]
detail partition # details if formatted, healthy, _System_ partition
! the next command nullifies any current data on the partition !
I had to do this because my partition showed RAW, `chkdsk` lacked success,
zero files were on it; though this method did work for me to restore
Windows booting, I would recommend try to fix the boot partition first.
format fs=fat32 quick label=System
list vol # disk label "Windows" to determine disk letter
exit
With the System partition formatted and the knowledge of the Windows directory disk letter, the next step is to copy the the boot files to the EFI System partition and I believe the NVRAM gets updated:
mountvol S: /S # the System partition mount to S:
bcdboot c:\windows /s s: /f UEFI /v # `bcdboot c:\windows` may be enough
/s for mountpoint, /f for firmwaretype
/v for verbose
exit # then rm USB is used, reboot