The bootloader is a fairly simple yet crucial Windows component. It’s the first program that is loaded at system boot and its task is to detect and load all the OSes installed on the machine. Even the slightest of issues with this program could yield an unbootable system. In such cases, the easiest solution is to reinstall it altogether 👇

USB Boot

For starters, you have to obtain an image file of the Windows version you’re running and write it onto a USB drive. If you have another PC with Windows you can download the Media Creation Tool from Microsoft’s website which will automatically download the image file of the latest Windows version and setup the USB drive. Otherwise you’ll have to download the image file directly and use a third-party program (like balenaEtcher or Rufus) for USB image writing.

Boot the PC from the USB drive. Once the installation windows appears, click “Next” then “Restore the PC”. In the next window, click “Troubleshooting” then “Advanced options” then “Command Prompt”.

Reinstalling the bootloader

Now depending if your PC is running UEFI or Legacy BIOS firmware you need to take different steps.

UEFI

Start diskpart. Once the utility is ready, type in the command list disk.

Find the number corresponding to the disk on to which Windows has been installed, and make sure that the main NTFS partition has been assigned to the letter C:

sel disk <disk-number>
list vol

Now select the volume corresponding to the EFI partition and assign a letter to it, for example N:

sel vol <volume-number>
assign letter=N:

Type exit to close diskpart, then type:

format N: /FS:FAT32
bcdboot C:\Windows /s N: /f UEFI
exit

Legacy BIOS

Type the following commands:

bootrec /FixMbr
bootrec /FixBoot
bootrec /ScanOs
bootrec /RebuildBcd
exit

⚠️ If those commands don’t fix the bootloader or you’re getting errors, type those commands instead:

bootsect /nt60 SYS /mbr
exit

Restart the PC. Now everything should be good to go ✌️