Came here in search of an answer to a problem, but didn't find it? Visit the forum @ LinuxBSDos.com, pick a category and ask a question.

Restore the Windows bootloader to MBR after dual-booting with Linux

If you are reading this, you have likely attempted or actually set up a dual-boot system between your favorite Linux distribution and Windows. And if you did that on a computer with a single hard drive, that is, dual-booting Windows and Linux alongside each other, you probably replaced the Windows boot loader with GRUB, the Linux boot loader, in the Master Boot Record (MBR).

Though that is not what I recommend, many still prefer it that way, even as I have written in many of my dual-boot tutorials that Windows will, during a reinstall, overwrite anything it finds in the MBR, and that some anti-virus programs tend to write small files to the MBR, messing up GRUB.

For the record, my recommendation is to install the Linux boot loader, not in the MBR, but in the Linux installation’s boot partition, or the main partition, if /boot is not on a separate partition. This gives the Windows boot manager the main responsibility of presenting what operating system to boot into during a restart or reboot.

That way, if you have to reinstall Windows, you will not lose access to the Linux side of the dual-boot system. If you installed the Linux boot loader to the MBR and want to restore the Windows boot loader, this short tutorial shows you how to do it. It is an easy, point-and-click process. And the application that makes it that easy is called EasyBCD, a free-for-personal-use application from Neosmart Technologies.

To download it, go here. The link to download it for free is all the way at the bottom of that page, so scroll down and click on the “Download free for limited, non-commercial use” link. After the download, install it as you would any other Windows application.

EasyBCD’s main view is shown in the screen shot below. To restore Windows 7′s boot loader to the MBR, click on the BCD Deployment tab.
Neosmart EasyBCD Main

Once there, click on the Write MBR button. If you are running Windows XP, select the option under MBR Configuration Options
Neosmart EasyBCD BCD Deployment

If successful, a message at the bottom left of the window will say just that. That was easy, right? But that also means that you have lost GRUB. If you reboot without doing anything else, you will find that there is no way to boot into the Linux side. If you do not want to continue using the Linux installation, then you do not need to do any thing else from EasyBCD. You might want to delete the Linux partitions to free up space for use by Windows.

If, however, you still want to be able to boot into the Linux installation after restoring the Windows boot manager to the MBR, you need to add an entry for the Linux distribution in the boot manager’s menu. To do that, click on the Add New Entry tab.
EasyBCD Restore Windows Boot Loader

While there, click on the Linux/BSD tab, then select “GRUB 2″ from the “Type” dropdown menu. Modify the “Name” field to reflect the name of your Linux distribution. Click the Add Entry button. Click Edit Boot Menu tab to see the new entry. Note: Most Linux distributions use GRUB 2 as the boot loader. If yours uses GRUB Legacy, select it from the same dropdown menu, and be sure to specify what partition it is installed into from the “Device” dropdown menu.
EasyBCD Add Linux Windows Boot Menu

You should see two entries. One for Windows 7, the other for the Linux distribution. You may change the boot order. If you are satisfied with this operation, exit EasyBCD and reboot the computer.
EasyBCD Windows Boot Menu

You should see the Windows boot menu that you saw on the first page of this article. This last image was taken from a tutorial written for Chakra. You may read it at How to dual-boot Windows 7 and Chakra Linux Archimedes, with shared NTFS partition at the end.
Windows 7 Boot Manager Menu

Bonus Info – What do you do, if after setting up a dual-boot system between Windows and Linux you decide that you no longer what to use Linux? Easy! Delete the Linux partitions. How?

Boot into Windows and start the partition manager (type “partition” into the menu’s search field and click on the result). This screen shot is from a test installation I did. The Linux partitions are indicated in red.
Windows Partition Manager Linux Partitions

To delete them, right-click on each and select “Delete Volume” from the context menu. That is all you need to do.
Windows Partition Manager Delete Linux Partitions

What if you decide, after playing with Linux for a while, that you like it better than Windows, and want to get rid of Windows? Well, because Windows is sitting at the front part of the hard drive, the best solution is to reinstall your Linux distribution, completely wiping both Windows and the original instance of the Linux distribution from the drive. Before doing it, be sure to back up your data.

0saves
To have articles like this delivered automatically to your Feed Reader or Inbox, subscribe via RSS or email.
Digital Ocean SSD VPS Cloud Server droplets

Digital Ocean is a VPS/Cloud hosting provider. For just $5 per month, you can get yourself a Cloud server with 512 MB of RAM, 20 GB super-fast SSD, free snapshots, plus backups for a minimal fee. All via a simple graphical interface.

And by signing up with this referral link, you can help support this website.

If you are reading this, your ad could also be occupying this space. Contact us to make it happen.

If commenting on this article is closed, please post your comments at forum.linuxbsdos.com.

23 Comments

  1. fas10u says:

    Nice tutorial.
    I edit 4 oper.. systems very easy.
    Thanks

  2. fred says:

    Thankyou!

  3. proton says:

    I’ve done this before, but taking pain to write the tutorial.
    Thank you for that.. …!! :)
    keep it up..

  4. Kaleb (Technology Xpert) says:

    I had to do the bootrec /rebuildbcd

    That fixed it for me…

  5. kumanan says:

    i restore windows boot loader menu successively but after i selecting linux it show linux boot loader again now i am have two boot loader 1st windowsboot loader 2nd linux boot loader how to remove the linux boot loader… plz help me
    i am using both two os

    • finid says:

      It’s actually easy. Just edit the /etc/default/grub file and change GRUB_TIMEOUT=10 to GRUB_TIMEOUT=0.

      Note: The values 10 and 0 are time in seconds, so you are just changing the time the system waits to boot without user input from 10 seconds to zero.

  6. laikexpert says:

    1.) Windows 7 install disk
    2.) Repair your computer
    3.) Command Prompt

    bootrec /fixmbr
    bootrec /fixboot

  7. Ajith R Nair says:

    nice information here
    check this out too
    http://tinyurl.com/7g6btz3

  8. Gustavo says:

    How can I fix my Windows bootloader if can’t I boot into windows???

  9. Jim Bellino says:

    wow.valuble technicle article

  10. jg says:

    I’m pretty sure that for all versions of Windows since at least XP, you just boot from your Windows CDROM, type ‘r’ to get the “recovery console”, and then type the command:

    fixmbr

    It’s a lot easier. Should work from a startup disk too.

    I’ve done a fixmbr numerous times.

    • sydz says:

      … yes, but it’s usefull in case you don’t have the MS Windows installation CD/DVD but a set of CDs or DVDs made by a proprietary recovery tool, shipped with pre-installed OS PC or laptop (Toshiba for example)… :(

    • sydz says:

      Hum… by the way check here :
      http://neosmart.net/wiki/display/EBCD/Repairing+the+Windows+Bootloader

      “… Back in the days of Windows XP, it didn’t take much effort to fix a broken bootloader. Just stick your Windows XP in the drive, hit ‘R’ for the recovery console, and fixmbr to your heart’s content.
      But with Windows Vista and its new bootloader, things have become infinitely more complex. There are a lot of files that need to be restored, tons of data that needs to be recreated, and a lot of configuration that needs to be set up just to get Windows Vista to boot. And if you’re aiming to dual-boot, it’s that much harder…”

      • jg says:

        Well that’s why it’s even more important to use Microsoft’s own fixmbr (rather than a Linux tool) to fix your Windows bootloader. fixmbr is designed to make sure that all that “lost Windows data” is properly restored. The linux tool may or may not. (I assume/hope the makers of EasyBSD reverse-engineered fixmbr to make sure they’re doing it right). Even then, you want to use the version of fixmbr for your version of Windows. For example, for Win8, run the fixmbr off your Win8 recovery disk. Do NOT use the “Install Vista/Win 7″ entry of EasyBCD, which may or may not work.

        Fixmbr is the most safe, and easy, way to restore the Windows mbr.

        Then, you could use EasyBCD, or SystemRescueCD or some such linux tool, to boot into your existing linux partition, and run its command to restore grub (which will ensure that the proper version of grub is restored).

Leave a Comment