[systemd-devel] [PATCH 1/2] systemctl: Add reboot to firmware support

Kai Krakow hurikhan77 at gmail.com
Thu Mar 19 14:37:37 PDT 2015


Jan Janssen <medhefgo at web.de> schrieb:

> Dimitri John Ledkov <dimitri.j.ledkov <at> intel.com> writes:
> 
>> Both gummyboot and grub-efi have a menu option to reboot into
>> firmware, is that not enough? Why do we need to have it from userspace
>> / the booted system?
>> 
> 
> There can be plenty of reasons why the firmware won't provide you with an
> option. One of them being a FastBoot implementation that doesn't
> initialize USB input devices. And also, if one were to directly boot from
> the efi stub without boot loader (and not getting 5000€ in the process).
> 
> But this is primarily a reason of convenience. If your bootloader doesn't
> give you a boot to firmware option, or your bootloader is being annoying
> and boots to your OS faster than you can interface with it, you're
> currently out of luck. I'm not too sure, but grub-efi probably even
> requires you to actually specifically create the entry in the
> configuration; and touching the grub config is just plain annoying.
> Especially if you just want that entry for the one time EFI setup every
> once in a blue moon.

I accidently enabled fastboot somehow - I don't remember how. The outcome 
was that USB legacy support was disabled and thus USB wasn't initialized by 
my firmware (resulting in a very fast boot because the POST screen was only 
there for maybe one second instead of 5). That means: Also grub2 (with EFI 
support) didn't recognize my keyboard because it probably does no USB 
initialization or relies on USB legacy support to read from keyboard. So I 
had no chance to get into EFI or EFI shell (even if such a boot option 
would've been there) which was pretty annoying because my system got stuck 
in a broken initramfs with no way to fix and continue booting because 
essential components were missing. I had USB available there in the 
emergency shell but I didn't know how to boot into the firmware to adjust 
settings like "boot from USB, boot from CD, ... whatever".

So I think a facility like this is really useful. I had to open the case and 
short-circuit the BIOS reset jumper to get back into business. If I still 
had some PS/2 keyboard it had probably worked - but old times are gone and 
so is such type of hardware.

In the end, after fixing that problem, everything was straight forward, 
because I had a bootable backup on USB HDD which is a nightly, snapshotted 
mirror of my system I could just set as rootfs for the kernel. So it was 
easy to work out the initramfs problem, recreate it, reboot, voila. It took 
much much longer to solve this silly USB keyboard problem because at first I 
thought batteries are empty (searching for "working" batteries took a 
while), then thought maybe the USB hub or port was broken (and I tried all 
just to find out that probably not all can be broken at once), until I 
discovered that the port LED on my USB hub didn't lit up for the keyboard 
receiver until the kernel was booted - which was one of those enlightening 
moments.

So yes please, get that in. ;-)

> Also, the fact that there have been people asking questions about how to
> get to the EFI/BIOS has always been there. With this you can just tell
> them to "systemctl --firmware reboot" on any modern computer and be done
> with it.
> 
> Jan
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 
Replies to list only preferred.



More information about the systemd-devel mailing list