Talk:Systemd-boot
add link to aur:kernel-install-hook
tldr - kernel-install runs scripts in /usr/lib/kernel/install.d
or /etc/kernel/install.d
. It automatically installs kernel and initramfs in
$BOOT/<MACHINE-ID>/<KERNEL-VERSION>/kernel
and $BOOT/<MACHINE-ID>/<KERNEL-VERSION>/initrd
respectively. It also installs boot entry to
$BOOT/loader/entries/<MACHINE-ID>-<KERNEL-VERSION>.conf
.
The kernel-install-hookAUR automatically runs kernel-install
when needed.
This works well for me for with both dracut and mkinitcpio for initramfs.
Also make sure you only have one initramfs generator installed, otherwise it might generate two initramfs.
ENV25 (talk) 16:00, 21 March 2021 (UTC)
- I wrote a newer pacman hook. AUR: pacman-hook-kernel-installAUR
- ENV25 (talk) 12:56, 20 July 2021 (UTC)
Update systemd-boot#Configuration to use automatic tools bundled with systemd
Systemd bundles the kernel-install tool (as noted by ENV25 above) which makes it very easy to manage multiple kernels among different installs on a single ESP. I propose we rewrite the current configuration section to include this as an automatic method in a subsection, and move the current contents to a subsection as a manual method. The automatic section would include topics like how to mask the default mkinitcpio pacman hook to stop the kernels installing to /boot/vmlinuz
and /boot/initramfs.img
, making/installing1 pacman hooks to move new kernels on install, and how to make an initramfs (since mkinitcpio -P
will no longer work) and patch other scripts that may use mkinitcpio -P
.
1My current intent is to use kernel-install-hookAUR for the automation part because it includes kernel-reconfigure
which makes new initramfs for all kernels on the currently booted install, so users have a drop-in replacement for mkinitcpio -P
If there's any support for or objection to writing this section and moving the current content into a subsection I'd like to hear it.
Lsdaniel (talk) 01:49, 20 July 2021 (UTC)
- So you want to add a section on how to disable defaults, install unsupported packages, and edit scripts, all to make things *easier*? Doesn't make a lot of sense to me.
- Scimmia (talk) 02:30, 20 July 2021 (UTC)
- If all you're going to do is rant, just keep it to yourself. -- Alad (talk) 09:42, 20 July 2021 (UTC)
- Is kernel-install the officially suggested tool (by upstream) for kernel management with systemd-boot? If so, I suppose we can make it the main subsection under "Configuration". In any case, how about we include Lsdaniel's proposed explanations in a subsection following "Adding loaders"? We can always decide on making it the main subsection later on and for now focus on the content. Also, many thanks to Lsdaniel for the kind editorial offer! -- Robg (talk) 12:51, 20 July 2021 (UTC)
- The AUR package is only pacman hook to automatically run kernel-install every kernel upgrade. It can be installed without the package.
- "Editing scripts" is only needed to disable the mkinitcpio pacman hooks that genereate
/boot/initramfs-linux.img
. You do the same when you install dracut. - ENV25 (talk) 13:20, 20 July 2021 (UTC)
- If all you're going to do is rant, just keep it to yourself. -- Alad (talk) 09:42, 20 July 2021 (UTC)
Initial ESP setup description is confusing
The first section has the following: https://wiki.archlinux.org/title/Systemd-boot#Installing_the_EFI_boot_manager "esp will be used throughout this page to denote the ESP mountpoint, e.g. /boot or /efi"
But the important bit about ESPs is only present after systemd-boot is installed and boot entry cofigured: https://wiki.archlinux.org/title/Systemd-boot#Adding_loaders "Note that entries in esp can only use files (e.g. kernels, initramfs, images, etc.) in esp. Similarly, entries in boot can only use files in boot."
I think this note should be a much more prominent _and_ earlier warning, as one could currently easily get the impression that a lone /efi mountpoint is possible without additional configuration, like is the case with GRUB and possibly other bootloaders.
C0rn3j (talk) 12:40, 1 November 2021 (UTC)
- From what I've been reading, it is possible to install systemd-boot without any additional configuration (setting up loader.conf, etc.) if you use something like Unified Kernel Images, or any kernel that follows the UEFI .efi binary executable format. systemd-boot will find these as long as they're in the right place on the esp. They'd need to be signed if Secure Boot is enabled, but systemd-boot doesn't need any extra configuration in the UKI case.
- I plan to use this feature exclusively when I set up my new laptop later this year, with UKI and Secure Boot.
- Ectospasm (talk) 11:34, 26 September 2023 (UTC)
Mount point '/boot' which backs the random seed file is world accessible, which is a security hole
systemd-boot boot loader complains about the regular setup. Should we add a note? any problem telling everyone to have `/boot` being `ro`?
—This unsigned comment is by Gcb (talk) 15:22, 26 December 2023. Please sign your posts with ~~~~!
- This is not a systemd-boot exclusive issue. There is a discussion already in Talk:EFI system partition#Mountpoint umask.
- Hanabishi (talk) 16:47, 26 December 2023 (UTC)
Archiso on ESP - update paths to kernel and initramfs in boot entry
In Archiso on ESP the paths to kernel and initramfs in the boot entry seem to be outdated.
I just tested it in a VM.
After extracting the contents of the arch directory via bsdtar ...
of the current archlinux iso, the paths are:
esp/EFI/archiso/boot/x86_64/vmlinuz-linux
and
esp/EFI/archiso/boot/x86_64/initramfs-linux.img
Boot entry esp/loader/entries/arch-rescue.conf
should now look like:
esp/loader/entries/arch-rescue.conf
title Arch Linux (rescue system) linux /EFI/archiso/boot/x86_64/vmlinuz-linux initrd /EFI/archiso/boot/x86_64/initramfs-linux.img options archisobasedir=/EFI/archiso archisosearchfilename=/EFI/archiso/boot/x86_64/vmlinuz-linux
If this is confirmed, I could change it. Samuel4711 (talk) 13:30, 20 November 2024 (UTC)