https://fedoraproject.org/wiki/Changes/CleanupGnomeHiddenBootMenuIntegration == Summary == GNOME integrates with Fedora's [[Changes/HiddenGrubMenu|hidden boot menu feature]] to signal to the bootloader that boot was successful and to request the menu to be shown the next boot when "Boot Options" is selected in the Shutdown/Reboot dialog. Currently Fedora carries downstream patches for this, which directly call the Fedora specific grub2-set-bootflag helper. The goal of this change is to replace these downstream patches with a clean bootloader agnostic solution which can be submitted upstream. == Owner == * Name: [[User:jwrdegoede| Hans de Goede]] * Email: hdegoede@xxxxxxxxxx == Detailed Description == GNOME has 2 integration points with the [[Changes/HiddenGrubMenu|hidden boot menu feature]]: # Requesting the menu to be shown the next boot when "Boot Options" is selected in the Shutdown/Reboot dialog. # Signalling the bootloader that the boot was successful. To replace our downstream patches for 1. we can use the new(ish) systemd DBUS API used by "systemctl reboot --boot-loader-menu=60". This currently only works with sd-boot, but systemd has hooks to allow integration with other bootloaders, see the [https://github.com/systemd/systemd/blob/master/docs/ENVIRONMENT.md SYSTEMD_REBOOT_TO_BOOT_LOADER_MENU env. variable documentation]. So we can support this in grub2 with some relatively simply changes and then replace our downstream patches for this with new patches using the systemd DBUS API for this. Replacing our downstream patches for 2. with an upstreamable bootloader agnostic solution is somewhat involved. systemd has its [https://systemd.io/AUTOMATIC_BOOT_ASSESSMENT/ Automatic Boot Assessment] feature, which is somewhat similar in that it to deals with boot success detection, but its behavior on failure is different (auto fallback to an older kernel) and it is a sd-boot specific feature. Still we can use some parts of this. The boot-complete.target and the concept of having a systemd-bless-boot.service which Requires that target to be reached before it runs. So replacing out downstream patches for 2. will consists of 2 parts: # grub2 changes: Add a grub2-bless-boot.service which Requires boot-complete.target and which does the equivalent of "grub2-set-bootflag boot_success" when that target is reached # GNOME changes: Add a oneshot gnome-wait-for-boot-success.service to boot-complete.target, this will start a simple helper which listens on a unix socket until signalled, thus delaying the completion of boot-complete.target until it is signalled; and in the places where the downstream patches are currently directly calling "grub2-set-bootflag boot_success" signal (write a byte) this unix socket instead. Also see this [https://lists.freedesktop.org/archives/systemd-devel/2020-June/044800.html mailinglist discussion]. == Benefit to Fedora == This change will remove some technical-debt in the form of a couple of quick-and-dirty downstream patches from Fedora and will align GNOME's integration with the [[Changes/HiddenGrubMenu|hidden boot menu feature]] with our upstream first policy. == Scope == * Proposal owners: Create the necessary changes ASAP and submit these to Fedora's [https://github.com/rhboot/grub2/ grub2] and [https://gitlab.gnome.org/GNOME/ GNOME] upstreams. * Other developers: The bootloader team needs to do a new grub2 build with the changes added and the desktop team needs to add the GNOME changes to the GNOME packages. I will coordinate this with both teams. * Release engineering: [https://pagure.io/releng/issue/9557 #9557] (a check of an impact with Release Engineering is needed) * Policies and guidelines: N/A (not needed for this Change) * Trademark approval: N/A (not needed for this Change) == Upgrade/compatibility impact == This change does not impact upgrades, the interface between the OS and grub2 still goes through the same unmodified grubenv settings. The only changes are in how we make the grubenv changes and all parts involved in that will be updated together. == How To Test == # Tests ## 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 ## Login, wait 2 minutes then presss "CTRL + ALT + F6" followed by "CTRL + ALT + DEL" to do a reboot from the text-console without going through the GNOME reboot dialog. The grub menu should NOT show on the new boot. ## Reboot from the GNOME reboot dialog inside gdm. The grub menu should NOT show on the new boot. ## Open the GNOME reboot dialog, then press alt to change the "Reboot" button into "Boot Options" and click the "Boot Options" button (while keeping alt pressed). You should now get the grub menu, with a countdown of 60 seconds. ## 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. # 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 == User Experience == The user experience will be unchanged, the goal of this change is to remove some technical debt and reduce the number of downstream changes Fedora carries. == Dependencies == There are no dependencies outside of the grub2 and GNOME changes. == Contingency Plan == * Contingency mechanism: If this is not ready / complete when we near the beta freeze, then revert to using our downstream patches * Blocks release? No (assuming we do the revert so we do not regress) == Documentation == There are no functional changes, so no documentation changes are necessary. -- Ben Cotton He / Him / His Senior Program Manager, Fedora & CentOS Stream Red Hat TZ=America/Indiana/Indianapolis _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx