0

I did have Windows 8 with UEFI BIOS menu. I've since replaced windows with Lubuntu 17.04. I now wish to change distros, however I can no longer access the BIOS menu to change the boot order.

Pressing F1/F8/F12/esc or anything during startup doesn't work with UEFI. I was only able to access it previously from within Windows.

Is there a way I can change the boot order, or have I inadvertently made my laptop a permanent lubuntu device?

  • You haven't specified your notebook type... – Jaroslav Kucera Oct 12 '17 at 18:03
1

systemctl reboot --firmware-setup should do it.

In the event you're not using systemd, things get more complicated though and depends on your boot loader:

  • If you're using GRUB 2 as a bootloader (I think Ubuntu and friends still do), you can get to the firmware setup by hitting 'c' on GRUB's boot menu and using the command fwsetup when it gives you a command prompt.

  • If it's some other boot loader, you may be able to tell the system to reboot into the firmware setup using the efibootmgr command, although this only works on some systems.

  • If all else fails, you can (in theory) directly set the appropriate EFI variable through /sys/firmware/efi/vars, though I'm not sure what the name of the variable is.

  • I've made a script to put that theory into practice: see my answer. – telcoM Mar 26 '18 at 7:40
0

In UEFI, there is a standard method for an operating system to indicate that the user wants to access the firmware setup at the next system reboot. Internally, Windows uses that standard method. As Austin Hemmelgarn said in his answer, this is done using the EFI variables.

A few years ago, I wrote a script to invoke that standard method:

#!/bin/sh
EFIVARFS=/sys/firmware/efi/efivars
EFI_OSINDSUPP=OsIndicationsSupported-8be4df61-93ca-11d2-aa0d-00e098032b8c
EFI_OSIND=OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c

if [ ! -d $EFIVARFS ]
then
    echo "ERROR: no efivarfs present"
    exit 72 # EX_OSFILE
fi

cd $EFIVARFS
if [ ! -f $EFI_OSINDSUPP ]
then
    echo "ERROR: no support for EFI OsIndications"
    exit 72 # EX_OSFILE
fi

FWSUP=$(od -An -t x4 $EFI_OSINDSUPP | cut -c 18)
case $FWSUP in
    [02468ace])
        echo "ERROR: no support for boot-to-fw-ui OsIndication" >&2
        exit 69 # EX_UNAVAILABLE
        ;;
esac
# grab OsIndications header (4 bytes)
EFI_OSINDHDR=$(head -c 4 $EFI_OSIND)

printf '%s\x01\x00\x00\x00\x00\x00\x00\x00' "$EFI_OSINDHDR" > $EFI_OSIND
if [ $? -eq 0 ]
then
    echo "Success. The system will boot to UEFI setup at next reboot."
    exit 0 # EX_OK
else
    echo "FAIL: could not update the OsIndications UEFI variable."
    exit 69 # EX_UNAVAILABLE
fi
0
  • Check if you have OsIndicationsSupported enabled in BIOS, (must have value 1 in data) this is mandatory.

Then do:

  • rm /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c
  • printf '\7\0\0\0' '\1\0\0\0\0\0\0\0' > /sys/firmware/efi/efivars/OsIndications-8be4df61-93ca-11d2-aa0d-00e098032b8c

The first step removes the old OsIndications file. On the 2nd step, the '\1' allows booting into BIOS setup after reboot.

If need be, change efivars permissions with chattr -i /sys/firmware/efi/efivars/*, this wont work for all files since some are read only from UEFI setup.

-1

Was you able to access your setup? If not you might have some bios problem, i saw more than once motherboards that where shipped with a bug, the bug consist of the setup being only accessible thru the OEM SO. For example, if you got a WIN 8 as OEM and you format with another WIN 8 you loose the ability to enter setup cause this new windows fail too to send you to bios, it is a problem with the bios, the solution is flashing another bios in your motherboard, and keep in mind you have to flash a CLEAN ME version not any version.... the way i see it is probably a Intel Management Engine bug... therefore the need for a clean ME version... i never tried just cleaning the me of the bios already in the motherboard but if my hunch is right that too solves the problem... Ah, one last note... the bug was majorly present in some Samsung laptops models, but i saw in some sonny, asus and even lenovo.

  • The Management Engine is not as likely as it being Secure Boot options. The Management Engine bug is related to Meltdown and Specter, and has nothing to do with disabling/enabling boot like Secure Boot does. – Michael Prokopec Feb 7 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.