Fix Bootloaders After Dual Boot Installation

Melanie Gross
Jun 13, 2011
Updated • Jan 16, 2013

Installing a second operating system on your computer can be a great way to drastically increase the number of things you can do on it. It’s no big secret that many of the programs you can run on Windows cannot be run on any other operating system. By the same token, with the recent explosion in consumer interest in user friendly Linux distributions like Ubuntu, developers are looking even closer at the platform, and the number of Linux-only programs is on the rise. There are other reasons to want a foot on both sides of the line – certain programs run faster on certain operating systems, programming and developing works differently in different OSs, and the list goes on.

So let’s assume that you read up on dual booting, chose a second operating system that extended your computing capabilities, and pulled the trigger. Congratulations! Your system now has the potential to carry you much further, and your software options are incredible. You spend some time enjoying the new operating system, customizing it, choosing new programs, and after some time, decide you want to hop back onto your old system. You close everything up, tell your system to reboot and… it jumps right back into the new operating system without asking where you wanted it to go.

This frustrating scenario is not at all unfamiliar to those who decide to dual boot. Fortunately, there is a solution for nearly every possible configuration and installation order between Windows and Linux versions and distributions. This how-to will help you get the bootmenu for each possible option back, giving you access to the original operating system if it is accidentally blocked out by the second OS.

The process does require you to have a physical copy of an installation disk for whichever operating system you are trying to get access to. If you installed Ubuntu as your second operating system and it blocked you from Vista, you need a Vista disk. If, for some reason, you installed XP and lost Ubuntu, you will need an Ubuntu installation disk for the specific release you are trying to get to.

Also, this how-to looks specifically at how to restore access to Ubuntu and may not be universally applicable to Linux distributions. It should, however, serve as a solid starting point, and many other distros follow the same process.

The most common scenario, restoring Windows Vista or 7, is one of the easiest. Run the installation CD at startup, and after the location options select Repair Your Computer. Unselect your installation if the system locates it, and then open Command Prompt. Type in:

bootrec.exe /fixboot

Press enter, then type:

bootrec.exe /fixmbr

Close all windows, do a restart, and your Vista/7 bootloader should appear.

Those restoring XP have it even easier. Insert the install CD, allow it to proceed, then type r when it asks if you are repairing rather than installing. This brings up a command line, in which you should type, pressing enter between lines:


Finally, those restoring Ubuntu or a similar Linux system need to start by identifying the drive their system is installed on. From the terminal on an install disk, type:

  • sudo fdisk –l

From the information that this calls, identify the drive that holds the Linux system, such as /dev/sda2. Next, substituting in your own drive in place of sda2:

sudo mkdir /media/sda2
sudo mount /dev/sda2 /media/sda2
sudo grub-install –root-director=/media/sda2 /dev/sda

While not comprehensive enough to cover absolutely every possible configuration you may have, these simple steps can help most people get back their original bootloader. If you follow these steps and find you lose the loader from the second operating system, just follow the same steps for the second. Good luck!


Tutorials & Tips

Previous Post: «
Next Post: «


  1. SubgeniusD said on July 24, 2011 at 7:45 pm

    “While not comprehensive enough to cover absolutely every possible configuration” Yeah – try installing Linux on a notebook secondary internal hard drive.

    Install on sdb, manually create a /boot partition, install Grub there, tell it to boot from there and the distro still writes to the MBR of sda (primary hdd with Windows) scrambling not only the MBR but the partition table borking your windows install. Bootrec etc doesn’t fix. Luckily I keep recent system images.

    Mandriva 2010 is the only distro of many I’ve tried that behaves like a mature, polished OS in this situation. The rest are buggy loads of —- oh well I’m still disgusted with them so let’s leave it there.

  2. JFP said on June 13, 2011 at 1:31 pm

    Or you can use EasyBCD, like i did this week-end. Work very well and you dont have to use all those cmd line.

    Thanks for your trick.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.