How to tell if your server is BIOS or UEFI in GNU/Linux - Plenit
How to know if your server is BIOS or UEFI in GNU/Linux
Join us in this article and discover how to know if your server is BIOS or UEFI in GNU/Linux.
When preparing the migration of machines from any source to the Plenit infrastructure, it must be clear whether the server to be migrated is based on UEFI or BIOS.
Knowing this is really important since machines based on UEFI are not supported in the Plenit infrastructure.
In this case, we are going to see how to perform the checks on GNU/Linux systems.
Method 1: Checking for the existence of firmware files
The first way we can find out whether the computer is based on BIOS or UEFI is to check whether the path "/sys/firmware/efi" is present on the system. If the system is UEFI, the path will exist, but that will not be the case if we are dealing with a BIOS-based system.

This, as you can see, is a simple and straightforward way.
Method 2: Using efibootmgr
The second way to test it is by using the "efibootmgr" command. This is a command that allows you to check whether the system is compatible with UEFI and that, if it is compatible, when run, will generate different variables related to UEFI. If it is a BIOS-based system, a message will appear indicating that EFI variables are not supported.
To use it, the first thing will be to check whether it is available. To do so, you must run the "efibootmgr" command, which, if present, will directly show the execution output. If it is not available, it will show a command not found message after which it can be installed.
The installation varies depending on the GNU/Linux system distribution:
On GNU/Linux systems RedHat, CentOS and derivatives you should use the "yum" command:
# yum install efibootmgr
On GNU/Linux systems Debian, Ubuntu and derivatives you should use the "apt" command:
# apt install efibootmgr
Below, you can see an example of installation on CentOS.

Once installed, it can be run by typing the command name directly without modifiers "efibootmgr", which will directly show the execution output.
# efibootmgr
If the system uses UEFI, the associated variable settings will be shown; otherwise, a message will be displayed indicating that UEFI is not used, something similar to this message "EFI variables are not supported on this system".

And what do we do if the server is a machine that uses UEFI? Well, all is not lost; we only need to take an additional step, following the method described in the tutorial How to convert UEFI disks to BIOS on your Windows server.
Conclusions
The query processes described in this article, how to know if your server is BIOS or UEFI in GNU/Linux, allow you to quickly and easily check whether a machine uses UEFI or BIOS.
As you can see, these are somewhat more complicated processes than usual, but they have been described in a guided way through well-defined steps so that the reader has no problems.
Thank you for your trust!
Last updated
Was this helpful?

