REFInd: Difference between revisions
m (1. rEFInd described upstream as a boot manager; minor changes to that effect; 2. Added various template codes; 3. style/grammar amendments) |
m (1. rEFInd described upstream as a boot manager; minor changes to that effect; 2. Added various template codes; 3. Style/grammar amendments) |
||
Line 57: | Line 57: | ||
=== Manual configuration === | === Manual configuration === | ||
There is also a second | There is also a second configuration file, {{Path|refind.conf}}, which is located inside the EFI partition. The configuration file is self-explanatory and has to be manually edited. Please refer to the [https://www.rodsbooks.com/refind/configfile.html rEFInd website] for additional information. | ||
<!-- | <!-- | ||
During Installation a (default) boot menu line can be configured with Alpine's default boot parameters. Assuming the bootable partition is mounted at {{path|/media/sdXY}} it can be done like this (at time of writing): | During Installation a (default) boot menu line can be configured with Alpine's default boot parameters. Assuming the bootable partition is mounted at {{path|/media/sdXY}} it can be done like this (at time of writing): | ||
Line 112: | Line 112: | ||
# PARTUUID not working for alpine | # PARTUUID not working for alpine | ||
} | } | ||
</nowiki> | </nowiki> | ||
}} | }} | ||
Latest revision as of 02:37, 11 September 2025
rEFInd provides a graphical boot menu for UEFI systems that enables a user/administrator to select which operating system to boot from among those that are found on the available partitions. rEFInd is therefore also known as a boot manager.
Installation
As of now, refind is available in the testing repository. It can be safely installed by following the guidelines for enabling the testing repo and for installing such packages with the use of the @testing tag.
The command below installs the Alpine Linux rEFInd package:
# apk add refind@testing
Configuration
rEFInd's refind-install script creates a sample file: /boot/refind_linux.conf.
# refind-install
The steps above should be sufficient for most use cases in order to start using rEFInd as a boot manager.
Consider further another sample /boot/refind_linux.conf; this time, from the rEFInd website, for a system with an ext4 filesystem, as given below:
Contents of /boot/refind_linux.conf
This sample file defines three entries:-
- The first entry uses options derived from the contents of /proc/cmdline when the script was run, unless the script was run from an emergency system, in which case refind-install tries to translate from options in /etc/default/grub.
- The second entry provides the same boot options as the first but adds the code
single
, which causes most distributions to boot into a single-user maintenance mode. - The final entry subtracts most options from the list, leaving only
ro root=rootfs
, whererootfs
is the identified root (/
) filesystem. This option may not be bootable on some systems that need unusual options, but if it does boot, it will normally do so with verbose startup messages, which can be helpful when debugging boot problems.
Given below is another sample /boot/refind_linux.conf file, created automatically by rEFInd for a system with a Btrfs filesystem whose layout is given further below from blkid
output:
Contents of /boot/refind_linux.conf
Output of blkid
from Busybox is given below:
/dev/sda4: LABEL="_SWAP_" UUID="33899521-599f-458e-9bfe-f4b59254eb7c" TYPE="swap" /dev/sda3: LABEL="_SYS0_" UUID="aafbf6b0-7d54-4222-a3dd-a8f45c0ac607" TYPE="btrfs" /dev/sda1: LABEL="_BOOT_" UUID="6771-DB5C" TYPE="vfat"
The single-user mode with minimal options does not work in Alpine Linux for a Btrfs filesystem, as reported by user u/Xerotras.

Proceed to the Manual configuration section only if rebooting did not result in rEFInd appearing as a boot manager.
Manual configuration
There is also a second configuration file, refind.conf, which is located inside the EFI partition. The configuration file is self-explanatory and has to be manually edited. Please refer to the rEFInd website for additional information.
The path in the configuration file needs to be relative to the partition that the kernel resides on. If /boot resides on its own separate partition, then
\boot
needs to be removed from the paths.The instructions below assume an esp partition, mounted as shown:
Contents of /etc/fstab
If your setup is different from the one above, adjust the path in the files below, accordingly.
EFI Mount | Kernel Location | Filesystem Label | loader path |
---|---|---|---|
/boot/efi or /efi | Root filesystem | ROOT |
/boot/vmlinuz-lts |
/boot | EFI partition | BOOT |
/vmlinuz-lts |
For a default Alpine Linux sys mode installation, a sample refind.conf to dual boot Alpine Linux and windows would be:
Contents of /boot/efi/EFI/refind/refind.conf
If one is using a Btrfs filesystem with the /etc/fstab setup above, then the necessary boot entry for Alpine Linux could be as follows:
Contents of /boot/efi/EFI/refind/refind.conf
Troubleshooting
Invalid loader file
starting vmlinux-lts using load options options 'root=UUID=823a3283-30a7-4fef-b50b-8a2230c71b5b rw rootflags=subvol=@alpine rootfstype=btrfs initrd=@alpine\boot\initramfs-lts' Invalid loader file! Error:Not found while loading vmlinuz-lts
If a Btrfs filesystem is used, then the error above is caused by missing drivers. Ensure that driver file btrfs_x64.efi is copied from /usr/share/refind/drivers_x86_64/btrfs_x64.efi into the appropriate folder in the efi partition e.g. /boot/efi/EFI/refind/drivers_x64/ .