[systemd-devel] Adding support for "systemctl reboot --bootmenu" ?

Lennart Poettering lennart at poettering.net
Tue Jun 12 17:17:17 UTC 2018


On Di, 12.06.18 11:51, Hans de Goede (hdegoede at redhat.com) wrote:

> Hi,
> 
> The mention of "systemctl reboot --firmware" in the other thread
> made me realize that it would be good to also have a
> "systemctl reboot --bootmenu".
> 
> First a question about "systemctl reboot --firmware" is this
> available to a normal user (through policykit and the user
> being on a physical attached console) ?

Yes.

> So about "systemctl reboot --bootmenu", the idea here is
> that it would reboot the system into showing $bootloaders
> bootmenu, with the countdown disabled.  This is of course
> intended for systems with the menu hidden or with
> a really short timeout.
> 
> Since how to tell $bootloader to show its menu will be
> bootloader specific I'm thinking about using a special
> target for this, which gets started before doing the
> reboot and then bootloaders can drop a (oneshot) .service
> file in that target which does whatever is necessary to get
> the bootmenu next boot.
> 
> So is this something worth considering?

Adding that makes a ton of sense I guess. I'd probably do some EFI var
based solution in logind itself for implementing this. That said, I'd
be open to also dispatch requests for booting into firmware to user
code using the the execute_directories() concept of systemd. It's how
we do the sleep and shutdown callouts, and I think it would be quite
fitting to reuse the same mechanism for this. That would allow 3rd
party packages to simply drop-in their own binaries that get called
whenever reboot-to-menu is requested (and similar we could add for
reboot-to-firmware).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list