2

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.

Jared
  • 23

2 Answers2

1

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.

G Koe
  • 4,758
1

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

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

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

zx485
  • 2,337
FSMaxB
  • 1,739