REFInd/en

rEFInd is Article description::a boot manager for EFI and UEFI platforms forked from and successor to rEFIt. It provides a graphical interface for launching EFI-based operating systems and accessing EFI-based utilities.

Kernel
EFI framebuffer support ( CONFIG_FB_EFI ) or a vendor specific Framebuffer is required to display video when launching the kernel from an EFI such as rEFInd:

USE flags
rEFInd has optional support for scanning several filesystems for EFI executables before loading the operating system. This allows to keep the kernels outside of the EFI System Partition (ESP) but needs the rEFInd built with the respective USE flags enabled.

ESP Installation
Once the rEFInd package has been emerged, a second step is needed to install the binaries to the ESP. If an ESP does not exist, one needs to be created. See EFI System Partition.

File system layout
For kernel storage there are multiple options.

During boot, rEFInd can automatically find EFI boot images and Linux kernels. It looks for files ending in or beginning with,  or. On the filesystems it can read (based on above USE flags), it scans in the following locations:


 * File system root.
 * directory.
 * Most of the subdirectories of . (See example in the Kernel image at ESP section).

Boot partition configuration is quite flexible. For example, choose one of:


 * Seperate boot, ESP and root partitions
 * Seperate ESP partition with part of the root filesystem. (Provided it is a non-encrypted, non-LVM and one of the above supported filesystems).
 * Only ESP partition, with kernels living in . This will require some additional steps when installing the kernel.

Installation with NVRAM modification
The rEFInd package comes with the command. Running it will:


 * 1) Looks if the ESP is already mounted. If not, automount the ESP according to EFI_System_Partition
 * 2) Install its  application and other stuff into the ESP
 * 3) Call efibootmgr to set itself as the default boot manager.

Boot000x* can vary depending on existing entries.

Installation to the EFI Default/Fallback path
rEFInd can be installed to a disk using the default/fallback filename of. The computer's NVRAM entries will not be modified when installing in this way. Most EFI and UEFI firmware support a fallback EFI image to boot from if the configured EFI file cannot be found, and some will also override the configured boot selection if the fallback boot image is found. This can be used to boot into EFI mode when doing so otherwise is difficult.

Where is the ESP. This installation method can be used as either a permanent setup to create a bootable USB flash drive or install rEFInd on a computer that tends to "forget" its NVRAM settings or as a temporary bootstrap to get the system to boot in EFI mode.

Kernel management
Regardless if is a separate partition or part of the root file system, rEFInd should be able to find a kernel if standard naming convention is used. This makes it compatible with (semi-) automatic kernel installation methods such as or  without further configuration.

Initial RAM filesystem
At boot, rEFInd looks for an initial RAM disk that starts with and ends in a kernel version string. For example matches with. Provided that does not specify an, it is automatically appended to the kernel command line.

When using tools like Genkernel or Dracut, no additional configuration is required. However, if a Custom Initramfs is used some care is required. Either, the initramfs should be named using the same convention, or its name should be specified in.

Kernel image at ESP (Optional)
It is possible to store the kernels and initial RAM disks on the ESP, instead of. In order to play nice with icon assertion, the kernel must be stored in.

Moving of the kernel:

Kernels and initramfs go into their EFI subdirectory:

Linux command line options
should live in the same directory as the kernels. It is automatically generated in during  or with. Each entry will show up as an option for each kernel.

The default entry is based on the current. Single is the same as default, but with added. And is contains only the current root device, with the  argument. None of the entries contain the initramfs, as it is established automatically at boot.

This file ussualy works out of the box when it is generated from the same boot session as it is supposed to start. For instance, when replacing the bootloader for rEFInd. However, when generated from another OS, for instance during installation of Gentoo, care must be taken and the entries must be corrected manually.

Simple example configuration:

Custom (static) initramfs and microcode loading:

The main selection screen for rEFInd will use the first option as the default option, however alternate boot entries can be accessed by highlighting the kernel and pressing. Also cmdline can be modified on-the-fly by pressing on a menu item to open it in an editor. When ready, press to boot the kernel.

Icons
rEFInd comes with a collection of icons for different Linux distributions. In order to set an icon on the menu entry, it needs to know the OS name. For that it looks in the following places, in this order:


 * 1) An icon base name matches the kernel base name. For instance
 * 2) The kernel is in an ESP sub-directory, named after the OS. For instance the kernel is at  See "Kernel image at ESP" for more info.
 * 3) Filesystem label contains a space, underscore or dash delimited OS name. For instance with.
 * 4) GPT partition name, folowing the same convention as filesystem labels.
 * 5) From the  file on the same partition. For instance, when  is part of the root partition.
 * 6) Hard coded rules based on words kernel names. For instance,  and  default to the Linux "Tux" icon.

External resources

 * rEFInd SourceForge repository
 * Upstream installation instructions
 * Kernel parameters - explained on wiki.archlinux.org
 * SystemRescue CD