How to fix the Windows 10 boot loader from Windows

557,633

Solution 1

The command in Windows 8/8.1/10 for fixing MBR is "bootsect.exe".

bootsect /nt60 drive_letter: /mbr

this fixes boot record of partition mapped to "drive_letter:" and the MBR of the disk where the partition is placed.

C:\Windows\system32>bootsect

bootsect {/help|/nt60|/nt52} {SYS|ALL|<DriveLetter>:} [/force] [/mbr]

Boot sector restoration tool

Bootsect.exe updates the master boot code for hard disk partitions in order to
switch between BOOTMGR and NTLDR.  You can use this tool to restore the boot
sector on your computer.

Run "bootsect /help" for detailed usage instructions.

Alternatively you can use "Dual-boot Repair Tool" which has a graphical interface to bcdboot.exe, bootsect.exe and other useful functions like boot sector view and ... one click dual-boot repair function for Windows 10/8/7/Vista (also can fix Windows XP boot files).

Solution 2

The other answers given here work great on MBR/BIOS systems, however if you're on a UEFI system like I am, bootsect will just write a semi-functional boot MBR over the GPT protective MBR and bootrec just gives an "Access denied" error message, and neither one has a functional option to fix a broken EFI system partition, which on a UEFI/GPT drive is what contains the bootloader that used to be stored in the MBR. There's unfortunately almost no up-to-date guides on fixing the UEFI Windows Boot Manager (almost all of them just say to run the graphical Startup Repair utility, but that doesn't fix the problem in all cases), but I finally found the correct solution buried in this article, which requires the use of the bcdboot command instead:

  1. Grab the Media Creation Tool, make yourself a Windows 10 installation DVD or USB drive, and then boot into it.

  2. When prompted, choose "Repair your computer", followed by "Troubleshoot", "Advanced Options", and finally "Command Prompt".

  3. Run diskpart and then list volume. Note the volume number for your EFI system partition (ESP).

  4. Now do select volume x (where x is the volume number for the ESP) and then assign letter=N: to mount the partition. Run list volume again and note that the ESP is now assigned a driver letter. Run exit to leave diskpart.

  5. (Optional) If you are not currently dual booting and want to fully clean the ESP before writing a new bootloader, run format N: /FS:FAT32 to reformat it as FAT32. This is probably not necessary under normal circumstances, however, as bcdboot seems to do a good job of cleaning things up itself. Especially do not do this if you have a Linux distro on another partition or else you'll have to reinstall GRUB as well once you're done with this. Also note that the following steps should not affect an EFI GRUB install as long as you do not otherwise delete GRUB's existing directory on the ESP.

  6. Finally, write the new bootloader to the partition with bcdboot C:\windows /s N: /f UEFI. This command rebuilds a new UEFI-compatible bootloader on the ESP mounted at N: using the Windows installation mounted at C:\windows. Once it's done, you can verify the new bootloader was written by running dir N:\EFI, where you should see a Microsoft directory containing the new Windows Boot Manager as well as a boot directory containing the fallback bootloader (along with other directories for any other bootloaders you have installed, such as GRUB for Linux).

  7. (Optional) If you are dual booting, you will probably need to boot into your Linux distro and run sudo update-grub to allow the GRUB scripts to detect and add the new Windows bootloader. You should also skip the next step and leave GRUB as your first boot choice so you can access both operating systems.

  8. Now boot into your BIOS setup and make sure "Windows Boot Manager" is set as the top boot choice. Save and reboot and you'll finally be back in Windows.

Solution 3

I was having the following issue:

I had Ubuntu and Windows 10 and deleted Ubuntu partitions using Windows 10. After a restart I got the Partition not found error and automatically entered GRUB.

Here's how I solved it:

  1. I burned a Windows 10 CD, entered troubleshooting, and from there I entered Windows Console.
  2. Then I typed in: bootsect /nt60 drive_letter: /mbr (replace drive_letter with your letter. for example, for me it was C: /mbr).
  3. And it finally worked.

I hope this also clarifies the solution for people with the same problem as me.

Share:
557,633

Related videos on Youtube

Codyfly
Author by

Codyfly

Updated on September 18, 2022

Comments

  • Codyfly
    Codyfly over 1 year

    I installed Ubuntu on a system that has Windows 10 installed. I can boot to Windows or Ubuntu normally using GRUB. I want to delete Ubuntu partition, but first I must restore the Windows 10 MBR.

    In Use Bootrec.exe in the Windows RE to troubleshoot startup issues (applies to Windows 7 and Windows Vista) they say to use Bootrec.exe with options /FixMbr /FixBoot, but when I type "bootrec.exe /FixMbr" in a command prompt, Windows says:

    'bootrec.exe' is not recognized as an internal or external command.

    I say I can boot to Windows 10 and run a command prompt from there (I don't need to use an installation medium), but I don't know what to enter.

  • Jack
    Jack almost 8 years
    This doesn't work for me. It still continues to boot to GRUB. I've also tried the GUI tool. Any suggestions?
  • yUdoDis
    yUdoDis almost 8 years
    THIS!!...thankyou. Nothing seemed to work on my asus ROG with default windows 10 after i dual booted it with ubuntu and tried to remove ubuntu. I simply logged in to windows and used visiual dualbootrepair. i had tried easybcd and live ubuntu usb bootrepair ( as i dint have win 10 cds)....none of that worked....this worked...an entire day but your answer saved me..thanks!!!
  • rvalue
    rvalue almost 8 years
    Thanks @snayob - this is exactly what the boot repair option on the recovery disk should do
  • Thufir
    Thufir over 7 years
    how do you just "burn a windows 10 cd"?
  • Steve
    Steve over 7 years
  • Michaël Polla
    Michaël Polla over 6 years
    Thanks ! I had to add /force and it worked. It should be noted that it's better to check before what is the assigned letter of the partition ; mine was renamed to E: in the Windows Console.
  • Frank Fu
    Frank Fu almost 6 years
    Dual-boot repair tool made it really easy
  • devurandom
    devurandom about 5 years
    The hint towards bcdboot was immensely helpful. Thank you! During a disk crash, my EFI system partition got destroyed. I recreated the files necessary to start my Linux system, but was not able to recover the Windows installation. Using bcdboot to copy the Windows boot files into it fixed it.
  • Moses Machua
    Moses Machua almost 5 years
    This is the exact command that worked for me bootsect /nt60 C: /force /mbr
  • ed22
    ed22 over 3 years
    What drive letter should I use?