On systems with only a single OS installed, the grub menu does not offer any useful functionality, so we should hide it by default.
- Name: Hans de Goede
- Email: firstname.lastname@example.org
- Release notes owner:
- Targeted release: Fedora 29
- Last updated: 2021-06-21
- Tracker bug: #1592201
- Release Notes tracking: #182
On systems with only a single OS installed, the grub menu's only function is to allow booting older kernels, which is only necessary as a rescue option in case of a severe kernel bug and as such not something which is directly useful for normal use.
Fedora already has a lot of work done to not show too technical boot messages to end users during bootup, e.g. we pass quiet to the kernel and we've plymouth to show a bootsplash instead of a bunch of "Starting service-foo: OK" messages.
The grub menu with its kernel versions is another example of showing too technical info to end-users and on non multi-boot systems it normally is not necessary, so it is better to hide it.
This change will add menu-auto-hide functionality to grub, which when enabled will hide the menu if:
- The machine only has a single OS installed; and
- The previous boot has set a flag to indicate it successfully booted
To make the menu easier to reach when hidden this change will also extend how the menu can be unhidden. Currently to show the menu when hidden the user needs to press ESC during boot. There are 3 problems with this
- It is not easily discoverable
- Timing the ESC key press right may be hard
- ESC makes the machine enter its firmware/BIOS setup screen on some machines
This change will add 2 new unhide methods to address these problems:
- Press F8 to unhide the menu (F8 has been the key to show the Windows boot menu for many older Windows versions)
- Keep SHIFT pressed during boot, this fixes the timing problem and this is what Ubuntu does so various forum posts, etc. refer to this
This new auto-hide functionality will be automatically enabled on new Fedora Workstation installs. This can be disabled by running:
sudo grub2-editenv - unset menu_auto_hide
Benefit to Fedora
Not showing the menu leads to a smoother and faster boot experience making for a better user-experience.
- Proposal owners:
- Change grub to implement the changes as described above in "Detailed Description"
- Make sure this is all properly documented in release-notes, etc.
- Write patches for anaconda to set menu_auto_hide=1 in the grubenv file on Workstation installs
- Document how to get the menu and how to disable auto-hide, etc. in the admin guide and then link to that part of the admin guide from the release-notes
- Other developers:
- The anaconda developers will need to review and merge the grubenv related patches
- Release engineering:  (a check of an impact with Release Engineering is needed)
- List of deliverables: all
- Policies and guidelines: The policies and guidelines do not need to be updated.
- Trademark approval: Not needed for this Change.
The changes are in the grub.cfg and grubenv files which are generated at install time. Users upgrading from a previous Fedora version will keep the old behavior. Users can manually enable this after an upgrade by regenerating their grub.cfg file using grub2-mkconfig and setting menu_auto_hide=1 in the grub environment. How to manually enable this will be documented in the to-be-written docs.
How To Test
- Single OS test
- Install Fedora Workstation in a fresh vm or select reclaim diskspace -> delete all in the installer (do a single os install).
- Boot the system the grub menu should not show
- (Re)boot, hold the left SHIFT key down during boot, you should now get the grub menu
- Boot the system and then press "CTRL + ALT + F6" followed by "CTRL + ALT + DEL" to do a reboot from the text-console without logging in, this counts as a failed boot, so the menu should now show.
- Run sudo grub2-editenv - set menu_show_once=1, reboot, the menu should now show with a 60 second countdown
- Dual boot test
- Install Fedora Workstation on a machine which has Windows installed
- Boot the system the grub menu should now show
- EFI vs Classic PC BIOS boot
- All above tests should be done twice, once on an EFI system and once on a system using Classic PC BIOS boot
Single OS Workstation installs boot in a smooth manner without showing any text / menus to the user all the way into the graphical login manager (gdm).
- Contingency mechanism: Undo the anaconda changes.
- Contingency deadline: Beta Freeze
- Blocks release? No
- Blocks product? Workstation
See the GRUB hidden menu change FAQ.
- Release Notes tracking: #182