How would you find your Linux server booted in BIOS mode or UEFI mode? What’s the main difference between BIOS and UEFI? Servers which had shipped prior to the 2011 year have only BIOS firmware installed by default. BIOS is legacy firmware used only on X86 hardware and its 16-bit code. BIOS will take more time for hardware initialization and OS boot. UFEI is not a hardware dependent. EFI or UEFI (which is just EFI 2.x) boots by loading EFI program files (with *.efi filename extensions from /boot) from a partition on the hard disk, known as the EFI System Partition (ESP). These EFI boot loader programs can take advantage of EFI boot services for things like reading files from the hard disk.
UEFI supports a feature called Secure Boot to improve the system security. UEFI is a cross-platform firmware interface that replaces the x86-specific firmware standard named BIOS.
How to find Linux is under BIOS or UEFI mode?
1.Login to the Linux operating system as root user.
2. List the EFI directory contents.
[root@uaweb1 ~]# ls -ld /sys/firmware/efi ls: cannot access /sys/firmware/efi: No such file or directory [root@uaweb1 ~]#
If you get “No such file or directory” error, then the system is using BIOS firmware.
3. To confirm for BIOS firmware, please run the following command.
[root@uaweb1 ~]# ls -lrt /etc/grub2.cfg lrwxrwxrwx. 1 root root 22 May 5 05:06 /etc/grub2.cfg -> ../boot/grub2/grub.cfg [root@uaweb1 ~]#
By looking at the output of step 2 & 3, your system is using BIOS firmware for boot.
4. If the system is using EFI, You should be able to see the directories/files like below.
[root@localhost ~]# ls -ld /boot/efi/EFI/ drwx------. 4 root root 4096 May 29 2018 /boot/efi/EFI/ [root@localhost ~]# ls -lrt /boot/efi/EFI/ total 8 drwx------. 2 root root 4096 May 29 2018 BOOT drwx------. 3 root root 4096 May 29 2018 redhat [root@localhost ~]# cd ^C [root@localhost ~]# ls -lrt /boot/efi/EFI/* /boot/efi/EFI/BOOT: total 1348 -rwx------. 1 root root 77592 May 1 2017 fbx64.efi -rwx------. 1 root root 1301312 May 1 2017 BOOTX64.EFI /boot/efi/EFI/redhat: total 6096 -rwx------. 1 root root 1295152 May 1 2017 shimx64-redhat.efi -rwx------. 1 root root 1301312 May 1 2017 shimx64.efi -rwx------. 1 root root 1301312 May 1 2017 shim.efi -rwx------. 1 root root 1261360 May 1 2017 mmx64.efi -rwx------. 1 root root 182 May 1 2017 BOOTX64.CSV -rwx------. 1 root root 182 May 1 2017 BOOT.CSV -rwx------. 1 root root 1050064 Oct 9 2017 grubx64.efi drwx------. 2 root root 4096 May 29 2018 fonts -rwx------. 1 root root 1024 May 29 2018 grubenv -rwx------. 1 root root 4257 May 29 2018 grub.cfg [root@localhost ~]#
Hope this article is informative to you.
Leave a Reply