Restore Windows Bootloader using command line at boot time

UPDATE: Kindly note that I wrote this article back in 2013 & has been one of most viewed articles on this topic, however I am not sure if these steps work completely fine even now. Kindly try these on your own risk, and if you are able to get this working successfully, kindly leave a comment, I also suggest you to kindly help others who have asked few questions recently in comments section.

If due to any reason you lost your boot system, you can restore window’s bootloader using windows CD or bootable pendrive. You may need this to do if you had linux grub earlier which you uninstalled now, or due to damage to bootloader.

Follow these steps to restore MBR (Master Boot Loader) for Windows Bootloader

  1. First of all insert Windows CD / bootable pendrive in your computer and start it. (follow my another post if you need to know how to make your pendrive bootable manually)
  2. Now go to Command line at boot time
    • In windows 7, select ‘Repair your computer’ >’Startup Recovery Option’ > ‘Command Line’
    • In windows 8, select ‘Repair your computer’ > ‘Troubleshoot’ > ‘Advance Options’ > ‘Command Line’
  3. Now give following commands
      • bootrec /fixmbr
      • bootrec /fixboot
      • bootrec /scanos
      • bootrec /rebuildbcd
  4. You will see your console like this while giving above commands

X:\Sources>bootrec /fixmbr

The operation completed successfully.

X:\Sources>bootrec /fixboot
The operation completed successfully.

X:\Sources>bootrec /scanos
Scanning for all disks for Windows installations.

Please wait, since this may take a while…

Succcessfully scanned Windows installations.
Total identifies Windows installations: 0
The operation completed successfully.

X:\Sources>bootrec /rebuildbcd
Scanning for all disks for Windows installations.

Please wait, since this may take a while…

Succcessfully scanned Windows installations.
Total identifies Windows installations: 0
The operation completed successfully.

Thats it, just restart your computer!

Other related posts : ‘Fixing Grub using linux live CD’

🙂

24 thoughts on “Restore Windows Bootloader using command line at boot time

  1. I have Windows Server 2012R2 installed .
    My system is not booting from today morning.
    Everytime I restart it shows me a blue screen
    After doing the 4 steps
    bootrec /fixmbr
    bootrec /fixboot
    bootrec /scanos
    bootrec /rebuildbcd

    After completing the rebuildbcd
    it shows

    Total identified Windows Installation :1
    [1] D:\Windows
    Add installation to boot list? Yes/No/All

    I’ve tried with Y & A and received the same reply

    The requested system device cannot be found.
    and again it appears

    X:\Sources>

    Now how do I complete this use my computer normally

    Like

  2. I assume where you say thats it just start computer i just hit the power button and re start or do i exit cmd first go back to trouble shooting and power off computer..

    Like

    • I wrote these steps quite a long time ago, not sure if they are still valid completely. Unfortunately I dont have the same PC with me now so I wont be able to verify also, sorry for that!

      Like

  3. OMG!
    I have been trying to repair my old desktop Vista system to boot with corrupted boot files for days! Almost did a full reinstall and lose all my old data I wanted to back up.
    I TRIED EVERYTHING.
    Then I stumbled onto this and poof…. Vista boots normally.
    Where were you last week? 🙂

    Thanks a million!

    Like

Leave a reply to Ram Cancel reply