[systemd-devel] [PATCH v2] Add reboot to EFI support

Lennart Poettering lennart at poettering.net
Thu Apr 2 02:34:50 PDT 2015


On Thu, 26.03.15 16:09, Jan Janssen (medhefgo at web.de) wrote:

Heya,

Hmm, so we already support passing special reboot() parameters, and
this is done by manipulating a file in /run, without introducing any
new targets. To me it appears that boot-into-firmware-setup is
something hat should be handled the same way, i.e. as a special
parameter for the *normal* poweroff path, instead of introducing a new
poweroff path for it. Of course, instead of manipulating /run for this
we should directly manipulate the respective EFI variable.

I hence think this should be a new switch --firmware-setup or so to
systemctl. Of course, that sounds awfully specific and I don't really
like too much adding a new switch just for this flag, but it's the
least best option I see.

The existing boot argument is passed as-is to the kernel, hence
giving the argument "efi" a special meaning would mean once couldn't
pass that parameter anymore to the kernel.

I would strongly prefer naming the switch something like "firmware"
instead of "EFI", since we shouldn't encode the technology here, but
the generic term. Also, this should mention that this is about the
setup tool of the firmware, since EFI is available all the time, and
this is really about the *setup* tool of the firmware...

I think ultimately we need to expose this even in GNOME, similar to
the way Window exposes this. To cover that we should probably add a
bus API to logind in some form to manipulate the EFI var in question,
and "systemctl reboot --firmware-setup" would use that. (And yes, a
similar bus API for specifying the generic reboot parameter probably
should exist alongside it).

Of course the bus API should also support a CanFirmwareSetup() call or
so, that reports whether the logic is available at all.

Does this make sense?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list