[solved] Can't get Grub to update; System with Existing LM Installations

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.
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

[solved] Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

I've installed LM 20.3 onto a used (but unneeded) ssd. The system has two other LM installations:

Code: Select all

sudo os-prober
 
  No volume groups found
/dev/sda1:Linux Mint 19 Tara (19):LinuxMint:linux
/dev/sdb5:Linux Mint 20.3 Una (20.3):LinuxMint1:linux
/dev/sdc6:Linux Mint 20.3 Una (20.3):LinuxMint2:linux
(notes: LM 17.2 does not show here since it's running now; also LM 19 does not boot up but that isn't the question at the moment.)

The problem is that I can't get grub to update and reflect the newly installed LM 20.3. When I start the machine the grub menu shows just LM 19 and LM 17.

Another possibly related wrinkle: In the file system on LM 20.3 there is a /home/user/ folder but there aren't any folders inside /user/ (like documents , downloads ). Could that possibly be all right?


I've tried both:

Code: Select all

 sudo update-grub
[sudo] password for fred: 
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-27-generic
Found initrd image: /boot/initrd.img-4.2.0-27-generic
Found linux image: /boot/vmlinuz-3.16.0-38-generic
Found initrd image: /boot/initrd.img-3.16.0-38-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
  No volume groups found
Found Linux Mint 19 Tara (19) on /dev/sda1
Found Linux Mint 20.3 Una (20.3) on /dev/sdb5
Found Linux Mint 20.3 Una (20.3) on /dev/sdc6
done
and

Code: Select all

sudo update-grub2
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.2.0-27-generic
Found initrd image: /boot/initrd.img-4.2.0-27-generic
Found linux image: /boot/vmlinuz-3.16.0-38-generic
Found initrd image: /boot/initrd.img-3.16.0-38-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
  No volume groups found
Found Linux Mint 19 Tara (19) on /dev/sda1
Found Linux Mint 20.3 Una (20.3) on /dev/sdb5
Found Linux Mint 20.3 Una (20.3) on /dev/sdc6
done
Again note that LM 17.2 is running.

I've also tried several variations on the installation process (from the LM 20.3 live DVD - which boots up and runs fine).

Any Ideas?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Pjotr
Level 24
Level 24
Posts: 20092
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱
Contact:

Re: Can't get Grub to update; System with Existing LM Installations

Post by Pjotr »

Usual reason: the dominant Grub is from another Linux. Boot into that other Linux and update its dominant Grub.

Code: Select all

sudo update-grub
Tip: 10 things to do after installing Linux Mint 21.3 Virginia
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

Pjotr wrote: Fri May 27, 2022 4:34 am Usual reason: the dominant Grub is from another Linux. Boot into that other Linux and update its dominant Grub.

Code: Select all

sudo update-grub
I can only boot to LM 17.2 (that's where I got the results above) and the live session DVD. Should I try update-grub from the live session?

Could something about the LM 20.3 installation cause this? I have a hunch something is wrong with that installation. The only evidence I can point to is the lack of the usual folders noted above.

Thanks for the response.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can't get Grub to update; System with Existing LM Installations

Post by pbear »

RealDogBoy wrote: Fri May 27, 2022 3:10 am Another possibly related wrinkle: In the file system on LM 20.3 there is a /home/user/ folder but there aren't any folders inside /user/ (like documents , downloads ). Could that possibly be all right?
Well, no. Have you tried reinstalling? Also, did the first 20.3 you installed work until you installed the second?
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't get Grub to update; System with Existing LM Installations

Post by all41 »

grub can exist on several drives.
bios boot order comes into play--you can update grub all you want--but if that drive is not at the top of bios boot order
you will not realize the updated grub menu.
Set your preferred boot drive in bios, then run:
sudo os-prober
That will show the operating systems that grub will recognize.
Then run:
sudo grub-install /dev/sdX
where sdX is the drive at the top of your bios boot order.
This will now be the dominant grub.
You can have grub on all your drives, no problem
The grub on the drive at the top of the bios boot order is in control.

Adding a note: I learned about dominant grub from one of pjoter's earlier posts and that was the first time I heard the terminology 'dominant' grub'-that resonated here. As I said all my drives contain an instance of grub,
bios chooses
Everything in life was difficult before it became easy.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can't get Grub to update; System with Existing LM Installations

Post by pbear »

all41 wrote: Sat May 28, 2022 12:17 am The grub on the drive at the top of the bios boot order is in control.
This is only partially correct and not in the respect important to the OP's problem. Which is to say, sure, with three disks, the BIOS setting will say which MBR controls boot, but said MBR can point to any installed system. As Pjotr said, the question is, to which does the OP's point.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't get Grub to update; System with Existing LM Installations

Post by all41 »

pbear wrote: Sat May 28, 2022 12:38 am
all41 wrote: Sat May 28, 2022 12:17 am The grub on the drive at the top of the bios boot order is in control.
This is only partially correct and not in the respect important to the OP's problem. Which is to say, sure, with three disks, the BIOS setting will say which MBR controls boot, but said MBR can point to any installed system. As Pjotr said, the question is, to which does the OP's point.
This is only partially correct
Which part is not correct in your opinion pbear. I respect your viewpoints brother
I have much to learn in this area. I am gifted with multiple drives and partitons and run several os (all 4 Mints + others)
so I have to be in control of grub. This is how it works for me, but others may use different methods--I want to see all these please..
btw: I noticed your forum absence for quite a while--and now it's good to have back in here.
Sounds like you're good to go
Last edited by all41 on Sat May 28, 2022 1:20 am, edited 1 time in total.
Everything in life was difficult before it became easy.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can't get Grub to update; System with Existing LM Installations

Post by pbear »

all41 wrote: Sat May 28, 2022 12:51 am ... so I have to be in control of grub.
Agreed, this is by far the best strategy. (I have several multi-boot full install USB hard drives.) Unfortunately, most tutorials say to let the installer place Grub automatically, i.e., assigning it to the last-installed system, which only rarely is the correct choice. Can be fixed by reinstalling Grub post-installation, of course, but most users find that as intimidating as assigning it intentionally in the first place.

As for what part isn't correct, assume BIOS looks to sda's MBR at boot. This doesn't tell us which system controls Grub. Could be any of the four.

By the way, do you know whether installing Grub to sda (for example) of itself usually modifies the BIOS setting on a multi-drive computer? Or is that a separate step. As mentioned, I've only had the issue in the USB drive context, where priority is controlled differently.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't get Grub to update; System with Existing LM Installations

Post by all41 »

pbear wrote: Sat May 28, 2022 1:19 am
all41 wrote: Sat May 28, 2022 12:51 am ... so I have to be in control of grub.
Agreed, this is by far the best strategy. (I have several multi-boot full install USB hard drives.) Unfortunately, most tutorials say to let the installer place Grub automatically, i.e., assigning it to the last-installed system, which only rarely is the correct choice. Can be fixed by reinstalling Grub post-installation, of course, but most users find that as intimidating as assigning it intentionally in the first place.

As for what part isn't correct, assume BIOS looks to sda's MBR at boot. This doesn't tell us which system controls Grub. Could be any of the four.

By the way, do you know whether installing Grub to sda (for example) of itself usually modifies the BIOS setting on a multi-drive computer? Or is that a separate step. As mentioned, I've only had the issue in the USB drive context, where priority is controlled differently.
+

also this:
tutorials say to let the installer place Grub automatically, i.e., assigning it to the last-installed system, which only rarely is the correct choice
I always choose where, but it sucks when you have to choose a location.
No choice to 'Do not install grub'
@pbear
I really appreciate the coaching.
This part will require digestion
This doesn't tell us which system contr ... the four.
Everything in life was difficult before it became easy.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't get Grub to update; System with Existing LM Installations

Post by all41 »

By the way, do you know whether installing Grub to sda (for example) of itself usually modifies the BIOS setting on a multi-drive computer?
I have never known a linux install to modify bios in any manner (it can't).
bios instructions happen way before boot sectors are called
Everything in life was difficult before it became easy.
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't get Grub to update; System with Existing LM Installations

Post by all41 »

I love the shepard avatar@RealDogBoy and I know what 'real dogs' means--just sayin we love the breed.
Once we had 18 including pups

[/quote]
Everything in life was difficult before it became easy.
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

pbear wrote: Fri May 27, 2022 11:59 pm
RealDogBoy wrote: Fri May 27, 2022 3:10 am Another possibly related wrinkle: In the file system on LM 20.3 there is a /home/user/ folder but there aren't any folders inside /user/ (like documents , downloads ). Could that possibly be all right?
Well, no. Have you tried reinstalling? Also, did the first 20.3 you installed work until you installed the second?
I did try reinstalling LM 20.3 a few times using different options. But that wasn't the issue. LM 20.3 was installed just fine but dominant grub wasn't listing it.

What I finally did was to physically unplug the drives' data cables (other than the drive with LM 20.3). Then LM 20.3 booted up normally (since the system was seeing only LM 20.3's grub file) and I completed the installation process.. Completing the process populated the folders inside /user/ -- so the installation looks OK.

More details below. And thanks!
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

all41 wrote: Sat May 28, 2022 12:17 am grub can exist on several drives.
bios boot order comes into play--you can update grub all you want--but if that drive is not at the top of bios boot order
you will not realize the updated grub menu.
Set your preferred boot drive in bios, then run:
sudo os-prober
That will show the operating systems that grub will recognize.
Then run:
sudo grub-install /dev/sdX
where sdX is the drive at the top of your bios boot order.
This will now be the dominant grub.

You can have grub on all your drives, no problem
The grub on the drive at the top of the bios boot order is in control.

Adding a note: I learned about dominant grub from one of pjoter's earlier posts and that was the first time I heard the terminology 'dominant' grub'-that resonated here. As I said all my drives contain an instance of grub,
bios chooses
I knew about setting preferred boot drive in bios so I messed with that to no avail. What I didn't know about is the little trick in bold above. That would have allowed me to take "dominance" away from the installation (LM 19) that was and is unable to boot (media corruption, I think.)

As I explained above, I accomplished basically the same thing by power off, unplugging drives, running update-grub, power off, reconnecting drives, re-boot, running update-grub again and all is well. But sudo grub-install /dev/sdX is more elegant and now I know that.

Thanks, I learned a lot.
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

pbear wrote: Sat May 28, 2022 12:38 am
all41 wrote: Sat May 28, 2022 12:17 am The grub on the drive at the top of the bios boot order is in control.
This is only partially correct and not in the respect important to the OP's problem. Which is to say, sure, with three disks, the BIOS setting will say which MBR controls boot, but said MBR can point to any installed system. As Pjotr said, the question is, to which does the OP's point.
Yes, as I now understand it, the MBR was pointing to the LM 19 system (damaged and non-bootable). That was the "dominant" system with the "dominant" grub.

See above for how I worked around the problem by unplugging drives, etc.

Thanks.
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

all41 wrote: Sat May 28, 2022 12:51 am
pbear wrote: Sat May 28, 2022 12:38 am
all41 wrote: Sat May 28, 2022 12:17 am The grub on the drive at the top of the bios boot order is in control.
This is only partially correct and not in the respect important to the OP's problem. Which is to say, sure, with three disks, the BIOS setting will say which MBR controls boot, but said MBR can point to any installed system. As Pjotr said, the question is, to which does the OP's point.
This is only partially correct
Which part is not correct in your opinion pbear. I respect your viewpoints brother
I have much to learn in this area. I am gifted with multiple drives and partitons and run several os (all 4 Mints + others)
so I have to be in control of grub. This is how it works for me, but others may use different methods--I want to see all these please..
btw: I noticed your forum absence for quite a while--and now it's good to have back in here.
Sounds like you're good to go
Wow, if you have much to learn, imagine how I feel. But I have learned some things working through this problem. Grub is messy, hence the name???
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

all41 wrote: Sat May 28, 2022 2:29 am I love the shepard avatar@RealDogBoy and I know what 'real dogs' means--just sayin we love the breed.
Once we had 18 including pups
I love the breed and have had five GSDs over the last four decades. But 18 at once... wow.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3578
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: Can't get Grub to update; System with Existing LM Installations

Post by Jo-con-Ël »

You were wrong supposing LM 20.3 was not installed correctly ćause you couldn't find user folder on /home/user. Those default personal folders are created only when you run first session with that user but you didn't.

For the rest, in most computers you wont need to unplug drives as you can choose the drive to boot (asumming you are installing on BIOS mode) on computer boot menu .

Installers bugs apart, when installing, you place new installed system's grub on a disk MBR you select, by example installing with Something else.. option
Captura de pantalla de 2022-05-28 11-54-36.png
That new system's GRUB becomes dominat on that disk (if threre are other systems installed on that disk) and on computer if you set that disk on first place (default) on BIOS setup boot order. (*)

The only thing you would need to do after installing LM 20.3 first time, is ensuring you place LM 20.3 disk first in boot order and you didn't.

-------------------------------------
(*)Notice you still have the other system GRUBs on their own disks MBR. When choosing to boot any other disk (by default or on computer boot menu) they wont reflect changes on other systems on its GRUB menu (nor when installing new system neither when installing new kernels).

In the same way booting those other systems from dominat GRUB menu, when installing new kernels that change wont be reflected unless you update dominat GRUB menu. :wink:
Last edited by Jo-con-Ël on Mon May 30, 2022 4:25 am, edited 3 times in total.
Arrieritos semos y en el camino nos encontraremos.
pbear
Level 16
Level 16
Posts: 6569
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: Can't get Grub to update; System with Existing LM Installations

Post by pbear »

RealDogBoy wrote: Sat May 28, 2022 4:46 am But sudo grub-install /dev/sdX is more elegant and now I know that.
Be aware, that simple command only works if you are booted into the system you want to control Grub.
There are ways to achieve the same thing if not, but they're a bit more complicated.

Anyhoo, is all good now?
User avatar
all41
Level 19
Level 19
Posts: 9520
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Can't get Grub to update; System with Existing LM Installations

Post by all41 »

pbear wrote: Sat May 28, 2022 11:59 am
RealDogBoy wrote: Sat May 28, 2022 4:46 am But sudo grub-install /dev/sdX is more elegant and now I know that.
Be aware, that simple command only works if you are booted into the system you want to control Grub.
Absolutely--
I only update grub from the partition which I have set at the top of the bios boot order (Una MATE).
btw--my grub is on a spinner used for data storage--there is no os on this drive at all.
I have a front panel sata hot-swap bay--If I insert a drive with additional os I will do the sudo update-grub
so these os will show.
Contending with several os spread among multiple drives is more complicated--especially with the hot-swap bay.
So all my drives have their own grub--and I could choose to boot them at bios--but the spinner contains the dominant
system-wide grub.
Everything in life was difficult before it became easy.
User avatar
RealDogBoy
Level 1
Level 1
Posts: 31
Joined: Tue Jun 24, 2014 3:17 am

Re: Can't get Grub to update; System with Existing LM Installations

Post by RealDogBoy »

pbear wrote: Sat May 28, 2022 11:59 am
RealDogBoy wrote: Sat May 28, 2022 4:46 am But sudo grub-install /dev/sdX is more elegant and now I know that.
Be aware, that simple command only works if you are booted into the system you want to control Grub.
There are ways to achieve the same thing if not, but they're a bit more complicated.

Anyhoo, is all good now?
Ah, so that command wouldn't have helped me when I was stuck because I couldn't boot into the LM 20.3 system (until I tried the simple hack of unplugging the other drives :lol: ).

In my research I came across that link. Yikes! That is deeper into Grub than I hope I'll ever need to go.

And, yes, all is good now. I didn't lose any data when LM 19 stopped booting and my new LM 20.3 installation is working fine.Thanks again.
Locked

Return to “Installation & Boot”