This page shows the basic steps you need to perform, if you for any reason want to switch bootloaders or apply some manual configuration.
rEFInd is an easy to use EFI boot menu that allows booting different operating systems.
Syslinux is the default light-weight bootloader used in Alpine.
GRUB is a standard linux boot loader.
EFI Boot Stub allows booting linux directly from a motherboard supporting UEFI or another bootloader.
For (U)EFI systems, thepackage can provide a graphical EFI boot menu that allows to boot operating systems that are found on the available partitions.
refind is not yet available in the used alpine release, it may be installed in another dual/multi-booted linux distribution.
For example, with a Debian based distribution, it can be installed to the EFI partition like this:
--alldrivers option includes all filesystem drivers instead of only the one needed to load the currently running kernel, to allow finding and booting operating systems from more partitions.)
And a first (default) boot menu line needs to be configured with Alpine's default boot parameters. Assuming the bootable partition is mounted at /media/sdXY it can be done like this (at time of writing):
If you want to switch from another bootloader back to Syslinux, or if you for some reason want to install Syslinux manually, the following steps are required.
If you're using GPT partitions, install the GPT MBR onto the drive you want to install the bootloader on (in this case /dev/sda):
Or if you're using DOS partitions, install the DOS MBR instead:
Next install the required Syslinux binaries. Despite being called
extlinux, Syslinux supports booting from FAT12/16/32, NTFS, ext2/3/4, btrfs, XFS, and UFS/FFS filesystems.
The configuration file is located in /boot/extlinux.conf.
Alpine ships with a script called
update-extlinux which automatically (re)generates this file, for example on updates to Syslinux.
The settings for this script can be found in /etc/update-extlinux.conf, including the option to disable automatic overwriting of /boot/extlinux.conf.
You can also place additional menu entries in the /etc/update-extlinux.d/ directory, e.g. for dual booting.
Assuming /mnt is a FAT32 partition of type EF00 and /boot belongs to the rootfs created after running
You may need to modify /mnt/EFI/syslinux/syslinux.cfg to change the paths to absolute paths (just add a / in front of the vmlinuz/initramfs entries), or copy the files to /mnt/EFI/syslinux instead (XXX: untested).
At the end, the file /mnt/EFI/syslinux/syslinux.cfg should look like this:
And finally, add syslinux to EFI boot menu (assuming /dev/sda is your hard drive)
You can now verify that the boot entry has been added
BootCurrent: 0001 Timeout: 0 seconds BootOrder: 0001,0000,0002,... Boot001* ALPINE-SYSLINUX HD(1,GPT,xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)/FILE(\EFI\syslinux\syslinux.efi)
To install GRUB in BIOS mode, (optionally) remove the Syslinux package and install the required GRUB packages:
For EFI, install GRUB's EFI package instead. Note that /boot has to be an EFI compatible filesystem like FAT32.
Next install the MBR and GRUB binaries to disk for BIOS mode:
For EFI mode:
then add this line to /etc/default/grub:
GRUB ships with an automatic config generator, including some automatic detection of other operating systems installed on the device:
This script can be configured via the /etc/default/grub file. See  for a list of available options.
EFI Boot Stub
To boot directly from your motherboard's UEFI boot menu, a boot entry needs to be created with either a UEFI shell or efibootmgr.
Create a boot entry. It's recommended to do this in a script, as efibootmgr does not allow editing entries.
Where /dev/sdXY contains the EFI partition and /dev/sdXZ contains the root partition. If you are using , replace
edge in the script
Optionally, set the newly created entry as the default:
XXXX is the boot number of the new entry.
Using a UKI (UEFI only)
It is possible to boot directly into a Unified Kernel Image (UKI). A UKI is a single file which contains the initfs, kernel and cmdline. While this is typically done in order to enable SecureBoot, it is perfectly feasible to skip enrolling the custom keys and leave SecureBoot off.
The page UEFI Secure Boot contains the instructions for setting an a UKI. Additionally, it is possible to install the UKI in the default fallback path used by most UEFI implementations. By installing the UKI into this path, the system will automatically boot into it if no other entries are defined. This can be automated as part of the kernel hook by adding the following to /etc/kernel-hooks.d/secureboot.conf
bootx64.efi is only correct for
x86_64 systems. For other architectures the exact name will vary.