Upgrade reshuffled the GRUB order

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Upgrade reshuffled the GRUB order

Post by KT-GB-12 »

I have win10 and 2 x Mint 20.1 Cinnamon installs on the one SSD. My primary Mint is at the top of the GRUB list.

I just booted into the secondary Mint, did an Update and then Upgrade and it has shuffled the secondary to the top GRUB position.

Is that a Mint thing or what? If so, surely it should leave the GRUB settings alone.

I can reshuffle the GRUB sequence so my primary boots first, but I shouldn't have to.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
bodge99

Re: Upgrade reshuffled the GRUB order

Post by bodge99 »

Hi,

You've hit what I call the 'lead Grub' problem.. For a traditional multiboot setup only one installation can have overall boot control (wrt Grub anyway).
You can bypass this sometimes using your boot override key or change your Bios boot order (I personally don't recommend that you do either of these.) .

If you upgrade Grub, it modifies the startup files in the EFI partition. This installation's Grub files are now controlling everything. Therefore, on reboot, your secondary Mint install is "top dog" and appears first.. Grub is loading its 'grub.cfg' from your second installation.

There are several ways to fix this.. Most have disadvantages that "put off" some folk.. e.g. 'Grub Customizer'. This is available from 'Software Manager'.
This makes a few system changes that some object to..

The easiest way to fix this is to boot into your primary Mint and reinstall Grub. This will then force this installation to be primary and have 'lead Grub'.

This problem will reoccur every time you have a Grub update.. It's not a serious problem when you understand what has caused this and how to fix it.

It is possible to permanently eliminate this problem by installing Grub to your EFI partition. Just ask if you want any more info on this.
I use this method on every computer or external drive here that multiboots.

Bodge99
gittiest personITW
Level 12
Level 12
Posts: 4289
Joined: Tue May 28, 2019 4:27 pm

Re: Upgrade reshuffled the GRUB order

Post by gittiest personITW »

It is possible to permanently eliminate this problem by installing Grub to your EFI partition.
@bodge

This is quite interesting (as far as GRUB matters go).
If you have time would you be able to post your method for moving GRUB to EFI partition just in case others have the same problem and would like to fix it.
Cheers.
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Re: Upgrade reshuffled the GRUB order

Post by KT-GB-12 »

bodge99 wrote: Fri May 14, 2021 1:16 pm It is possible to permanently eliminate this problem by installing Grub to your EFI partition. Just ask if you want any more info on this.
I use this method on every computer or external drive here that multiboots.
Hi and thanks for all that detail, I appreciate the effort.

If the process is not beyond my limited Linux skill-set, I too would be interested in that UEFI process.

Thanks again.
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
bodge99

Re: Upgrade reshuffled the GRUB order

Post by bodge99 »

Hi,

I posted viewtopic.php?f=42&t=348629 just to "test the waters".. There didn't seem to be much interest, which I found rather strange.. as this is a useful little basic tool that I've used for years.. ho hum.

See viewtopic.php?f=46&t=348777 Here, I'm helping with setting up an external drive for external booting.
Because of this, as well as a few others that I've been involved with, I'm in the process of writing up a worked example of creating an external drive that will boot on anything.. 32-bit & 64-bit UEFI as well as Legacy boot. It has an install partition which holds extracted Live Iso contents for installation purposes.
A full Mint 20.1 installation and a rescue swap partition. Grub is installed to an EFI partition which controls everything.. I'm also including the rescue flashdrive functionality. Essentially, everything boots on everything.

This is meant to be a demonstration of the various techniques used. You can obviously "pick & choose" what you want and "how many of" for everything.
I use these techniques a great deal. I have a 1TB external SSD that has over 30 Iso extracted installation partitions on it. This drive also has about 25 distros installed as well. I use these for demo & testing purposes.
The important thing is that everything is totally independent from everything else.

I use the exact same techniques on every computer here that multiboots.

Bodge99
gittiest personITW
Level 12
Level 12
Posts: 4289
Joined: Tue May 28, 2019 4:27 pm

Re: Upgrade reshuffled the GRUB order

Post by gittiest personITW »

Nice one Bodge.
I was going to suggest you chat with AndyMH but it looks like you made contact.

I'm sure your posts will be useful to a lot of people.
Keep well.
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Re: Upgrade reshuffled the GRUB order

Post by KT-GB-12 »

bodge99 wrote: Fri May 14, 2021 5:08 pm I use the exact same techniques on every computer here that multiboots.
:D Thanks, but both those Links are way out of my league.

I'll just stick to the brute force method I use, change the UUID to the one I wanted booted first.

Code: Select all

  // Find the UUID I need in this list
  blkid
  // then
  sudo -i xed /boot/efi/EFI/ubuntu/grub.cfg
  // and change the first line UUID
  // Save and then 
  sudo update-grub
  // all good
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Upgrade reshuffled the GRUB order

Post by Flemur »

bodge99 wrote: Fri May 14, 2021 1:16 pmIt is possible to permanently eliminate this problem by installing Grub to your EFI partition.
An easy way to fix that is to uninstall grub on the OS that you don't want to control booting - but make sure you can boot from the other OS first.

Edit: You can also change the uuid (and "hd1,gpt3") in the uefi grub file to point to the OS that you want to boot:

# cat /boot/efi/EFI/ubuntu/grub.cfg

Code: Select all

search.fs_uuid 3c1708a2-e91e-4a7f-b197-2df2777e1a41 root hd1,gpt3 
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
that uuid, hdX,gptY) points to /dev/sdb3
UUID="3c1708a2-e91e-4a7f-b197-2df2777e1a41" (Mint 20.1)
which is the partition containing the "real" /boot/grub/grub.cfg, with the grub menu.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
bodge99

Re: Upgrade reshuffled the GRUB order

Post by bodge99 »

Hi,

This is exactly the method that I used to use.

I've abandoned this now.. I use an EFI Grub installation.

This keeps every installation totally standard and fully independent from everything else.

I quite often have to move installations from one machine to another.. or pull a partition image off of the NAS, (different distros and versions etc. I use these for testing purposes.). Using a consistent booting method with every machine here helps a great deal.

Bodge99
Locked

Return to “Installation & Boot”