# Linux on UEFI - how to reboot to the UEFI setup screen like Windows 8 can?

makeuseof.com explains that Windows 8 certified hardware has a new way to enter the UEFI setup screen (equivalent to BIOS). From How To Access The BIOS On A Windows 8 Computer:

No longer do we press a certain key during the boot process to reveal the BIOS – instead, an option to access the BIOS is located in Windows 8’s boot options menu... If you’re just here to access your computer’s UEFI BIOS, click the Troubleshoot tile.

The main developer of Secure Boot for Linux says that alternative OS's can't assume the old way will continue to work. So does Linux also have a new way to enter UEFI setup?

I have an ASUS motherboard. It suggests that an upgraded version of the firmware contains a fast boot option. The flip side is that the option might make it even harder to "reveal the BIOS" than it already is.

I don't mind tinkering. Just if this is known to be a bad idea, I don't want to go through the risk of a firmware upgrade for nothing (and maybe have to pop the case off, reset the settings and have to set them all up again).

Alternatively, how is this handled for Windows 7 users? If they optimistically select the fast boot option, how do they get access to the "BIOS" setup again when they need it?

• Damn it. Now I wish I wouldn't have chosen Asus over Gigabyte for my new upgrade – kluka Dec 15 '12 at 13:12
• Use whatever settings work for Windows 7, which will be the defaults, and it'll be fine :). There must be a standard way to do it in UEFI, I just haven't found it called out anywhere. Even the original firmware with no fast boot option at all is pretty snappy, so I don't regret it. We're looking at a UEFI-specific feature; I wouldn't rely on Gigabyte to get EFI right yet. I am working around issues with 1) USB3 ports and 2) a USB keyboard, which put together is a bit disappointing in principle. OTOH the memory test LED was useful to me when my new RAM failed after a week. – sourcejedi Dec 15 '12 at 16:10
• One of the problems with UEFI is that, despite a 2,000-page specification document, there's NO standardization of user interface issues. Firmware developers are free to give users access to their setup utilities in any way they deem desirable. – Rod Smith Dec 15 '12 at 19:09
• The article says that Windows 8 finally gives users access to the usual setup utility in a standard way. So windows certification must specify a method to support this. Hopefully it's part of UEFI, not an undocumented MS extension. Note that this is NOT a question about "Secure Boot". The question assumes I've already managed to install and boot Linux. – sourcejedi Dec 16 '12 at 14:59
• I am personally running Windows 8 on my ASRock Z77 Pro3 motherbord, just recently implementing this "Ultra fast boot" option in the UEFI setup. I am provided a utility by ASRock that sits in my traybar, which I can press to access UEFI setup. A CMOS clear will reset the fast boot option, so you can always give it a try. My vBIOS doesn't allow for this setting, because it doesn't have GOP support, so I haven't had a chance to try it out. I ain't provided with similar software for Linux, only Windows 8. – Steen Schütt Dec 17 '12 at 15:20

On modern Linux distributions using systemd, you can go straight to the Firmware setup menu using:

systemctl reboot --firmware-setup

• Hah, that doc is a bit terse. Looks good - it's not specific to a given boot manager. Shame there isn't a standalone tool, but I've nothing against systemd. github.com/systemd/systemd/blob/… – sourcejedi Jun 1 '16 at 19:54
• See also this Unix.SE answer. Be very careful with using efivar, I somehow managed to remove the 8be4df61-93ca-11d2-aa0d-00e098032b8c-OsIndications variable, possibly by passing empty data to the efivar program. Now I have to find a way to recreate this file, without it the systemctl reboot --firmware-setup program does not work anymore. – Lekensteyn Jun 2 '16 at 10:13
• Sorry to hear your troubles. I got the impression setting that variable to 0 would be fine (from this comment github.com/systemd/systemd/blob/…), although the same code suggests that systemd wouldn't care if the variable was deleted. – sourcejedi Jun 2 '16 at 10:38
• This seems to re-create the variable, but somehow it is lost after a reboot: printf '\7\0\0\0''\0\0\0\0\0\0\0\0' > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c (based on firmware.intel.com/blog/accessing-uefi-variables-linux and the previous contents which I dumped). Note that rm ... needs chattr -i ... before you can remove it (safety measure about rm -rf /). – Lekensteyn Jun 2 '16 at 10:44
• @sourcejedi Arch Linux ships with systemd 230. I finally managed to get my variable back. For some reason creating the variable via efivars resulted in OsIndications-89efde67-ffcd-12de-ab01-01efff012389 which has a different GUID. Once I booted into UEFI Shell, I invoked the command setvar OsIndications -nv -bs -rt =0000000000000000 to set the OsIndications variable in non-volatile storage for bootservice and runtime access to the hexadecimal sequence representing a 64-bit number (0). – Lekensteyn Jun 4 '16 at 8:59

I'm not sure how exactly Windows 8 does this, but I can guess that it takes advantage of UEFI variables used for boot options.

You can use efibootmgr to determine the meanings of the various boot variables. On my system, Boot0000 is Setup, so using efibootmgr -n 0 should cause the system to boot into setup on the next boot.

• Thanks. I've now tried UEFI boot on my current BIOS. Boot0000 seems to be occupied by one of the normal boot entries. (I've also realized I misread the release notes, and there's no reason to expect the newer version to be faster. Oh well :). – sourcejedi Jan 13 '13 at 10:47
• @sourcejedi The firmware its fast boot option might actually boot faster 1 or 2 seconds, ultra fast boot again might shave of another 1 to 2 seconds: unix.stackexchange.com/questions/149761/… – Pro Backup Aug 24 '14 at 23:48

I've written a small tool to do this without systemd, https://github.com/adoakley/efi-boot-to-fw-ui.

• Welcome to Super User! Please quote the essential parts of the answer from the reference link(s), as the answer can become invalid if the linked page(s) change. – DavidPostill May 2 '20 at 18:33

I have tried EFI booting with Ubuntu 12.04, and found an answer to my own question.

(I haven't upgraded my firmware. I misread the release notes originally - it probably wouldn't be any faster).

### Entering firmware setup from the grub-efi boot menu

efibootmgr doesn't seem to support rebooting to firmware setup for me. But grub-efi does. It's able to create an entry for firmware setup in the GRUB boot menu.

You can enter the GRUB boot menu by holding down the shift key "early in the boot process". I press it down immediately after the NumLock light turned on on the keyboard, and that works for me.

If you're curious, I looked at the command as well: it's "fwsetup". I.e. you can enter the GRUB menu, follow the on-screen instructions to switch to the command line, then type "fwsetup" and hit return.

If you do an EFI install from scratch, I believe the menu item will be created automatically. I didn't install as EFI, which meant I had to kick it (see below, step 4).

### Converting from BIOS-GPT boot to UEFI-GPT boot without burning an EFI boot CD?

EDIT: this section may work on some systems. However I now believe it relies on extra behaviour which is not part of the UEFI standard. Some day I'll figure out what's happening here.

I was converting an existing install to EFI, without an EFI-enabled boot CD. Some people think this isn't possible. Admittedly, there are a couple of confusing warning messages. I had a look at what was going on. If you can currently enter the firmware setup, then it's not all that bad.

The hard part is you're probably still using an MBR partition table, and you almost certainly need to convert it to GPT. I'm not going to cover conversion from MBR to GPT. Partitioning is always a bit dangerous. gdisk can convert, but there are quite a few fiddly bits. I haven't listed them all here. But for one, you probably need to shrink the last partition, to make space for the end-of-disk GPT. You can't do that if the partition is mounted, so you'll want to use a boot CD. (I also staged the conversion, making sure I could boot from BIOS-GPT before I tried UEFI-GPT, which involved having to create yet another type of boot partition.).

Assuming you've got GPT set up:

1. Install grub-efi. This removed grub-pc, and stopped it from working. (grub-efi actually still worked after I removed it!). Fedora seems a bit different; I've only tried this on Ubuntu. During the install, you will see errors about not being able to access EFI variables, which is because you didn't boot by EFI.
2. Shutdown.
3. Power on. Make sure you boot through EFI! This is the system-dependent and worrying part. My system happened to default to MBR boot to start with, so I saw a scary error from GRUB - but it was from the old grub-pc. On my system, it was easy to enter the firmware setup screen at this point (see below), and change the boot priority to "ubuntu" (which was the entry for booting my OS via EFI).
4. Now you can redo the grub installation (grub-install, or grub2-install on Fedora), and it won't show any errors. And now, running update-grub (or grub2-mkconfig -o /boot/grub/grub.cfg, on Fedora) will create the menu item for entering firmware setup.

### Entering the firmware setup/boot menu on my ASUS system

DISCLAIMER: this is not the very latest firmware/board. Your ASUS system may act differently from mine.

My current ASUS firmware notices when the "boot configuration" has changed - e.g. when I installed grub-efi. There's text saying that it's changed if you look at the initial "EZ setup" screen. And, when it detects such a change, it makes it easier to enter the setup screen. What it does is it shows the splash screen with "press DEL to enter setup" for a few seconds. (If you've enabled the "fast boot" option, it normally skips the splash screen).

I think it's also possible to trigger the splash screen by you powering off the system and unplugging it for a minute or so, before rebooting.

On my current firmware, I can enter the firmware setup by blitzing the DEL key during boot, even without the splash screen. However, this is conditional on enabling keyboard support in the firmware.

It's possible to switch the firmware not to probe for keyboards during boot, which is supposed to speed things up. I guess this is the next experiment to try, now I'm more confident about this EFI stuff! (It's plausible it could kill keyboard support in the GRUB boot menu as well. But I should still be able to use grub-set-default, so that GRUB boots the fwsetup entry, and recover that way).

/usr/share/applications/uefi-reboot.desktop
[Desktop Entry]