systemd-boot-friend is a software which helps you to use
systemd-boot.
NOTICE: If you have installed systemd-boot-friend,
it will automatically install all existing kernels on the current operating
system (systemd-boot does support detecting other EFI boot entries
installed on the same EFI system partition, please visit
systemd-boot
for further information) and generate entries for you once the kernel is
upgraded or modified.
Initialize§
In order to use systemd-boot-friend, you have two options:
- Automatically initialize
systemd-bootand install the newest kernel viasbf init - Manually install and set-up
systemd-bootyourself, then utilizesystemd-boot-friendjust to update the kernels.
For the automatic method, simply mount your ESP partition to /efi and run
sbf init. If everything goes well, you should have a working
systemd-boot installation.
For the manual method, you can take a look at
systemd-boot - ArchWiki,
which describes how to set up systemd-boot by yourself. Then after you have
decided on where to mount your ESP partition, you can fill in the mountpoint
at /etc/systemd-boot-friend.conf and create the
$ESP_MOUNTPOINT/EFI/systemd-boot-friend/ folder, and then you are good to go.
Usage§
systemd-boot-friend has several subcommands. The executable's name is sbf.
init Initialize systemd-boot-friend
update Install all kernels and update boot entries
install-kernel Install the kernel specified
remove-kernel Remove the kernel specified
list-available List all available kernels
list-installed List all installed kernels
config Configure systemd-boot
set-default Set the default kernel
set-timeout Set the boot menu timeout
-
initInitializes systemd-boot, and asks if you would like to install all available kernels and generate corresponding boot entries. -
updateRemoves all installed kernels, reinstalls all available kernels and re-generates the corresponding boot entries. -
install-kernelInstalls a specific kernel or choose a kernel if no argument is given. The argument can either be the number corresponding to the kernel insystemd-boot-friend listor the kernel's name (e.g.5.12.0-aosc-main). -
remove-kernelSimilar toinstall. Removes a specific kernel or choose a kernel if no argument is given. The argument can either be the number corresponding to the kernel insystemd-boot-friend list-installedor the kernel's name (e.g.5.12.0-aosc-main). -
list-availableLists all available kernels. -
list-installedLists all kernels installed (from the current OS) in systemd-boot. -
configConfigure the systemd-boot loader with an friendly interactive interface, you can also manually configure it by editing$ESP/loader/loader.conf. -
set-defaultSet the default kernel for systemd-boot to boot from. -
set-timeoutSet the timeout of the systemd-boot boot menu.
Configuration§
/etc/systemd-boot-friend.conf is systemd-boot-friend's configuration file.
-
VMLINUXvmlinux filename format, you can find the filename at /boot usually. The format is
vmlinuz-{VERSION}by default, this is for filenames likevmlinuz-5.12.0-aosc-mainorvmlinuz-5.12.0-200.fc34.x86_64. -
INITRDSimilar to
VMLINUZ, this is initrd filename format. The format isinitramfs-{VERSION}.imgby default, this is for filenames likeinitramfs-5.12.0-aosc-main.imgorinitramfs-5.12.0-200.fc34.x86_64. For Debian users, modify it toinitrd.img-{VERSION}. -
DISTRODistribution name, this is used in boot entry titles. Default value is
AOSC OS. -
ESP_MOUNTPOINTESP mountpoint, modify it to your mountpoint before using
systemd-boot-friend. Default value is/efi. -
BOOTARGThis is the kernel parameters used in boot process. In a boot entry file, this is filled after
optionskey. Usually, you have to specify the root partition and make it rw here. For exampleroot=/dev/sda2 rw. See https://systemd.io/BOOT_LOADER_SPECIFICATION/ and https://wiki.archlinux.org/title/systemd-boot#Adding_loaders for further information.
Technical details§
systemd-boot-friend will install kernels to /EFI/systemd-boot-friend/
directory in your ESP partition, and generate boot entries named
$VERSION-$LOCALVERSION.conf (e.g. 5.12.0-aosc-main.conf or
5.12.0-200.fc34.x86_64.conf).