LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 01-11-2020, 05:20 PM   #1
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Rep: Reputation: 24
Angry Grub 2 Configuration


WHATT I HAVE DONE SO FAR:

I have searched for this problem on Google and in this forum. None of the answers actually work.


THE PROBLEM

Here is the content of my /etc/default/grub file



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=""



As you can see timeout=hidden and timeout=0. I shouldn't see the Grub loader on boot up but I do and it hangs around for 30 seconds



All the tutorial say to change the timeout to zero but it already is zero.



Clearly something is different about the latest version of Ubuntu and Linux Mint 19.3 that causes the many many Grub 2 tutorials on the internet to be wrong. Its probably Ubuntu because every time I think I have a Mint problem it turns out to be an Ubuntu problem.



QUESTIONS:



1. Does anyone know how to make the grub loader simply open the operating system in Mint 19.3? It worked fine in 19.2.


2. Why is etc/default/grub being ignored by the system?



2. What file do you ACTUALLY modify to get Grub to do what you want now that grub customiser and startup manager are no longer available to make our lives easier.



I want grub to go away because I only use Linux and if it were not for Grub my computer would boot in 8 seconds.
 
Old 01-11-2020, 05:23 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
I think you need this also in /etc/default/grub
Code:
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
After any changes to /etc/default/grub or any of the configuration files in /etc/grub.d you will need to run
Code:
sudo update-grub
from a terminal for the changes to take place.

Last edited by colorpurple21859; 01-11-2020 at 05:36 PM.
 
1 members found this post helpful.
Old 01-11-2020, 05:40 PM   #3
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Original Poster
Rep: Reputation: 24
Thank you for trying Colorpurple but modifying that grub file seems to have no affect. Having said that, perhaps those lines have to be put in some specific place in the stack. I just added them to the end of the above stack (everything after that in the grub file is commented out). And yes I did run update.

By the way I noticed when I did the update that there were some lines written to the screen about EFI. Is it supposed to write to the EFI and perhaps that is not working? I didn't get any error messages. But I did notice that Grub was smiling and sticking its tongue out at me.
 
Old 01-11-2020, 05:42 PM   #4
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Original Poster
Rep: Reputation: 24
I.m going to go into bios and see if there is a setting there hidden somewhere. Giagabyte Auros Z390 Pro.
 
Old 01-11-2020, 05:45 PM   #5
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Original Poster
Rep: Reputation: 24
Nope nothing BIOS that I could find.
 
Old 01-11-2020, 05:52 PM   #6
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
By the way I noticed when I did the update that there were some lines written to the screen about EFI.
What you seen was probably this
Code:
Adding boot menu entry for EFI firmware configuration
and may be part of the problem. Do a
Code:
sudo chmod -x /etc/grub.d/30_uefi-firmware
and see if that helps. I multiboot so I don't usually try to hide my grub menu.
 
1 members found this post helpful.
Old 01-11-2020, 06:02 PM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
On second thought add this to /etc/default/grub
Code:
GRUB_DISABLE_OS_PROBE=true
and skip modifying the file in /etc/grub.d

Last edited by colorpurple21859; 01-11-2020 at 06:05 PM.
 
1 members found this post helpful.
Old 01-11-2020, 06:46 PM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Tested in a vm "GRUB_DISABLE_OS_PROBER=true" is what it takes to hide the menu
 
1 members found this post helpful.
Old 01-11-2020, 07:29 PM   #9
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Original Poster
Rep: Reputation: 24
Nope didn't work. No changes. Here is some data: (I don't know how to do those blue boxes for code)

Output of the update grub command after adding the probe line:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/60_mint-theme.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/linuxmint/theme.txt
Found linux image: /boot/vmlinuz-5.0.0-37-generic
Found initrd image: /boot/initrd.img-5.0.0-37-generic
Found linux image: /boot/vmlinuz-5.0.0-32-generic
Found initrd image: /boot/initrd.img-5.0.0-32-generic
Adding boot menu entry for EFI firmware configuration
done


Contents of the "etc/default/grub" file:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

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=""
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_DISABLE_OS_PROBER=true

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"


Maybe those three lines you gave me need to come first? I read the info page and I saw no mention of things being in a certain order. Thanks Hazel. She said Info was easier than man and she was right!

Last edited by Mikech; 01-11-2020 at 07:39 PM.
 
Old 01-11-2020, 08:34 PM   #10
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Original Poster
Rep: Reputation: 24
Woohoooo! I did it! I figured it out. The old guy has still got it! OK I feel better now. I don't need my meds!

This is how I solved the problem. I would not have solved it if Colorpurple had not steered my in the right direction. Thank you Colorpurple. Sometimes just being able to discuss the problem with someone is all it takes to solve it.

So Linux Mint had to make life exceedingly difficult and could not just leave things standardized. They created their own theme and configuration file. I read about grub allowing vendors to use their own config files in the Grub Info file. So on a hunch, I set about trying to determine if such a file existed and it did. It took a while to track it down. First I had to find the theme and then I just followed the bread crumbs until I found the file:

boot/grub/grub.cfg

Within the file is a line 105:

if [ $grub_platform = efi ]; then set timeout=30

Well I do have EFI so this would true hence the 30 seconds would apply. So I set this to zero and saved the file (after making a backup). You have to be careful however because farther up at line 93 is:

if [ "${recordfail}" = 1 ] ; then set timeout=30

Now I don't have the foggiest as to what that means but the word "fail" in there definitely got my attention. I am guessing if whatever that thing that fails happens then you probably want some time to get into the Grub menu. So I left that alone.

I rebooted and walla! No Grub menu. Something is happening in the background because my computer now boots in about 16 seconds. The 8 second boot time I timed from when I hit the enter key at the Grub menu. I never timed how long it took to get to the Grub menu.

Now that I know this fix I can always change it back. One caveat. It worked once but the file says this at the top:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#


Well I could not find any templates at that directory. The second phrase is a complete lie because it is NOT using the settings from /etc/default/grub! There were 8 files in grub.d but they were not called templates. I did open every file in Gedit and searched for "30" and "timeout" and none of the files contained those terms so I have my fingers crossed. But I could wake up tomorrow and the thing might be back the way it was.

Last edited by Mikech; 01-11-2020 at 08:45 PM.
 
Old 01-11-2020, 10:17 PM   #11
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
The reason for the "do not edit this file" is occasionally an update will call update-grub and you will loose any modifications you did to that file.
 
Old 01-12-2020, 02:53 AM   #12
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,408
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Grub 2 Configuration

I believe the update-grub is something specific to the distribution, nothing on this in the man page.

It might be calling the grub-mkconfig with a specific target file (option -o).
 
Old 01-12-2020, 03:36 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Tonus View Post
I believe the update-grub is something specific to the distribution, nothing on this in the man page.

It might be calling the grub-mkconfig with a specific target file (option -o).
True!
Debian/Ubuntu specific I think:
Code:
cat /usr/sbin/update-grub
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
This does not exist on e.g. ArchLinux.
 
Old 01-12-2020, 01:19 PM   #14
Mikech
Member
 
Registered: Jan 2006
Location: USA
Distribution: Mint
Posts: 90

Original Poster
Rep: Reputation: 24
Ondoho

I think that if Mint keeps diverging farther and farther from the mainstream Linux with each upgrade I may have to switch to something like Arch.

I try to solve my own problems as much as possible using google and searching the forums and I almost always succeed. But if the solution on Google, LQ, or stack exchange don't work because Mint is so far afield then I have to give it up. I avoid the Mint forum like the plague because the last few times I used it the responders were the rudest, nastiest, and most arrogant people I have ever encountered on a forum. And those people are always the most senior people there (based on their profile). Its not civilized over there like LQ and and stack exchange is. My very first post there, many years ago, some people told me I was lazy and stupid because I prefer doing things with a GUI instead of the command line (I spent more than half of my life on the command line with VAX, OS2, DOS, CPM and other OS;s and I don't want to do it anymore). Of course I AM lazy and probably stupid but they aren't supposed to say that out loud, are they? And it hasn't gotten any better over the years.

I love the ease of use and the bells and whistles and eye candy in Mint but I also need to be able to get my work done! This last version didn't even come with GIMP!! It came with something called Drawing which I tried but it appears to me to be a waste of electrons.

Last edited by Mikech; 01-12-2020 at 01:22 PM.
 
Old 01-12-2020, 02:03 PM   #15
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,396

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Have you tried using grub customizer? https://mintguide.org/tools/408-grub...-and-burg.html
 
  


Reply

Tags
grub2



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Grub, Grub and Grub ZeroEffect Linux - Newbie 11 10-07-2004 01:33 PM
GRUB splashimage configuration / update GRUB rudL Linux - Software 1 05-10-2004 07:16 AM
GRUB GRUB GRUB GRUB "Whats Going on?" Gaweph Linux - Newbie 6 03-26-2004 10:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 05:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration