HostOnNet Blog

Check if your Server booted using UEFI

Looking for Linux Server Admin or WordPress Expert? We can help.

To check if your system is using UEFI boot, you can use following method.

Method 1: efibootmgr

On CentOS 7, efibootmgr is provided by package efibootmgr.

This server is using UEFI

[root@server ~]# efibootmgr
BootCurrent: 0005
Timeout: 1 seconds
BootOrder: 0000,0004,0005,0006,0007,0008,0009,0002
Boot0000* grub
Boot0002  UEFI: Built-in EFI Shell
Boot0004* UEFI: Intel(R) I350 Gigabit Network Connection
Boot0005* UEFI: IP4 Intel(R) I350 Gigabit Network Connection
Boot0006* UEFI: IP6 Intel(R) I350 Gigabit Network Connection
Boot0007* UEFI: Intel(R) I350 Gigabit Network Connection
Boot0008* UEFI: IP4 Intel(R) I350 Gigabit Network Connection
Boot0009* UEFI: IP6 Intel(R) I350 Gigabit Network Connection
[root@server ~]# 

Here is a server that is not booted with UEFI

[root@server1 ~]# efibootmgr
EFI variables are not supported on this system.
[root@server1 ~]# 

Method 2: dmesg

Here is a server booted using UEFI

[root@server ~]# dmesg | grep EFI
[    0.000000] efi: EFI v2.40 by American Megatrends
[    0.000000] ACPI: UEFI 00000000798a3080 000042 (v01 SUPERM SMCI--MB 01072009      00000000)
[    0.936744] fb0: EFI VGA frame buffer device
[   12.109532] EFI Variables Facility v0.08 2004-May-17
[root@server ~]# 

Server not using UEFI boot

[root@server1 ~]# dmesg | grep EFI
[    0.000000] ACPI: UEFI 000000006dd52930 00042 (v01                 00000000      00000000)
[root@server1 ~]#

Method 3: Checking grub.cfg

Here is a server that use UEFI

[root@server ~]# cat /boot/grub2/grub.cfg | grep -i efi
if [ -s $prefix/grubenv ]; then
    insmod efi_gop
    insmod efi_uga
  set locale_dir=$prefix/locale
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
	linuxefi /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=908d7686-177e-42b8-856b-501445522a61 ro  
	initrdefi /boot/initramfs-3.10.0-693.2.2.el7.x86_64.img
		linuxefi /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=908d7686-177e-42b8-856b-501445522a61 ro  
		initrdefi /boot/initramfs-3.10.0-693.2.2.el7.x86_64.img
		linuxefi /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64 root=UUID=908d7686-177e-42b8-856b-501445522a61 ro single 
		initrdefi /boot/initramfs-3.10.0-693.2.2.el7.x86_64.img
		linuxefi /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64.debug root=UUID=908d7686-177e-42b8-856b-501445522a61 ro  
		initrdefi /boot/initramfs-3.10.0-693.2.2.el7.x86_64.debug.img
		linuxefi /boot/vmlinuz-3.10.0-693.2.2.el7.x86_64.debug root=UUID=908d7686-177e-42b8-856b-501445522a61 ro single 
		initrdefi /boot/initramfs-3.10.0-693.2.2.el7.x86_64.debug.img
		linuxefi /boot/vmlinuz-0-rescue-1e98a4cc1263468b9f9a12e365316b95 root=UUID=908d7686-177e-42b8-856b-501445522a61 ro  
		initrdefi /boot/initramfs-0-rescue-1e98a4cc1263468b9f9a12e365316b95.img
		linuxefi /boot/vmlinuz-0-rescue-1e98a4cc1263468b9f9a12e365316b95 root=UUID=908d7686-177e-42b8-856b-501445522a61 ro single 
		initrdefi /boot/initramfs-0-rescue-1e98a4cc1263468b9f9a12e365316b95.img
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
[root@server ~]# 

Boot entry will be linuxefi, initrdefi instead of linux16/initrd16

Here is server that is booted with BIOS

[root@server1 ~]# cat /boot/grub2/grub.cfg | grep -i efi
if [ -s $prefix/grubenv ]; then
    insmod efi_gop
    insmod efi_uga
if [ -f ${prefix}/user.cfg ]; then
  source ${prefix}/user.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
[root@server1 ~]# 

Method 4: /boot/efi

Check for mount /boot/efi

[root@server ~]# df -h --local | grep /boot
/dev/nvme0n1p1  510M  3.7M  507M   1% /boot/efi
[root@server ~]# 

If your server use BIOS, you won’t see /boot/efi

Posted in Linux

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.