0

I regularly completely reinstall my system.

Before, I used to override the existing one on a fresh start. But I realized I was loosing interesting things (file configurations etc.)

So instead, I started a new strategy: two partitions to hold 2 installs, so I can keep the old one as a transition to the new one. I they both share the same /home partition.

To summarize I have:

/dev/sda1 15Gb ubuntu1
/dev/sda2 15Gb ubuntu2
/dev/sda3 100Gb /home
/dev/sda4 4Gb swap

I'm happy with this. Today I made the fresh install on ubuntu2.

It worked, except one thing: on boot, the Grub config that is being used is still the ubuntu1 one. It suggests the ubuntu2 in the list since I ran sudo update-grub.

But the problem is at some point, I'm going to format ubuntu1 and at this time, my system won't boot at all.

So my question is: How can I tell the MBR/Bios/whatever to boot on grub on the ubuntu2 partition now?

Or maybe, in my current architecture, should I create a /boot partition in order to achieve that (and that it never gets removed)?

I am very confused with the whole MBR/grub thing, also with the concept of a /boot partition.

Thanks for support!

  • 1
    Only one system can have its boot loader in the MBR with BIOS/MBR systems. You can from any Ubuntu install easy install grub to MBR so that install's grub is in control. But grub also remembers where to reinstall, so best to reconfigure to only have one updating MBR. You can un-choose all drives (or only your one drive) http://askubuntu.com/questions/503417/how-to-prevent-ubuntu-from-overwriting-grub-bootloader-after-update/503446#503446 Also best not to share /home. But if same version, it should work. Better to have shared data partition(s) and backup /home which then is usually very small. – oldfred Dec 01 '15 at 23:52

1 Answers1

0

You could use boot-repair to restore your MBR. Follow the steps below:

You need to have Ubuntu Live CD or Live USB. Normal session can be used to repair the grub. Boot using your Ubuntu Live CD or Live USB, while booting choose Try Ubuntu.

Once booted then open a terminal, and run the following command one by one to install the boot repair.

  • Add boot-repair to the repository

    sudo add-apt-repository ppa:yannubuntu/boot-repair

  • Update your repository

    sudo apt-get update

  • Install boot-repair

    sudo apt-get install -y boot-repair

Once Installation complete run boot-repair on terminal by typing the following command or select it by System->Aministration->Boot Repair.

boot-repair

It will scan the System for few seconds and will pop-up a small window. Select Advanced options and in Main options tab select Restore MBR.

enter image description here

Then select the MBR options tab, check the drive for MBR and Ubuntu. By default all the options are selected correctly if not select the drive where your MBR is to be and the correct OS.

Once done click ok and restart your system.

Tung Tran
  • 3,945