Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My inspiration for asking this is this other question on Ask Ubuntu.

One reason I am asking is that I am just curious. I would like to know more about this for whatever value it might have in the future.

But I would also like to know so that I have a procedure I can ask a user to perform when I am wondering WTF might be up with them and their system. ;-)

Initially I wondered if this information might be detected and reported by a tool such as (or similar to) dmidecode. But what would happen when a UEFI BIOS is simulating a pre-UEFI BIOS?

I expect this question will only become more interesting as time passes. It appears that the companies behind each of the major operating systems will insist on implementing EFI support by doing "the same thing only different". <sigh/>

share|improve this question

2 Answers 2

up vote 3 down vote accepted

A system can have a UEFI firmware and still boot OS in legacy BIOS mode. In that situation there is no way for the booted OS to determine if the hardware is actually capable of UEFI, because BIOS isn't forward compatible with UEFI.

You can still look at firmware interface if anything is related to UEFI, but that is vendor specific and inconsistent. So there is also no definite answer from that side.

The canonical method to prove your x86(_64) kernel is booted from UEFI:

    $ dmesg | grep 'EFI v'
    [    0.000000] efi: EFI v2.31 by EDK II

The kernel will print such message at the main entry point of EFI boot. The kernel is booted with UEFI if and only if such message exists.

Other informative stuff:

    $ dmesg | grep 'efi: mem'
    [    0.000000] efi: mem00: type=7, attr=0xf, range=[0x0000000000000000-0x00000000000a0000) (0MB)
    ...

This is the memory map passed from EFI firmware to the kernel.

    $ ls -F /sys/firmware/efi
    efivars/  systab  vars/

These are kernel ABI's related to EFI. efivars (3.8+) and vars are kernel ABI to the EFI NVRAM so you can change boot options with them.

But lack of these clues does not prove the system is BIOS only.

Empirically, recent laptops all have UEFI firmware. Latest servers are migrating to UEFI firmware.

Edit: The author of rEFInd has a more thorough explanation. Steps are the same.

Also, Firmware Test Suite from Ubuntu might detect whether your UEFI firmware has a compatibility feature for legacy BIOS. Although it doesn't solve the problem of detecting UEFI capable firmware booting in BIOS mode.

share|improve this answer

When you go into the "BIOS" (EFI actually) one of the items in the list of bootable items should be the EFI boot prompt, if it's a UEFI system. This is sometimes called the EFI shell. It's much like an emaciated version of a Unix command prompt. Normally you won't want it in the boot list but it can be useful during initial setup and during troubleshooting.

I suppose a UEFI system could be made without that feature, but you'd be giving up a lot of what makes EFI, well, EFI to do so.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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