Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

I can't access BIOS menu after installing Lubuntu

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?
by

1 Answer

Bharatgxwzm
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.
#!/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

Login / Signup to Answer the Question.