GRUB bootloader now appears when I power on

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Netherprovinc3
Level 3
Level 3
Posts: 168
Joined: Mon Feb 04, 2019 9:29 pm

GRUB bootloader now appears when I power on

Post by Netherprovinc3 » Wed Sep 04, 2019 6:55 am

The GRUB boot loader now appears when I power on my computer. That screen shows for 10 seconds. It never used to show before. I don't like that coming up. I swapped out my monitor for a few hours + an overnight, and when I plugged the monitor back in, the GRUB boot menu came up when booting. The only other change that I made recently is that I put in new RAM, and installed Oracle Virtualbox. But that was a few days ago and I didn't notice the GRUB boot loader appearing right after that. Of course,, I also applied new updates that became available from update manager.

In reading some information online, I see that you can edit this line from /etc/default/grub

Code: Select all

 GRUB_HIDDEN_TIMEOUT=0 
But, I don't see that line in the grub file.
Maybe that's how it was with an older version of grub? On the grub screen (when booting), it says version 2.02.
I do see

Code: Select all

 GRUB_TIMEOUT=0 
in the file.

One post that I read said that it could be because there is some sort of an error at boot or at shutdown & so the computer is using a recovery setting. Here is that post.
https://superuser.com/questions/971704/ ... em-to-work

Edit: one other idea of what could be causing this is that I once booted to an external usb hard drive, that had a full install of Linux Mint. I believe as a result, I see "ubuntu" listed twice in the UEFI available boot devices.
Linux Mint 19.1 Cinnamon

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Wed Sep 04, 2019 12:34 pm

Open Terminal and run sudo update-grub. Reboot. If Grub still appears, open Terminal again, run cat /etc/default/grub, copy the output and post in your next reply, using the code tags (</>) above the text entry box.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Netherprovinc3
Level 3
Level 3
Posts: 168
Joined: Mon Feb 04, 2019 9:29 pm

Re: GRUB bootloader now appears when I power on

Post by Netherprovinc3 » Wed Sep 04, 2019 8:34 pm

pbear wrote:
Wed Sep 04, 2019 12:34 pm
Open Terminal and run sudo update-grub. Reboot. If Grub still appears, open Terminal again, run cat /etc/default/grub, copy the output and post in your next reply, using the code tags (</>) above the text entry box.
I ran the first command. But, the grub boot loader still shows when I start up my computer.

Code: Select all

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

# 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"
Linux Mint 19.1 Cinnamon

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Wed Sep 04, 2019 8:52 pm

Sorry, I'm stumped. Those all look like the default settings to me. In particular, timeout style is still hidden.

By the way, this is a single boot machine, right? I assume so, just confirming.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Netherprovinc3
Level 3
Level 3
Posts: 168
Joined: Mon Feb 04, 2019 9:29 pm

Re: GRUB bootloader now appears when I power on

Post by Netherprovinc3 » Wed Sep 04, 2019 10:25 pm

pbear wrote:
Wed Sep 04, 2019 8:52 pm
Sorry, I'm stumped. Those all look like the default settings to me. In particular, timeout style is still hidden.

By the way, this is a single boot machine, right? I assume so, just confirming.
Yes, it's a single boot machine. I did boot from another drive with Linux Mint installed (not the installation media but an actual drive) once. Was an accident.

I also did flash the UEFI not too long ago (maybe 3 weeks ago).
Linux Mint 19.1 Cinnamon

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Thu Sep 05, 2019 12:31 am

Netherprovinc3 wrote:
Wed Sep 04, 2019 10:25 pm
I did boot from another drive with Linux Mint installed (not the installation media but an actual drive) once.
Just booting shouldn't do anything to Grub. If you ran update-grub with such a drive attached, I assume os-prober would pick it up and add to the Grub menu. I don't think it would be sticky, though, once you detached the USB drive and ran update-grub again.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
Pjotr
Level 21
Level 21
Posts: 13248
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: GRUB bootloader now appears when I power on

Post by Pjotr » Thu Sep 05, 2019 4:54 am

Try if it helps when you poke Grub a bit. You might be able to kick Grub out of its obviously buggy lethargy, by setting it to show the menu for an unnoticeable 0.1 second, thus producing the desired effect (namely being hidden). This workaround has worked for me, in similar circumstances.

Proceed as follows:

1. Use copy/paste to transfer the following command into the terminal:

Code: Select all

xed admin:///etc/default/grub
Press Enter. You'll be asked twice for your password.

2. Find the line:
GRUB_TIMEOUT_STYLE=hidden

Change it to:
GRUB_TIMEOUT_STYLE=menu

3. Then find the line below:
GRUB_TIMEOUT=0

Change it to:
GRUB_TIMEOUT=0.1

4. Save and close the modified text file.

5. Then run:

Code: Select all

sudo update-grub
(note the dash between update and grub!)

6. Reboot and test.
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
zcot
Level 5
Level 5
Posts: 501
Joined: Wed Oct 19, 2016 6:08 pm

Re: GRUB bootloader now appears when I power on

Post by zcot » Thu Sep 05, 2019 12:55 pm

That's where the problem is. To grub it is in fact a dual boot system. The other drive, not a removable usb,
"I did boot from another drive with Linux Mint installed (not the installation media but an actual drive)"
you can use the sudo efibootmgr and remove the entry that was added from when you used the other drive.

check efibootmgr --help for usage.

see example work here: https://linuxmint-installation-guide.re ... boot-order

Or use the motherboard UEFI menu system to deal with it.

first change the order and see if that changes it back to the previous state(UEFI F12 boot selector menu to test the alternate entry? or the efibootmgr or UEFI menus). Did it end up adding a new entry and changed the original order? Probably one of them works and one of them fails(if that drive is removed anyway, if it's still there, no).

But probably you need to remove the extra UEFI entry, then you can sudo update-grub once back into the system and it will not (re)find the extraneous entry, and hence grub will not appear thinking that it is a dual boot system any more.

If you remove the wrong one, and that other drive is disconnected then it breaks and you have to reinstall the grub setup. Maybe you use label renaming so you're sure of which is which.

You can hide that menu at this point, but that's not where the problem is actually. But if you decide to just mask that and make it short anyway as Pjotr mentions, then make sure GRUB_DEFAULT=0 is what you want. -that boots the first selection in the list by default. but GRUB_DEFAULT=1 will boot the second selection automatically. So being that you wont be manually selecting it in 0.1 seconds check that. And you can just hit an arrow key in that instant, and it will stop at the grub menu if you need it to.

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Fri Sep 06, 2019 12:48 am

zcot wrote:
Thu Sep 05, 2019 12:55 pm
... not a removable usb ...
Gotcha, I interpreted the post incorrectly. Also true, though, that I didn't know update-grub captures UEFI entries even if the drive is no longer present.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
zcot
Level 5
Level 5
Posts: 501
Joined: Wed Oct 19, 2016 6:08 pm

Re: GRUB bootloader now appears when I power on

Post by zcot » Fri Sep 06, 2019 12:31 pm

pbear wrote:
Fri Sep 06, 2019 12:48 am
zcot wrote:
Thu Sep 05, 2019 12:55 pm
... not a removable usb ...
Gotcha, I interpreted the post incorrectly. Also true, though, that I didn't know update-grub captures UEFI entries even if the drive is no longer present.
Well, it's questionable. I think you interpreted correctly for the most part. But probably "not a removable usb" was not the correct term because Netherprovinc3 did actually use the term "external usb hard drive" in the first post. :P I just wanted to bring a point that it was a hard drive. But it doesn't matter, because with UEFI, sure, it will cache boot entries, -that's the "I see "ubuntu" listed twice in the UEFI available boot devices."

Most likely updates were run while the external drive was simply plugged in and there could've been a kernel update which triggered the os_prober during update-grub, or even installing virtualbox since that required kernel module rebuild and ends with update-grub.

For the OP's situation, if the drive is intended to stay attached during any updates that trigger update-grub, then you can disable the os_prober feature though, but that's a different story.

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Fri Sep 06, 2019 2:03 pm

Now I am confused. I've booted something like a dozen full install USBs on my UEFI machine (single boot Windows) - was testing various procedures later incorporated into a tutorial - and my NVRAM (as reported by bcdedit /enum) reflects none of them (only Windows).
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
zcot
Level 5
Level 5
Posts: 501
Joined: Wed Oct 19, 2016 6:08 pm

Re: GRUB bootloader now appears when I power on

Post by zcot » Fri Sep 06, 2019 5:09 pm

pbear wrote:
Fri Sep 06, 2019 2:03 pm
Now I am confused. I've booted something like a dozen full install USBs on my UEFI machine (single boot Windows) - was testing various procedures later incorporated into a tutorial - and my NVRAM (as reported by bcdedit /enum) reflects none of them (only Windows).
I'm not sure if bcdedit handles linux boots, does it? I've not seen it have an ubuntu entry. I've seen that there's a way to manually do one though. But the UEFI system should list both for sure, or linux efibootmgr.

I don't know about your situation as I guess the transition to the efi deal is a pretty wide implementation from all the various manufacturers, I think it's so different in specific cases.

I have seen a box where it was booted once to a usb live session(never installed, nothing more than running the live system once) and that entry in uefi was still around after the stick was removed. It actually changed the boot order automatically too so on a reboot it would try to boot that missing usb 'ubuntu' entry(and of course just failing) and even worse it wouldn't move on to the next entry which would have been correctly booting Win7 I believe it was. So that's probably one of the most horrible implementations

Even the way that a system will handle a usb connection can be weird because on one box it can see a stick as a removable usb storage device(bootable or not) yet another system sees it directly as a sata drive(i guess the exact partitioning should ultimately have a bearing on that).

so, no telling.

Obviously if this system has the drive attached it doesn't even matter about the variations of the UEFI implementation though, or the management of the entries, I guess grub is going to find that bootable system every time in an update for sure.

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Fri Sep 06, 2019 8:11 pm

Interesting. So, returning to the problem at hand, what do you get, Netherprovinc3, if you run efibootmgr -v in Terminal?

By the way, in addition to the Terminal help and man pages, you might find this article informative.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

Netherprovinc3
Level 3
Level 3
Posts: 168
Joined: Mon Feb 04, 2019 9:29 pm

Re: GRUB bootloader now appears when I power on

Post by Netherprovinc3 » Sun Sep 08, 2019 4:15 pm

zcot wrote:
Thu Sep 05, 2019 12:55 pm
That's where the problem is. To grub it is in fact a dual boot system. The other drive, not a removable usb,
"I did boot from another drive with Linux Mint installed (not the installation media but an actual drive)"
you can use the sudo efibootmgr and remove the entry that was added from when you used the other drive.

check efibootmgr --help for usage.

see example work here: https://linuxmint-installation-guide.re ... boot-order
The external drive that I booted from (once) is a Sata drive that I had connected using a sata to USB adapter (one that also supplied power to the drive). That drive had recently been the internal drive for the computer. This was probably about 5 weeks ago so my memory is a little hazy but I'll give you a recap.

Installed Windows on a newly formatted drive, flashed the UEFI. I then installed Linux Mint to be the only OS on the Windows drive. Same exact distro as what I had been using on the computer for about 1.5 months prior. Next, I erased the home directory on the new install and copied the home directory over from the drive that I had previously installed on. I realize that that all might not have been necessary but I was concerned that the new UEFI firmware might be classified as a different motherboard, making it a good move to reinstall, instead of simply plugging the old drive in. When I did that copy over, I was in the live Linux OS. After copying over, I think I then accidentally booted to the old drive.

Maybe this further detail on the history sheds some light on why there are 2 "ubuntu entries" in the UEFI boot list. However, I think there were none after I flashed the UEFI firmware.

So do you think I should follow your instructions in your first post?
Linux Mint 19.1 Cinnamon

User avatar
zcot
Level 5
Level 5
Posts: 501
Joined: Wed Oct 19, 2016 6:08 pm

Re: GRUB bootloader now appears when I power on

Post by zcot » Sun Sep 08, 2019 6:51 pm

You need to be able to analyze the data in some useful way to be able to do the right thing of course.

Or just post up the info with the command that pbear mentions and we'll see if someone can make heads or tails of it. ;)

Netherprovinc3
Level 3
Level 3
Posts: 168
Joined: Mon Feb 04, 2019 9:29 pm

Re: GRUB bootloader now appears when I power on

Post by Netherprovinc3 » Tue Sep 10, 2019 2:55 am

zcot wrote:
Sun Sep 08, 2019 6:51 pm
You need to be able to analyze the data in some useful way to be able to do the right thing of course.

Or just post up the info with the command that pbear mentions and we'll see if someone can make heads or tails of it. ;)
I thought that I did post the data from pbear's command.

My head is spinning (confuses because I'm a total newb on how this stuff works)

When I press F12 to show the boot devices, all that shows is
UEFI IPv4...
UEFI IPv6...

When i go into the UEFI and look at the boot devices, the list is something like
ubuntu
floppy
USB hard drive
DVD drive
ubuntu

When I disabled the first ubuntu, the computer got "pissed" :lol: booting into a windows recovery looking screen, and complaining about a system32 file. So, I re-enabled the ubuntu boot device. Should I try disabling the other one?

ON the grub boot menu, one of the options is "Windows Boot Manager."

In thinking about this more, my guess it that the problem is stemming from an external USB drive that I have plugged in. It's a sata hard drive in an enclosure, that has Windows, OS X, and Linux partitions. It was reformatted (well before my OS was installed on this computer), and not used as a boot device since the reformat. I use the drive for back in time.

Also, sometimes my OS internal drive shows as sdb, instead of sda.
viewtopic.php?f=18&t=300528

Here is what that external drive looks like. Say, maybe one of those small partitions at the beginning is up to no good. Maybe I didn't get rid of all of what I should have after reformatting several months ago.
external drive.png
Linux Mint 19.1 Cinnamon

User avatar
Pjotr
Level 21
Level 21
Posts: 13248
Joined: Mon Mar 07, 2011 10:18 am
Location: The Netherlands (Holland)
Contact:

Re: GRUB bootloader now appears when I power on

Post by Pjotr » Tue Sep 10, 2019 4:30 am

Netherprovinc3 wrote:
Tue Sep 10, 2019 2:55 am
My head is spinning (confuses because I'm a total newb on how this stuff works)
In that case I advise to reconsider my previous recommendation:
viewtopic.php?f=46&t=301110#p1681413

Not the clean solution that pbear and zcot are trying to find for you, but it's a quick-and-dirty workaround that's easy to apply. :wink:
Tip: 10 things to do after installing Linux Mint 19.2 Tina
Keep your Linux Mint healthy: Avoid these 10 fatal mistakes
Twitter: twitter.com/easylinuxtips
All in all, horse sense simply makes sense.

User avatar
zcot
Level 5
Level 5
Posts: 501
Joined: Wed Oct 19, 2016 6:08 pm

Re: GRUB bootloader now appears when I power on

Post by zcot » Tue Sep 10, 2019 10:48 am

Pjotr wrote:
Tue Sep 10, 2019 4:30 am
Netherprovinc3 wrote:
Tue Sep 10, 2019 2:55 am
My head is spinning (confuses because I'm a total newb on how this stuff works)
In that case I advise to reconsider my previous recommendation:
viewtopic.php?f=46&t=301110#p1681413

Not the clean solution that pbear and zcot are trying to find for you, but it's a quick-and-dirty workaround that's easy to apply. :wink:
Absolutely.

and that's a great solution for this exact situation.

with too many unknowns, you don't want to attempt destructive data management just to test it out, for sure.

pbear
Level 7
Level 7
Posts: 1848
Joined: Wed Jun 21, 2017 12:25 pm
Location: San Francisco

Re: GRUB bootloader now appears when I power on

Post by pbear » Tue Sep 10, 2019 12:53 pm

The problem with a 0.1 second Grub screen is that sometimes you actually need it, e.g., to access advanced options and boot an earlier kernel. Makes more sense, IMHO, to use something like three seconds. Short enough not to annoy overmuch, but long enough to be useful.
Time flies like an arrow. Fruit flies like a banana.
If your problem has been solved, please edit the thread title.

User avatar
zcot
Level 5
Level 5
Posts: 501
Joined: Wed Oct 19, 2016 6:08 pm

Re: GRUB bootloader now appears when I power on

Post by zcot » Tue Sep 10, 2019 1:42 pm

pbear wrote:
Tue Sep 10, 2019 12:53 pm
The problem with a 0.1 second Grub screen is that sometimes you actually need it, e.g., to access advanced options and boot an earlier kernel. Makes more sense, IMHO, to use something like three seconds. Short enough not to annoy overmuch, but long enough to be useful.
Good point for that.

And with editing the GRUB_DEFAULT=0 line of course so you don't have to actually make the correct menu selection. It is used for where the default selection is sitting in the menu, and hence what will be booted in that 0 to 3 seconds. 0 means the first selection of the menu. 1 means the second selection, and so on.

Post Reply

Return to “Installation & Boot”