Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have two instances of Ubuntu running on my computer (The second one is for an operating systems class).

The problem is that when I installed the second Ubuntu, the MBR now looks at the second GRUB, even though the second partition is not flagged as bootable (using cfdisk).

How do I make the MBR to look at the first partition's GRUB?

edit: The only reason I care is in the case I brick the second Ubuntu Dist, I do not want the chance of bricking my computer.

share|improve this question
    
I think it has to do with your stage 1 grub, which I think goes on your MBR. I believe grub-setup /dev/sdX (no partition number) is how a running system would get its stage 1 inplanted.. –  Doc Mar 20 '13 at 22:45

2 Answers 2

up vote 0 down vote accepted

if you have grub loaded into the VBR of both partitions (see this fantastic Superuser post on How boot sectors work), you can simply boot your original install and re-install grub.

From the section "Reinstalling Grub" on https://help.ubuntu.com/community/Grub2/Installing

After installing another operating system which installed its own bootloader, reinstall GRUB2 to return control to the desired OS. When an operating system is added on a multiboot computer it will generally take command of the boot process. Reinstalling GRUB 2 from a within the desired OS will return control of the boot process to that OS.

Grub ignores the boot flag nowadays anyway.

If you are in the habit of installing multiple OSes, you may want to consider creating a dedicated grub partition.

share|improve this answer

Boot the Ubuntu which you want to be first in the bootloader and run:

sudo update-grub
sudo grub-install /dev/sdX

Where X is the letter of the hard disk on which your GRUB is installed (probably "a")

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.