User Tools

Site Tools


efi

This is an old revision of the document!


(U)EFI support

BIOS has been used to boot PC operating systems for decades. The problem is, BIOS was designed when PC were 16 bit computers – this doesn't work well for today's 64 bit computers. So, more and more machines are switching to a more modern firmware standard – (U)EFI.

E.g. recent IBM xSeries servers run UEFI firmware. They are still able to boot via legacy BIOS mechanisms, but the UEFI booting is recommended and much faster.

Booting via EFI

Requirements:

  • (U)EFI platform (e.g. an IBM xSeries server with recent firmware)
  • EFI bootloader (e.g. GRUB2 built for EFI platform, ELILO or Xen or Linux kernel built as an EFI image)
  • EFI-compatible kernel

EFI platform

If your system does not have an EFI firmware, you may ignore this article.

GUID Partition Table

The boot disk of an EFI system must be partitioned using GUID Partition Table instead of the regular MBR ('DOS disklabel') used by older PCs. The partition table must contain an EFI System Partition to hold the boot loader(s) and, if needed by the boot loader, the operating system image (Linux kernel and the initramfs image). The recommended EFI System Partition size is about 300MB.

EFI boot loader

Not every boot loader is capable of booting from EFI firmware and it is not even necessary to use a dedicated boot loader to start Linux kernel.

The boot loaders with EFI support are: ELILO and GRUB2. ELILO needs the linux kernel and initrd images present on the EFI System Partition. GRUB2 can load them from a Linux file system (/boot partition, or even the root partition on LVM).

Recent Linux kernel can boot directly from EFI with no extra boot loader. See below.

EFI-compatible kernel

Linux kernel

The linux kernel, to be bootable from EFI, needs support for the GUID Partition Table (CONFIG_EFI_PARTITION=y), for the EFI firmware (CONFIG_EFI=y) and for the EFI framebuffer console (CONFIG_FB, CONFIG_FB_EFI, CONFIG_FRAMEBUFFER_CONSOLE). It is a good idea to enable the 'efivars' module (CONFIG_EFI_VARS=m), so the efibootmgr utility will work and it will be possible to edit EFI boot manager settings form Linux.

Linux Kernel >= 3.3 can be build in a form, that is also an EFI bootloader (CONFIG_EFI_STUB=y). Such kernel does not need any external boot loader.

PLD Linux kernels have all those features enabled.

Xen

Xen hypervisor acts as a kernel on its own and will load Linux kernel for the dom0 virtual machine. Xen 4.2.0 includes support for EFI boot. In PLD, the xen-efi package provides Xen hypervisor binary for EFI platforms – it acts as an EFI boot loader, so can be booted directly from the firmware or via chain-loading from other EFI boot loader. See the Xen page for more information.

efibootmgr

efibootmgr utility allows to configure EFI boot manager (the part of EFI firmware selecting and starting the boot loaders) configuration variables from within a Linux system. It requires the 'efivars' kernel module loaded to provide the required interface to the EFI firmware.

The utility can be used to add or remove boot menu entries, to change boot order, or to select specific boot loader for the next boot only. See its manual page for details.

efi-boot-update

efi-boot-update is a PLD own utility to simplify management of EFI boot loaders. The boot loaders need to be copied to the EFI partition (often together with configuration files, the Linux kernel and the initramfs image) to operate and it is inconvenient to do this manually every time any of these changes. efi-boot-update automates it using the rules defined in files stored in its /etc/efi-boot/update.d directory. When enabled in /etc/efi-boot/update.conf, efi-boot-update will be called on each boot loader or kernel upgrade and update the files on the EFI partition.

More information in the efi-boot-update README file

efi.1352031786.txt.gz · Last modified: 2012-11-04 13:23 by jajcus