Understanding and manipulating grub

All

I have two questions regarding Grub.

Since yesterday I run a triple boot on my laptop with W10, UM and Fedora 24, with Fedora being the last OS added.
Fedora changed the boot loader and it looks now completely different. Fedora is the default boot, then W10, then UM.
All works well.

I would like to change the order of OSs to make UM the default option.

When I boot into UM the grub configurator still shows me the old set up.
When I play with the new boot loader it tells me at least, that it is also grub.

So, here is my first question: how can I go back to my old grub version which I can manipulate with the grub configurator in UM?

Secondly: at one point I want to delete fedora again. How do I do this without screwing up the boot loader?

Thanks so much

It’s a while since I played with grub or fedora. But when you installed Fedora it installed it’s own version of grub, on the MBR, which now points to the grub in /boot/grub in fedora. To change boot order, you need to edit the Fedora grub. I believe there’s a way you can edit the grub in the MBR to point to your mate grub. I think it involves hitting the edit button on the initial boot screen. You then get a terminal where you can navigate to the Mate OS. But you’d need to read “man grub”

woops, I just tried man grub and it’s not loaded, sorry about that.

I’ve just done a quick google search, this looks like it should help.

I’ll let you in on a secret.

The very best thing you can do if you want to play around with installing and uninstalling operating systems is to make yourself a Ubuntu MATE external USB flash memory rescue stick.

There is already an excellent tutorial in the tips and tricks section of this forum on how to install Ubuntu MATE in a USB, Linux via external media, and making Windows play nice with it — by tiox, (thank you tiox, well written :slight_smile:

All you will need to do if have a problem booting an operating system is boot your USB External Ubuntu MATE installation.
The magic part of this kind of USB external installation is, it is a real Ubuntu MATE installation in the USB, which boots with GRUB. It is not a Live CD type of USB for installing Ubuntu MATE, which has the liveCD boot loader, syslinux instead.
SO, once you have booted your external USB Ubuntu MATE rescue stick you simply open up a terminal and run ‘sudo update-grub’, and it will scan your computer for operating systems and automatically add them all the the USB Ubuntu MATE Rescue stick’s GNU-GRUB boot menu.

Then you re-boot again and start to boot your external USB Ubuntu MATE again but this time stop at the GRUB Menu and you will see that you can scroll up and down and choose whichever operating system you want.

Now even if you deleted Fedora and lost your ability to boot Ubuntu, you will be able to choose it now and boot it via the Ubuntu MATE Rescue stick’s GNU-GRUB boot loader.

Now you can re-install GRUB and update GRUB from within your normal Ubuntu MATE operating system.

That’s the simplest way and it has always worked perfectly well for me. I have never needed to use any other GRUB Repair software.

It’s not just for Windows users to want a Ubuntu MATE full installation in a USB flash memory stick, they are tremendously useful for Gnu-Linux users as well. We can do lots of other things with them besides booting too.

Regards from Herman

Dear Hermann,

I’ll try this tomorrow. Thx!

N

Dear Hermann

What is the difference here to using boot repair ?
From what I understand this seems to be an even
Easier solution. Or did I miss anything?

N

I don’t know I have never needed to try out boot repair.
I have always used this method since GRUB2 came out and before boot repair was written.
Yes, I imagine it could be easier maybe if you only want to fix GRUB, if you don’t already have a USB installed Ubuntu MATE already made, so just do what you think is easiest then.

For me it’s easier to have a USB installed Ubuntu MATE handy because it can be used to do lots more things than just what we’re talking about now. You can also use it to run a file system check on your installed OS, (although you can probably use your installation media to do that anyway).
If you make a mistake and misconfigure some files and get locked out of your system if you have the Ubuntu MATE in a memory stick you can copy the files from it and get your system back to normal again. You might not be able to do that with your installation media, a Live CD doesn’t have the same files in the operating system.
If don’t have a UPS and you are unlucky enough to have a power blackout half way through an update and your system won’t boot you can chroot from it and complete your update and fix your operating system.
You can install rescue software in it like TestDisk and PhotoRec to help your friends rescue lost files with or use yourself if the worst case scenario ever eventuates.
There are quite a few more things you can do that I haven’t remembered here yet.
Most of all, I think it’s pretty cool to have an operating system in a USB flash memory stick that I can carry around in my pocket and use from anywhere if I’m travelling light and there will be computers available where I’m going I can use to boot it with.

Regards from Herman :slight_smile:

Boot-repair could be a good option if it works for you. It can be as simple as a click and fix operation. Also it can be install and used as a boot option. So if this happens to you again, you can just boot it up for a repair.

Hello Herman, while searching for Boot problems
I came across your very interesting report and am going to give it a try as it makes a lot of sence.
While it does not answer my “ Ubuntu Boot Repair “ problem, it hase been very interesting to read your system, thanks a lot.

Cheers
Gege

All of this and nobody had mentioned grub-customizer yet?

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt update
sudo apt install grub-customizer
gksu grub-customizer