In the Command Prompt, launch the disk partitioning utility: diskpart Use code with caution. List all available disks: list disk Use code with caution. Look at the column on the far right:
G. Recovering Boot After Disk Replacement
C. Fixing MBR/GPT and Active Partition
Windows Server 2012 R2 does not rely on the outdated "Last Known Good Configuration" method of older Windows versions. Instead, the primary tool is the . WinRE is loaded from the installation media (DVD or USB) or a dedicated recovery partition.
Run the following commands one by one, pressing Enter after each: bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd Use code with caution. windows server 2012 r2 boot repair
Run bcdboot C:\Windows /s [Drive Letter]: /f ALL to repair the boot files (replace [Drive Letter] with the letter you assigned in step 5). Proactive Maintenance to Prevent Boot Issues
Insert the bootable USB drive and restart the server. Configure the server to boot from the USB drive. In the Command Prompt, launch the disk partitioning
Whether you are facing the ominous "INACCESSIBLE_BOOT_DEVICE" blue screen, a black screen with a blinking cursor, or the frustrating automatic repair loop, this guide provides a systematic, step-by-step methodology to diagnose and repair boot issues on Windows Server 2012 R2.
cd /d Z:\EFI\Microsoft\Boot\ bcdboot C:\Windows /s Z: /f UEFI Use code with caution. Recovering Boot After Disk Replacement C
Is the server hosted on a virtual machine () or on bare-metal hardware ?
Select it with sel vol and assign a letter: assign letter=Z: . Exit Diskpart: exit .