UEFI Boot manager rEFInd
If your system has modern UEFI firmware you may wish to install a Boot Manager which can take over (and improve) the work of the Boot Manager built in to the firmware.
Contents
Introduction
rEFInd is a UEFI boot manager which runs when the system first powers up. It scans the EFI System Partition (ESP) looking for bootloaders and displays the results on the screen allowing the user to choose a bootloader to boot the system.
Installation
Installing rEFInd is a two-stage process. First the package needs to be installed using Synaptic (search for refind). This installs the required packages onto the system but does not configure rEFInd to run automatically at boot. To do that you need to open a root terminal and run:
refind-install
This will attempt to find your EFI System Partition, copy the rEFInd files to /boot/EFI/EFI/refind and then create an entry in the firmware Boot Manager for rEFInd and make it the default boot entry so it starts when the system is first powered on. You should peruse the output from the refind-install command in case any errors are reported. A successful run should look something like:
[root@localhost ~]# refind-install ShimSource is none Installing rEFInd on Linux.... ESP was found at /boot/EFI using vfat Installing driver for ext4 (ext4_x64.efi) Copied rEFInd binary files . Copying sample configuration file as refind.conf; edit this file to configure rEFInd. . Creating new NVRAM entry rEFInd is set as the default boot manager. Creating //boot/refind_linux.conf; edit it to adjust kernel options.
There should now be a new entry in the UEFI firmware boot list which you can check by running (as root):
efibootmgr
Notice a new Boot entry has been created for the rEFInd Boot Manager and that BootOrder has been changed to try the rEFInd entry first.
BootCurrent: 0003 Timeout: 1 seconds BootOrder: 0004,0003,0000,0001,0002 Boot0000* Windows Boot Manager Boot0001* CD/DVD Drive Boot0002* Hard Drive Boot0003* pclinuxos Boot0004* rEFInd Boot Manager
Updating
Although Synaptic will update the rEFInd files in /usr/share/refind it will not update files installed on the EFI System Partition. To update those you will need to re-run the refind-install script.
Configuration
The rEFInd configuration refind.conf is located in the same directory as the rEFInd EFI application (usually /boot/EFI/EFI/refind). The default configuration file contains extensive comments explaining all its options, see Configuring the Boot Manager for more detailed explanations.
Passing kernel parameters
In most cases rEFInd will identify the root partition, kernel and kernel parameters automatically. If you wish to adjust the parameters passed to the kernel you can edit the file refind_linux.conf which is placed in the same directory as the kernel (usually /boot).
If you do not specify an initrd= parameter, rEFInd will automatically add it by searching for common RAM disk filenames in the same directory as the kernel. If you need multiple initrd= parameters, you must specify them manually in refind_linux.conf.
- rEFInd only supports detecting one initramfs image per kernel, meaning it will not detect fallback initramfs nor microcode images. They must be specified manually.
Manual boot stanzas
If your kernel is not autodetected, or if you simply want more control over the options for a menu entry, you can manually create boot entries using stanzas in refind.conf. Manual boot stanzas are explained in Creating Manual Boot Stanzas.
Ensure that scanfor includes manual or these entries will not appear in rEFInd's menu. Kernel parameters are set with the options keyword. rEFInd will append the initrd= parameter using the file specified by the initrd keyword in the stanza. If you need additional initrds (e.g. for microcode), you can specify them in options (and the one specified by the initrd keyword will be added to the end).