Fedora boot problems

Edit:

This answer solves a lot!

  • grub theme is applied
  • duplicate entries are gone
  • grub is shown how it was set in the settings.

It does:

if [ -d /sys/firmware/efi ]; then
  grub2-switch-to-blscfg
  grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
else
  block_device=$(lsblk -spnlo name $(grub2-probe --target=device /boot/grub2) | tail -n1)
  grub2-install $block_device
  touch /boot/grub2/.grub2-blscfg-supported
  grub2-mkconfig -o /boot/grub2/grub.cfg
fi

Hi people!

I have a friend with a dualboot laptop for school, and I put Fedora on their laptop as its pretty nice. Typically the school relies on paid Adobe stuff, so they need Dualboot.

Now I did the normal procedure, shrinked the windows partition and installed Fedora afterwards, to be able to choose what version to boot in from Grub.

But here come problems:

  • Grub doesnt show. This laptop is pretty fast and the UEFI somehow shows the Acer logo after grub would have shown.
  • The known 4 entries problem, 2 too much. Makes usability not that great

People said you have to press shift or F6, but in my case a single ESC gets into grub, if you accidently press twice you are in the console…

I tried this command:

sudo grub2-editenv - unset menu_auto_hide

but it didnt work.

Before I already tried editing two other grub configs, cant find them currently, both contained lots of settings and none had autohide or skip enabled.

/etc/grub2-efi.cfg and /etc/grub2.cfg are both empty, should I add something to efi? The system uses UEFI.

Or is it /etc/grub.d/12_menu_autohide ?

There has to be clear documentation, and I would find it way better if the grub entries where fixed and grub may get a nice theme for usability, instead of hiding it and having outdated documentation.

I always use up arrow or down arrow for systems where timing issues in display mode changes during boot up stops me from seeing the grub menu. That has the advantage that pressing it too many times (because you can’t know the right time) does no harm. It does mean your position in the menu will have changed by the time you see the menu. But that is very easy to deal with.

I also have never liked the indirect or doubly indirect way that grub2 is normally configured, so I always directly edit /boot/grub2/grub.cfg. I’m not necessarily suggesting you do the same. If you do, then you need to be ready to fix things after automatic updates to that file occur. But even if you don’t, it is a good idea to understand some of the settings buried inside that file, and if you still use indirect methods of changing those, you might want to look in /boot/grub2/grub.cfg to see that the change you wanted is really there.

Note the lines typically in that file that start set timeout=. If you want the menu to be easier to see on each boot maybe you want a longer timeout. Mine is 5 and that is rarely slow enough to actually see the menu (because of monitor mode change issues). Which of those several lines actually sets the value is a trickier question.

I also directly examine the grubenv:
sudo cat /boot/grub2/grubenv
I avoid directly editing it. But I find grub2-editenv confusing enough that I don’t want to issue commands (like the one you showed) and just wonder why it didn’t have the hoped for impact on final grub behavior: I want to see what was there before (whether the setting the command I want to try adds or removes was already there or not) and then see what is there after, so I cleanly divide three possibilities for why it fails:

  1. the suggestion I found online doesn’t apply because that setting was already the way that suggestion would change it to (very likely in your example).
  2. the change to the file didn’t happen, because the grub2-editenv command syntax was wrong.
  3. that setting doesn’t have the desired impact on grub2 behavior.
1 Like

So for some reason a small testing script from another user fixed it, along with fixing the double boot entries AND applying the grub theme I chose before, pretty crazy.

I havent understood it fully but it checks for Efi or legacy and then applies some settings.

I think that having fastboot enabled in windows (and maybe as well in bios) can prevent the grub menu showing. I always disable fastboot (maybe labeled faststart) in windows on dual boot systems.

You are usually able to enter the bios config menu from within windows in cases where the fastboot in bios is interfering.

I think each of those problems were only solved by the grub2-mkconfig command and in each case only because you had done something in your earlier attempts to fix each problem that doesn’t immediately fix it, just modifies the behavior of subsequent grub2-mkconfig commands. If earlier you followed those steps with grub2-mkconfig, then I expect you had some syntax error in that command. If you didn’t earlier include grub2-mkconfig, you need to understand that most of the things documented as fixing or configuring grub2 don’t immediately do so. Instead each just tells the next grub2-mkconfig to do it.

That is true (and a very annoying feature of Windows) and may help others who read the original post without seeing all the details there and think they have the problem described in the original post, but actually have the problem you referred to.

But …

If Windows fast boot had been the problem, that ESC key could not have helped. Something had to be wrong in either /boot/grub2/grub.cfg or /boot/grub2/grubenv and I expect the rerun of grub2-mkconfig fixed that. I think it is possible for that same command to fix the damage done by Windows fastboot (but not stop the next boot of windows from repeating that damage if you haven’t turned off that nasty Windows setting). However, if Windows fast boot had been the original problem, getting to the right place to correctly issue that command would have been harder (would have needed some steps I’m unsure of AFTER first booting from a USB copy of Linux).

Those are links to /boot/grub2/grub.cfg which cannot be accessed by a regular user. It requires sudo privileges to even look at the content, the same as the user must use sudo grub2-mkconfig -o /boot/grub2/grub.cfg to update the grub.cfg file.

That looks like it should have worked – but also failed for me while that option was in the middle of the env list.
Try it with this slight change.
sudo grub2-editenv - unset "menu_auto_hide"
That worked for me.

After the initial delete of that setting I was able to set and unset it without the quotes.

nice, so the Docs have to be updated!

https://fedoraproject.org/wiki/Changes/HiddenGrubMenu#Detailed_Description