You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
kernel-install does not follow the BSP to determine $BOOT #26644
kernel-install add should create boot loader entries in $BOOT, as defined by the Boot Loader Specification.
Unexpected behaviour you saw
kernel-install add searches a static list of directories instead of properly determining where $BOOT is supposed to be and will create the entries in /efi/loader/ even if it does not already exist and there are working entries in /boot/loader/:
BOOT_ROOT_SEARCH="/efi /boot /boot/efi"
...
for pref in $BOOT_ROOT_SEARCH; do
bootctl instead will keep updating /boot/loader/.
Steps to reproduce the problem
I think that this happens because I have a an ESP mounted on /efi and an XBOOTLDR (with GPT UUID BC13C2FF-59E6-4262-A352-B275FD6F7172) mounted on /boot.
Additional program output to the terminal or log subsystem illustrating the issue
I have figured out that kernel-install would use /efi/ because I had a /efi/0eea4445a08017fad49a4ffef6ef8600/ directory: deleting it made it use /boot/.
But later I created /efi/loader/entries/ with one entry to chainload grub, because it is in /efi/, and then it would use /efi/ again. While having two boot loader directories may be unusual it is totally legitimate accordingly to my reading of the BLS.
Short summary: kernel-install should not use a different logic from bootctl (which correctly follows the standard) to select $BOOT.
when there are no 'markers' anywhere (machine-id, etc), then we simply look at mountpoints, preferring /efi/, and the partition GUIDs are ignored - the linked PR fixes this as it seems pretty safe to do, as it affects completely un-configured systems
when there are some markers, we don't fully respect the BLS, and if both XBOOTLDR and ESP are available, but XBOOTLDR is empty and ESP has markers, we use the latter while the BLS says it should use the former - this is trickier as it might change behaviour on existing, configured systems, so I'll leave it alone for now
It is not just that: the ESP is used also if both the XBOOTLDR partition and the ESP have markers. In this case the BLS specifies that the XBOOTLDR partition must be used.
Activity
rfc1036 commentedon Mar 2, 2023
I have figured out that
kernel-installwould use/efi/because I had a/efi/0eea4445a08017fad49a4ffef6ef8600/directory: deleting it made it use/boot/.But later I created
/efi/loader/entries/with one entry to chainload grub, because it is in/efi/, and then it would use/efi/again. While having two boot loader directories may be unusual it is totally legitimate accordingly to my reading of the BLS.Short summary:
kernel-installshould not use a different logic frombootctl(which correctly follows the standard) to select$BOOT.kernel-install: also try to find $BOOT by partition GUID
bluca commentedon Mar 3, 2023
There's two issues here:
rfc1036 commentedon Mar 3, 2023
It is not just that: the ESP is used also if both the XBOOTLDR partition and the ESP have markers. In this case the BLS specifies that the XBOOTLDR partition must be used.
kernel-install: also try to find $BOOT by partition GUID
bluca commentedon Mar 7, 2023
Reopening as only the first issue is solved
poettering commentedon Oct 28, 2026
42551ea should address this. closing.