diskpart list disk select disk 0 list partition
cd /d Z:\EFI\Microsoft\Boot\ ren bcd bcd.old bcdboot C:\Windows /s Z: /f UEFI Use code with caution. windows server 2012 r2 boot repair
bootrec /fixboot
cd C:\Windows\System32\config ren DEFAULT DEFAULT.corrupt ren SAM SAM.corrupt ren SECURITY SECURITY.corrupt ren SOFTWARE SOFTWARE.corrupt ren SYSTEM SYSTEM.corrupt copy C:\Windows\System32\config\regback\* . /Y diskpart list disk select disk 0 list partition
If the system still reports missing boot files, target the primary root partition to overwrite standard system files: bootsect /nt60 All /force Use code with caution. Phase 4: Repairing Modern UEFI / GPT Boot Schemes windows server 2012 r2 boot repair
If it fails, manually assign a letter to the system partition.