Force Grub to open on reboot?
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
- darkrchaos
- Level 1
- Posts: 27
- Joined: Thu Mar 19, 2020 8:29 pm
Force Grub to open on reboot?
I've just spent the last 4 hours trying to fix my computer. After updating my computer I lost my ability to connect to the internet wirelessly. I believe it was because of the new kernel, so I spent the day trying to open grub to switch to the old one with no success. I eventually got sick of trying and used to timeshift to fix the problem.
Thank god there is timeshift...
Anyway I would still like to know how to get into grub. I tried editing the file, but it still wouldn't open. Is there a way to force it open? Like a "restart and open grub" option?
Thank god there is timeshift...
Anyway I would still like to know how to get into grub. I tried editing the file, but it still wouldn't open. Is there a way to force it open? Like a "restart and open grub" option?
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.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Force Grub to open on reboot?
To help with the discussion and if you are command line capable, please post the output from the following command:
The initial grub process can be configured to prompt the user by waiting a predetermined number of seconds. Please provide your Linux Mint version as well.
Code: Select all
grep -v '^#' /etc/default/grub
Last edited by deck_luck on Fri Jul 24, 2020 12:57 pm, edited 1 time in total.
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Re: Force Grub to open on reboot?
Not clear what file you tried editing. However, as deck_luck suggests, Grub's default behaviour (i.e., unless overridden by subsequent grub.cfg settings) is determined by the settings in the /etc/default/grub file. The default "GRUB_TIMEOUT=10" is generally adequate, but the "GRUB_TIMEOUT_STYLE=hidden" setting means that no Grub boot menu will appear unless the user hits a key (Esc) during those 10 seconds.darkrchaos wrote: ⤴Thu Jul 23, 2020 9:56 pm Anyway I would still like to know how to get into grub. I tried editing the file, but it still wouldn't open. Is there a way to force it open? Like a "restart and open grub" option?
In some cases, results may also be affected by a bug in Ubuntu 20.04 (see here) causing Grub to ignore those defaults. In that case, the "workaround" most likely to succeed is to uncomment the "#GRUB_TERMINAL=console" line (i.e., change it to "GRUB_TERMINAL=console") in the /etc/default/grub file.
That bug should get fixed in the forthcoming Ubuntu point release due August 6th and in a LM 20.x point release that should also (one hopes) follow shortly thereafter.
Re: Force Grub to open on reboot?
There is usually a key to call grub during boot. Try hitting shift or ESC repeatedly.
Re: Force Grub to open on reboot?
Exactly as I said above, but that won't overcome the problem if the Ubuntu 20.04 "bug" is involved.
- darkrchaos
- Level 1
- Posts: 27
- Joined: Thu Mar 19, 2020 8:29 pm
Re: Force Grub to open on reboot?
That's what I was editing. I changed GRUB_TIMEOUT=0 to GRUB_TIMEOUT=10, but it still didn't work. I'm pretty sure it also had GRUB_TIMEOUT_STYLE=hidden. What would I change that to so it would open instead of being hidden.arvy wrote: ⤴Thu Jul 23, 2020 11:01 pmNot clear what file you tried editing. However, as deck_luck suggests, Grub's default behaviour (i.e., unless overridden by subsequent grub.cfg settings) is determined by the settings in the /etc/default/grub file. The default "GRUB_TIMEOUT=10" is generally adequate, but the "GRUB_TIMEOUT_STYLE=hidden" setting means that no Grub boot menu will appear unless the user hits a key (Esc) during those 10 seconds.darkrchaos wrote: ⤴Thu Jul 23, 2020 9:56 pm Anyway I would still like to know how to get into grub. I tried editing the file, but it still wouldn't open. Is there a way to force it open? Like a "restart and open grub" option?
In some cases, results may also be affected by a bug in Ubuntu 20.04 (see here) causing Grub to ignore those defaults. In that case, the "workaround" most likely to succeed is to uncomment the "#GRUB_TERMINAL=console" line (i.e., change it to "GRUB_TERMINAL=console") in the /etc/default/grub file.
That bug should get fixed in the forthcoming Ubuntu point release due August 6th and in a LM 20.x point release that should also (one hopes) follow shortly thereafter.
Re: Force Grub to open on reboot?
Change it to "GRUB_TIMEOUT_STYLE=menu" and run
sudo update-grub
. If that doesn't work, try uncommenting the "#GRUB_TERMINAL=console" line.
Last edited by arvy on Fri Jul 24, 2020 12:20 am, edited 1 time in total.
- darkrchaos
- Level 1
- Posts: 27
- Joined: Thu Mar 19, 2020 8:29 pm
Re: Force Grub to open on reboot?
I heard a few places say to update grub2. So just to be clear I update grub not grub2?
Re: Force Grub to open on reboot?
The command is exactly as posted with a hyphen. Copy/paste as follows:
Code: Select all
sudo update-grub
Re: Force Grub to open on reboot?
The update-grub2 is a symbolic link to update-grub. Either one works. (Now, if I could just eliminate my typos.)darkrchaos wrote: ⤴Fri Jul 24, 2020 12:18 am I heard a few places say to update grub2. So just to be clear I update grub not grub2?
Code: Select all
$ ls -l /usr/sbin/update-grub{,2}
-rwxr-xr-x 1 root root 64 Mar 11 15:57 /usr/sbin/update-grub
lrwxrwxrwx 1 root root 11 Mar 11 15:57 /usr/sbin/update-grub2 -> update-grub
$
🐧Linux Mint 20.3 XFCE (UEFI - Secure Boot Enabled) dual boot with Windows 11
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
Give a friend a fish, and you feed them for a day. Teach a friend how to fish, and you feed them for a lifetime. ✝️
- darkrchaos
- Level 1
- Posts: 27
- Joined: Thu Mar 19, 2020 8:29 pm
Re: Force Grub to open on reboot?
Thank you GRUB_TIMEOUT_STYLE=menu worked. Now if I ever need to change kernels, I have a easy way of accessing that.
Re: Force Grub to open on reboot?
Good. Actually, I'm surprised that the default "GRUB_TIMEOUT_STYLE=hidden" setting hasn't caught more people unaware. It used to be handled by an override in /etc/grub.d/40_custom that they removed from LM 20 for some strange and unknown (to me) reason. I put it back for myself and you can do likewise if you want to ensure that a Grub boot menu will always be visible on start-up. Just add back the following into your /etc/grub.s/40_custom file:
Code: Select all
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
Re: Force Grub to open on reboot?
I am very happy to hear that this is now solved for you, but simply as an addendum to this thread I show below the important content from my /etc/default/grub file that I have used ever since I started using UEFI, several years ago, when bringing up the grub menu by tapping Esc never seemed to work as it should.
This gives me a grub menu for 2 seconds only, giving me time, as long as I'm at the computer, to choose another kernel if I ever need to. It has saved a lot of trouble once or twice since when a new kernel has caused boot problems so I keep this configuration in every machine I have.
This gives me a grub menu for 2 seconds only, giving me time, as long as I'm at the computer, to choose another kernel if I ever need to. It has saved a lot of trouble once or twice since when a new kernel has caused boot problems so I keep this configuration in every machine I have.
Code: Select all
GRUB_DEFAULT=0
#Next line will make the countdown time show the menu
GRUB_TIMEOUT_STYLE=menu
#Next line changed from 0 to 2 for 2 second delay
#GRUB_HIDDEN_TIMEOUT=2
GRUB_TIMEOUT=2
#Next line changed from true to false to allow delay countdown to show
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_DISTRIBUTOR="Xubuntu-20.04"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
Re: Force Grub to open on reboot?
More precise and authoritative explanations are provided in the Grub manual here for each Grub /etc/default/grub setting which, in turn, control the operation of grub-mkconfig. As also explained there, customization can be done by editing /etc/grub.d/40_custom or by creating /boot/grub/custom.cfg. In extreme cases (seldom necessary) automatic running of grub-mkconfig itself can be disabled and grub.cfg is then edited directly instead.
Re: Force Grub to open on reboot?
What if you can't boot from your hard drive? "Sorry, but that drive isn't in /etc/fstab."
Re: Force Grub to open on reboot?
Different problem. Start your own thread if you want help with that.