Partner links

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

Windows Partition Manager Delete Linux Partitions

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.

Share:

Facebook
Twitter
Pinterest
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
33 Comments
Inline Feedbacks
View all comments
ed r
ed r
8 years ago

I tried using grub as most said to when dual booting Mint.
Ok, but it was not easy to switch back and forth etc.
By accident I created a new mbr in windows partition and that forced me to adopt your method,
which I wish I had seen earlier. Once in BCD, how easy to arrange any kind of boot order I want.
Unrealistic to drop Windows, or to forget Linux. use em both.
Thanks.

Rock
Rock
8 years ago

Its not working since its windows application and I have already overwritten MBR. Now I have no choice but to login to Linux.

Sam
Sam
8 years ago

This program actually resolved my “error 0x80070002 backup failure no file found” problem that was preventing my backing up my hard disk. THANK YOU!

Anon
Anon
9 years ago

You have to “like” their page on Facebook to download? What a load of crap.

Alan
Alan
Reply to  finid
9 years ago

I found you can ignore the facebook request and leave the name and email boxes blank – just click the download button.

PS Thank you for the tutorial.

Abdel Ouery
Abdel Ouery
9 years ago

Thanks, Very Good Tutorial 🙂

fas10u
fas10u
10 years ago

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

fred
fred
10 years ago

Thankyou!

proton
proton
10 years ago

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

Kaleb (Technology Xpert)
Kaleb (Technology Xpert)
11 years ago

I had to do the bootrec /rebuildbcd

That fixed it for me…

kumanan
kumanan
11 years ago

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

kumanan
kumanan
Reply to  finid
11 years ago

thank you

laikexpert
11 years ago

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

bootrec /fixmbr
bootrec /fixboot

David
David
Reply to  laikexpert
11 years ago

@laikexpert
Thank you so much. That helped more than this whole article!

Edwin
Edwin
Reply to  finid
11 years ago

You can make a “startup repair” disc with an iso you get from the microsoft website, for free. It serves the same purpose.

Ajith R Nair
11 years ago

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

Gustavo
Gustavo
11 years ago

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

Jim Bellino
12 years ago

wow.valuble technicle article

jg
jg
12 years ago

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
sydz
Reply to  jg
12 years ago

… 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
sydz
Reply to  jg
12 years ago

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
jg
Reply to  sydz
12 years ago

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).

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
33
0
Hya, what do you think? Please comment.x
()
x