I was searching, but didn't find an obvious way to know if GRUB is using UEFI in the system boot, or the BIOS compatibility mode, or a full fledged BIOS. I found only Windows methods. Is there something in GRUB or the Kernel boot logs that shows if I'm using UEFI, EFI or BIOS?
If you've booted using the UEFI firmware as opposed to using BIOS firmware then your system should make the EFI NVRAM variables available in:
When booting using a BIOS (or the BIOS emulation mode of UEFI firmware) then these variables aren't available.
In fact, as @Santropedro pointed out, the path
is missing when booting using a BIOS, which is easier to check.
Ok, I booted up my UEFI box to check. First clue, near the top of
dmesg. This shouldn't appear if you're booted via BIOS:
[ 0.000000] efi: EFI v2.31 by American Megatrends [ 0.000000] efi: ACPI=0xd8769000 ACPI 2.0=0xd8769000 SMBIOS=0xd96d4a98 [ 0.000000] efi: mem00: type=6, attr=0x800000000000000f, range=[0x0000000000000000-0x0000000000001000) (0MB) ⋮
$ sudo efibootmgr BootCurrent: 0000 Timeout: 0 seconds BootOrder: 0000 Boot0000* debian
If you are not, then the following should appear:
$ sudo efibootmgr EFI variables are not supported on this system.
Note that you'll have to have the efibootmgr package installed. You can also attempt to list the EFI variables:
$ efivar -l ... over 100 lines of output ...
Check if you have a
$ df -h --local | grep /boot /dev/sda2 229M 31M 187M 14% /boot /dev/sda1 120M 250K 119M 1% /boot/efi
Inside that partition should be the files that UEFI executes to boot.
If using any of these methods the relevant entries doesn't appear, is very likely you are not using UEFI.