User Tools

Site Tools


efi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
efi [2012-11-04 13:23]
jajcus created
efi [2013-10-25 10:09] (current)
glen
Line 9: Line 9:
 Requirements:​ Requirements:​
  
-  * (U)EFI platform (e.g. an IBM xSeries server with recent firmware)+  * (U)EFI platform (e.g. an IBM xSeries server with recent firmware ​or a relatively modern laptop, like Lenovo B590)
   * A disk with [[GUID Partition Table]]   * A disk with [[GUID Partition Table]]
   * EFI bootloader (e.g. GRUB2 built for EFI platform, ELILO or Xen or Linux kernel built as an EFI image)   * EFI bootloader (e.g. GRUB2 built for EFI platform, ELILO or Xen or Linux kernel built as an EFI image)
Line 27: Line 27:
 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. 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).+The boot loaders with EFI support are: **ELILO** and **GRUB2**.
  
-Recent Linux kernel can boot directly from EFI with no extra boot loader. See below.+=== No bootloader === 
 + 
 +Recent Linux kernel ​(since 3.3) can boot directly from EFI with no extra boot loader. Also Xen hypervisor can be booted this way (in fact Xen may misbehave if booted under EFI other way). See below
 + 
 +=== ELILO === 
 + 
 +ELILO needs the linux kernel and initrd images present on the EFI System Partition. Specific paths and other options can be 
 +configured in the '​elilo.conf'​ file placed in the same directory of the EFI System Partition where ''​elilo.efi''​ is placed. 
 + 
 +''​elilo.efi''​ is provided by the **elilo** package, and is installed in the ''/​lib/​efi/​x64''​ (64-bit) or the ''/​lib/​efi/​ia32''​ (32-bit) directory. It must be copied to the EFI System Partition, together with the ''​elilo.conf''​ file (available in ''/​etc/​efi-boot''​),​ the Linux kernel and initramfs images. [[#​efi-boot-update]] can take care of that. 
 + 
 +ELILO can also be used for network (PXE) boot from the EFI firmware. 
 + 
 +=== GRUB2 === 
 + 
 +GRUB2 can load the kernel and initramfs file or any other image to boot from a Linux file system (/boot partition, or even the root partition on LVM). The GRUB core image is installed at the EFI system partition by the ''​grub-install''​ command and additional GRUB modules are read from the /boot file system when necessary 
 + 
 +To install GRUB2 bootloader for (U)EFI booting: 
 + 
 +  * install the **grub2** and **grub2-platform-efi** and **efibootmgr** packages. Most probably the x86_64 version of  **grub2-platform-efi** package will be needed, as most modern EFI firmwares run 64-bit. 
 +  * make sure your EFI system partition is mounted at /boot/efi 
 +  * issue ''​%%grub-install --target=x86_64-efi%%''​ 
 + 
 +If the ''​Couldn'​t open either sysfs or procfs directories for accessing EFI variables.''​ message is displayed, that means **efibootmgr** was not able to update boot manager configuration. It such case it may be necessary to use the EFI firmware configuration interface (equivalent of 'BIOS setup'​) to set up booting for ''​\grubx64.efi''​ or to copy ''/​boot/​efi/​EFI/​grub/​grubx64.efi''​ to ''/​boot/​efi/​EFI/​BOOT/​BOOTX64.EFI''​ file, to make it the default boot loader for the device. 
 + 
 +GRUB can also be used for network booting, but version 2.00-1 times out on large initramfs images (this makes PLD Rescue boot impossible). 
 + 
 +=== The default bootloader location === 
 + 
 +Normally the EFI firmware holds a list of configured boot loaders, can present them as a list of boot options or try them automatically in a pre-defined order. This can be managed from Linux using the [[#​efibootmgr]] utility.  
 + 
 +Unfortunately,​ this interface may not be available. In such case there is another way to boot using a chosen boot loader – the firmware should automatically run the ''​\EFI\BOOT\BOOTX64.EFI''​ (''/​boot/​efi/​EFI/​BOOT/​BOOTX64.EFI''​ in Linux, or ''​BOOTIA32.EFI'',​ etc., depending on the platform). Any EFI application can be installed under that name to be effectively the default loader for this device.
  
 ==== EFI-compatible kernel ==== ==== EFI-compatible kernel ====
Line 40: Line 71:
  
 PLD Linux kernels have all those features enabled. PLD Linux kernels have all those features enabled.
 +
 +== Configuring standard PLD kernel boot ==
 +
 +To set up kernel boot via EFI with no other boot loader:
 +
 +  * install your kernel and make sure you have a valid ''/​boot/​initrd''​ for it
 +  * install [[#​efi-boot-update]]
 +  * update /​etc/​efi-boot/​update.d/​kernel.conf so it contains proper '​root='​ directive in $ARGS (required for Dracut-generated initrd)
 +  * run [[#​efi-boot-update]] (note, this will only work if already running via EFI)
  
 === Xen === === Xen ===
Line 56: Line 96:
  
 More information in the [[http://​git.pld-linux.org/​gitweb.cgi?​p=packages/​efi-boot-update.git;​a=blob_plain;​f=README;​h=19d147dad2c3b711608203a297672e5533764c42;​hb=HEAD|efi-boot-update README file]] More information in the [[http://​git.pld-linux.org/​gitweb.cgi?​p=packages/​efi-boot-update.git;​a=blob_plain;​f=README;​h=19d147dad2c3b711608203a297672e5533764c42;​hb=HEAD|efi-boot-update README file]]
 +
 +===== efi-shell =====
 +
 +Instead of loading a boot loader and starting the operating system one may wish to enter the EFI shell. The EFI shell is often not 
 +included in the system firmware and must be installed separately. For convenience,​ PLD Linux provides the **efi-shell-{ia32,​x64}** packages with pre-compiled EFI shell executables. These can be installed like a regular boot-loader – manually or with [[#​efi-boot-update]]
 +
  
efi.1352031786.txt.gz · Last modified: 2012-11-04 13:23 by jajcus