GNU Grub menu suddenly shows up [SOLVED]

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
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

GNU Grub menu suddenly shows up [SOLVED]

Post by 52ROSt »

LM 21.3 Cinnamon Edge, updated

Since yesterday I am seeing the GNU Grub menu when I start my PC. It is to be seen for 15 - 20 s than booting continues normally. I also can shorten the time by hitting Enter.

Is there something, which can be done that the GNU Grub menu does not show up so long before the PC continues to boot?

Thanks in advance for helping comments.
Last edited by 52ROSt on Sun Apr 14, 2024 2:02 pm, edited 2 times in total.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3655
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GNU Grub menu suddenlyt shows up

Post by Jo-con-Ël »

First confirm there is another OS installed. Run and post back sudo os-prober.

GRUB menu is shown by default 10 seconds if another OS is detected. If it is so you didn't see GRUB menu before because the way you booted Linux Mint Live on installing. Now after updating (if installed a new kernel it ran update-grub to make Mint's boot with new kernel by default) that system was detected.

Most probably you are booting from computer's Boot Menu and do prefere booting on that way (directly to Mint w/o GRUB menu). To get it you need to
1)Avoid GRUB detecting other system.
Edit /etc/default/grub.d/50_linuxmint.cfg, by example running

Code: Select all

xed admin:///etc/default/grub.d/50_linuxmint.cfg
it will ask for password twice.
Modify last line to GRUB_DISABLE_OS_PROBER=true.

Save file, close editor.
2) Run sudo update-grub and reboot.

If you really want GRUB menu to dual boot from there, you can short that timeout if there is no other problem on displaying GRUB menu.
1)Edit /etc/default/grub

Code: Select all

xed admin:///etc/default/grub

Change first lines as follows
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=menu
GRUB_TIMEOUT=5
.
2)Save file and run sudo update-grub.
Reboot and see result.
Last edited by Jo-con-Ël on Fri Apr 12, 2024 11:05 am, edited 5 times in total.
Arrieritos semos y en el camino nos encontraremos.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenlyt shows up

Post by Dan-cer »

52ROSt wrote: Thu Apr 11, 2024 6:46 pm LM 21.3 Cinnamon Edge, updated
Since yesterday I am seeing the GNU Grub menu when I start my PC. It is to be seen for 15 - 20 s than booting continues normally. I also can shorten the time by hitting Enter.
Is there something, which can be done that the GNU Grub menu does not show up so long before the PC continues to boot?
Thanks in advance for helping comments.
You just have to edit 1 line in grub. Open that file with root privilegues with this command:

Code: Select all

xed admin:///etc/default/grub
Edit this line with the number you want (prefer 3):

Code: Select all

GRUB_TIMEOUT=3
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

Re: GNU Grub menu suddenlyt shows up

Post by 52ROSt »

Thanks for your replies.

@ Jo-con-Ël

The os-proper is not found, is the message I got.
What is the correct command to install it please?
User avatar
MiZoG
Level 8
Level 8
Posts: 2468
Joined: Fri Jan 26, 2018 8:30 pm
Location: Athens, Greece

Re: GNU Grub menu suddenly shows up

Post by MiZoG »

Don't worry about os-prober. It is installed.
os-prober will not return any results when Mint is the sole OS installed and apparently is not involved in the sudden occurrence of grub timeout.

I presume grub timeout appeared after a crash / forced reset due to set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30} in /etc/grub.d/00_header, a "provision" for users to give them the chance to go to Grub's "Advanced Options" or run diagnostics / disk repair operations at boot time because Ubuntu (Mint's base system) defaults to hiding grub when it is the only OS in a system.

Edit your grub configuration as dan-cer indicated

Code: Select all

xed admin:///etc/default/grub
and find the line:

Code: Select all

GRUB_TIMEOUT=
set it to

Code: Select all

GRUB_TIMEOUT=0
or whatever value if you do want to see Grub indeed.
Save. Run sudo update-grub and reboot.

If however grub keeps showing up
you have to add the line in the above configuration template (/etc/default/grub)

Code: Select all

GRUB_RECORDFAIL_TIMEOUT=0
or other value in secs
and then save, run sudo update-grub and reboot.
I would discourage you from zeroing RECORDFAIL_TIMEOUT. You need to deal with the cause of crashes and avoid hard resets instead.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenly shows up

Post by Dan-cer »

Thanks MiZoG for adding sudo update-grub as the final command. I forgot it in my post. However, without it nothing changes.
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
Pjotr
Level 24
Level 24
Posts: 20288
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland) 🇳🇱 🇮🇱
Contact:

Re: GNU Grub menu suddenlyt shows up

Post by Pjotr »

52ROSt wrote: Fri Apr 12, 2024 1:42 pm The os-proper is not found, is the message I got.
That's because it's not os-proper but os-prober.
MiZoG wrote: Fri Apr 12, 2024 10:37 pm I presume grub timeout appeared after a crash / forced reset due to set timeout=${GRUB_RECORDFAIL_TIMEOUT:-30} in /etc/grub.d/00_header, a "provision" for users to give them the chance to go to Grub's "Advanced Options" or run diagnostics / disk repair operations at boot time because Ubuntu (Mint's base system) defaults to hiding grub when it is the only OS in a system.

(.....)

If however grub keeps showing up
you have to add the line in the above configuration template (/etc/default/grub)

Code: Select all

GRUB_RECORDFAIL_TIMEOUT=0
or other value in secs
and then save, run sudo update-grub and reboot.
I would discourage you from zeroing RECORDFAIL_TIMEOUT. You need to deal with the cause of crashes and avoid hard resets instead.
Cool! I didn't know that. Thanks for sharing this.

I suppose that 10 seconds should be a more reasonable setting for it, because the default 30 seconds seem over the top.

Some more reading about this feature suggests that simply using certain non-default filesystems triggers this recordfail_timeout behaviour as well, even when nothing has gone wrong before. Which makes it even more important to set a shorter timeout.
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
Jo-con-Ël
Level 11
Level 11
Posts: 3655
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GNU Grub menu suddenly shows up

Post by Jo-con-Ël »

MiZoG wrote: Fri Apr 12, 2024 10:37 pm Don't worry about os-prober. It is installed.
os-prober will not return any results when Mint is the sole OS installed and apparently is not involved in the sudden occurrence of grub timeout.

I presume...
That's why sudo os-prober (not proper) result I asked for is needed, to not presume any thing. Also OP didn't mentioned/confirmed there is/isn't another OS installed.

Maybe it is as you said but timeout mentioned by OP ("15 - 20 s") does not match with fallback timeout 30 seconds in case of recordfail, niether with default timeout (10 seconds) on executing 30_os-prober if dualboot as I presume...
Arrieritos semos y en el camino nos encontraremos.
User avatar
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

Re: GNU Grub menu suddenly shows up

Post by 52ROSt »

Thanks for all your answers.

os-proper - I did it again with os-prober and got no response from the system. This means the command is installed but did not produce an output. This in turn I interprete that there is only one bootable system available.

Is my interpretation correct?




Next I looked into

Code: Select all

/etc/default/grub
The script contains

Code: Select all

GRUB DEFAULT=0
already

The related lines are in my grub script are:

Code: Select all

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
This made thinking if I should try to run the command

Code: Select all

sudo update-grub
.

I did it and the problem was solved. System boots without showing the GNU Grub menu.

Thanks for all your contributions to the solution of the problem.



However, I looked also in the Boot menu of the BIOS.

There are 2 entries to be seen if I don't have a bootable medium attached:
- ubuntu
- the long code for my SSD
If I attach a bootable USB stick, I see this stick additionally.

Here I only wonder what the ubuntu entry will do? (I did not dare to touch it!)
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenly shows up

Post by Dan-cer »

ubuntu is indeed your Linux Mint. Because it is based on ubuntu, it appears as it there. Don't bother.

If your issue is solved, please mark it as [Solved] in first post title.
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

Re: GNU Grub menu suddenly shows up

Post by 52ROSt »

@Dan-cer,

ubuntu & my SSD

This is interesting information. I always thought that the normal booting is done from my SSD with an UEFI boot sector. Good go to know that - if needed only - I have to select "ubuntu" and not my SSD.

As all my previous LM installation worked to fine I had never to look in the boot menu of the BIOS after LM was installed.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenly shows up

Post by Dan-cer »

52ROSt wrote: Sun Apr 14, 2024 2:02 pm ubuntu & my SSD

I'm a bit confused by "SSD". What do you mean by that? Is that what it says in Grub? Please post a picture of Grub if you manage to make it visible - you have now set timeout=0 and need a certain key to get in after all. Maybe ESC. Unfortunately I don't know it at the moment.
It's definitely useful to have a method at hand to open the grub screen in case a "recovery mode" is needed.

Otherwise, please post the contents of /etc/boot/grub.cfg in code block. This file can be opened with the text editing app (Xed).
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3655
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by Jo-con-Ël »

Ubuntu is the UEFI boot option for Mint and SSD could be...I'd better not suppose this time. :D

Post back sudo blkid; sudo efibootmgr -v result.
Arrieritos semos y en el camino nos encontraremos.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by Dan-cer »

Jo-con-Ël wrote: Sun Apr 14, 2024 3:04 pm Post back sudo blkid; sudo efibootmgr -v result.
Thank you Jo-con-Ël for these 2 commands. Very helpful. I forgot them.
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by 52ROSt »

@Jon-Co

I ran the command. Output is below

nvme0n1px = partitions of SSD
HDD1_Toshiba = is an external HHD on which I'm just making my first databack from the new machine.

I am surprised to see here Windows mentioned. Could it be that the command also checks my external HDD? There I have copies of older VMs

I am curious what you can read from below output.

Code: Select all

rost@x13-ROSt:~$ sudo blkid; sudo efibootmgr -v
[sudo] password for rost:         
/dev/nvme0n1p3: UUID="60643f7a-11c8-40d9-bd65-513b4c873fc6" TYPE="swap" PARTUUID="d102badd-3a2d-4c19-8731-c6d6ccbc4b1a"
/dev/nvme0n1p1: UUID="24BE-2584" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="9dac55a0-2a62-4a8c-8070-d4e0e5f8fe16"
/dev/nvme0n1p4: UUID="8d919839-6298-4618-87e7-15e4450230ff" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="0d3cbdb1-5194-441f-96fe-036c711909c8"
/dev/nvme0n1p2: UUID="4cd9b486-96e2-403f-92c6-d0dfb3bea314" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="61dc5f9c-fb56-495f-bb11-d88ed09e14c6"
/dev/sda1: LABEL="HDD1_Toshiba" UUID="fe935f82-6e1b-48ec-a24b-db13ec4f6413" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="ac9a6382-01"
/dev/sr0: BLOCK_SIZE="2048" UUID="2017-09-15-16-48-31-00" LABEL="HiSuite" TYPE="iso9660" PTTYPE="mac"
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,001D,001E,001F,0020,0021,0022,0023,0024,0025
Boot0000* ubuntu	HD(1,GPT,9dac55a0-2a62-4a8c-8070-d4e0e5f8fe16,0x800,0xf9800)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager	HD(1,GPT,c617ea62-8689-4734-b224-5ce9a160ee67,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...H................
Boot0010  Setup	FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu	FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen	FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics	FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Asset Information	FvFile(da465b87-a26f-4c12-b78a-0361428fa026)
Boot0015  Regulatory Information	FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0016  ThinkShield secure wipe	FvFile(3593a0d5-bd52-43a0-808e-cbff5ece2477)
Boot0017  ThinkShield Passwordless Power-On Device Manager	FvFile(08448b41-7f83-49be-82a7-0e84790ab133)
Boot0018  Wi-Fi Configuration	FvFile(d3aaff0f-cb22-4792-896c-802c2e9383ba)-.A.p.p...
Boot0019  Reinstall Windows from Cloud	FvFile(3edbaac4-5017-4870-8cc4-721f9ef1974f)-.A.p.p...
Boot001A  Intel(R) MEBx	FvFile(29a70110-7762-4211-ae88-fab19b7665be)
Boot001B  Startup Interrupt Menu	FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot001C  Rescue and Recovery	FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot001D* USB CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot001E* USB FDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001F* NVMe0	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot0020* USB HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot0021* PXE BOOT	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot0022* LENOVO CLOUD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri(https://download.lenovo.com/pccbbs/cdeploy/efi/boot.efi)
Boot0023* ON-PREMISE	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ad38ccbbf7edf04d959cf42aa74d3650)/Uri()
Boot0024  Other CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35400)
Boot0025  Other HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,ca88c2349e7ae947beeb43038a5aeae700)
Boot0026* IDER BOOT CDROM	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0027* IDER BOOT Floppy	PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0028* ATA HDD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0029* ATAPI CD	VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot002A  Lenovo Memory Self Repair	FvFile(4ddd67e7-bdf5-4473-8ab0-02821c084338)
rost@x13-ROSt:~$ 
User avatar
Jo-con-Ël
Level 11
Level 11
Posts: 3655
Joined: Sun Jun 20, 2021 12:41 pm
Location: donde habita el olvido

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by Jo-con-Ël »

I didn't know it was a Lenovo 'cause I don't like the way efibootmgr interacts with Lenovo's firmware/boot manager. It doesn't show only devices and/or drives (boot options) as many other PC's so you can see if booting on UEFI only or UEFI+Legacy easily.

In your case it shows a kind of startup menu, mixing internal UEFI/BIOS options (Boot0010-0017,...) and boot options (those on BootOrder) even media is not present.

It is sure Boot000 ubuntu option is Mint's UEFI option and it is your default boot option as per BootOrder.

That other SSD option should be 001F (Boot001F* NVMe0) and most probably it is a BIOS Legacy boot option. Maybe you could or not boot such option but you don't need it at all so you can try setting boot mode on UEFI only or disabling Legacy option ROM/CSM.
Arrieritos semos y en el camino nos encontraremos.
User avatar
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by 52ROSt »

@Jo-con-Ël

Thanks for your explanations.

I just got the idea to send an image of my SSD with its partition.
Screenshot_20240415_01.png
Maybe it gives you clarification.
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by Dan-cer »

52ROSt wrote: Mon Apr 15, 2024 12:09 pm Maybe it gives you clarification

Yes and no.
Yes, because it clearly shows how you have divided up your Linux hard disk. 93 GB are still available unformatted. You could format it as a backup partition in ext4 format, for example. At least about 50 GB of it. What is missing are representations of the other hard disks, e.g. Windows.
You have to select them by dropdown in upper right corner of Gparted window.

No, because my question was what can be read in Grub. Judging by the output of sudo efibootmgr -v, there are an unusually large number of entries, some of them from a cloud. I have no idea what this has to do with booting.

For me, it makes sense to clean the whole thing up. The easiest and most elegant way to do this is still unclear to me, as I don't have the necessary commands to hand.
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
User avatar
52ROSt
Level 5
Level 5
Posts: 757
Joined: Mon Apr 14, 2014 10:01 am

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by 52ROSt »

@Dan-cer

Thanks for for your ongoing help.

Windows partitions
I got an idea where they could come from.
When I ran the command, I had either the SSD of my old PC attached external drive to retrieve data, or I had my Toshiba HDD1 attached to back up my data.
Both drives contain VM with Windows OS.
Additionally I have a folder on this PC with Windows VMs in it. Maybe this could be the source of the Window partitions

GParted
I opened the roll down menu upper right corner and saw there only the SSD of this PC and the Toshiba HDD 1 drive because I am running the data back up in the back ground.

93 GB unformatted
I was adviced to keep 10 % of the SSD unformatted to allow the system to store data there when there are elements in the formatted partitions are damaged. A life extention unformatted partition so to say.

Should I run

Code: Select all

sudo efibootmgr -v 
again without any external HDD attached?
User avatar
Dan-cer
Level 6
Level 6
Posts: 1243
Joined: Fri Jul 29, 2022 4:56 pm
Location: Germany, Lower Saxony

Re: GNU Grub menu suddenly shows up [SOLVED]

Post by Dan-cer »

52ROSt wrote: Mon Apr 15, 2024 1:56 pm Should I run sudo efibootmgr -v again without any external HDD attached?
Yes, why not?
And, as a little training, please set GRUB_TIMEOUT=10 in /etc/default/grub to make grub visible for 10 secs.
Then not forget sudo update-grub.
Then reboot to be able to do a screenshot of Grub window with your mobile phone camera.
Post the image here.
How you get better results when searching for yourself.
Having problems with translate into English? Use Deepl Translator 1-click-button in editor - available for Firefox and chromium-based browsers.
Post Reply

Return to “Installation & Boot”