1

I had a Linux distribution which had installed grub on MBR.

Then I installed second Linux distribtion on a different partition but did not install grub in it.

Then I went to first Linux distribution and ran update-grub. So second Linux distribution also was picked up and is presented in menu at startup.

Now I want to remove first Linux distribution. How do I install grub in second Linux distribution so that it is linked to grub in MBR also?

2 Answers 2

2

Reinstall from working (not liveCD/DVD/USB) system - first find Ubuntu drive (example is drive sdb but use your drive not partitions):

sudo parted -l 

if it's "/dev/sdb" then just run:

sudo grub-install /dev/sdb 

If that returns any errors run:

sudo grub-install --recheck /dev/sdb 

Then just to redo menu:

sudo update-grub 
2
  • I will try this and give feedback here. There is only one hard disk in this desktop, so it should be /dev/sda Commented Jan 7, 2020 at 1:22
  • Yes, it worked very well. There were no errors with sudo grub-install /dev/sda and sudo update-grub picked up all systems. On rebooting, it is getting started into new grub installation of second Linux partition. Commented Jan 10, 2020 at 7:18
0

The second installation of Linux should have grub support within it. Check whether update-grub command exists in the second installation e.g. whereis update-grub. If so, I think you can boot into the second Linux installation, delete the first and then run update-grub to update your grub settings so that the first installation is no longer shown in grub menu at boot time. Take a backup first!

3
  • update-grub command is there. But, does update-grub command puts grub in MBR also? Otherwise, on booting, grub in MBR will look for first partition and not finding it may not boot! Commented Jan 7, 2020 at 1:21
  • The sudo update-grub does not reinstall to MBR, but updates grub menu with any changes to configuration files, scripts or additional systems. Commented Jan 7, 2020 at 4:28
  • sudo grub-install /dev/sda is the command to install grub in mbr of sda. Then sudo update-grub to get all systems (as given in accepted answer). Commented Jan 10, 2020 at 7:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.