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
Installing with --bootloader systemd using an image without systemd-boot should fail #2486
Some AI-guided debugging suggests what's happening is because of the environment we're invoking bootctl in during the install path, it detects that we're in a chroot and falls back automatically to graceful mode:
--graceful
Ignore failure when the EFI System Partition cannot be found, when EFI variables cannot be written, or a different or newer boot loader is already installed. Currently only applies to is-installed, update, random-seed and install verbs. Since
version v258, it is implicitly enabled when running inside a chroot.
Added in version 244.
And then mocking up roughly what's going on for a reproducer:
$ podman run --rm --privileged \
--env SYSTEMD_LOG_LEVEL=debug \
--env SYSTEMD_RELAX_ESP_CHECKS=1 \
--env SYSTEMD_IN_CHROOT=1 \
quay.io/fedora/fedora-bootc:44 \
bash -c '
mkdir -p /tmp/composefs-root
mount --bind / /tmp/composefs-root
mount -t tmpfs tmpfs /tmp/composefs-root/boot
mount -t tmpfs tmpfs /tmp/composefs-root/tmp
echo "=== bootctl install output ==="
bootctl install --root /tmp/composefs-root --esp-path /boot --no-variables 2>&1
echo "EXIT: $?"
echo ""
echo "=== Check what was installed on ESP ==="
find /tmp/composefs-root/boot -type f
' 2>&1
=== bootctl install output ===
Running in a chroot, enabling --graceful.
Found container virtualization podman.
Using EFI System Partition at /tmp/composefs-root/boot.
Using XBOOTLDR partition at /tmp/composefs-root/boot as $BOOT.
layout=ostree is specified in config.
Using entry token: fedora
Created "/tmp/composefs-root/boot/EFI".
Created "/tmp/composefs-root/boot/EFI/systemd".
Created "/tmp/composefs-root/boot/EFI/BOOT".
Created "/tmp/composefs-root/boot/loader".
Created "/tmp/composefs-root/boot/loader/keys".
Created "/tmp/composefs-root/boot/loader/entries".
Created "/tmp/composefs-root/boot/EFI/Linux".
Source directory does not exist, ignoring.
Mount point '/tmp/composefs-root/boot' which backs the random seed file is world accessible, which is a security hole!
Random seed file /tmp/composefs-root/boot/loader/random-seed successfully written (32 bytes).
EXIT: 0
=== Check what was installed on ESP ===
/tmp/composefs-root/boot/loader/entries.srel
/tmp/composefs-root/boot/loader/random-seed
/tmp/composefs-root/boot/loader/loader.conf
The part about Source directory does not exist, ignoring is coming from here, and BOOTLIBDIR is coming from here and in turn here.
So in the end it gracefully ignores the fact that there's nothing in /usr/lib/systemd/boot/efi and happily exits 0 without installing anything.
I think the most straightforward fix here is to explicitly set SYSTEMD_IN_CHROOT=0 to prevent it from falling into that detection code, that seems to let it error out as you would expect:
$ podman run --rm --privileged \
--env SYSTEMD_LOG_LEVEL=debug \
--env SYSTEMD_RELAX_ESP_CHECKS=1 \
--env SYSTEMD_IN_CHROOT=0 \
quay.io/fedora/fedora-bootc:44 \
bash -c '
mkdir -p /tmp/composefs-root
mount --bind / /tmp/composefs-root
mount -t tmpfs tmpfs /tmp/composefs-root/boot
mount -t tmpfs tmpfs /tmp/composefs-root/tmp
echo "=== bootctl install output ==="
bootctl install --root /tmp/composefs-root --esp-path /boot --no-variables 2>&1
echo "EXIT: $?"
echo ""
echo "=== Check what was installed on ESP ==="
find /tmp/composefs-root/boot -type f
' 2>&1
=== bootctl install output ===
Found container virtualization podman.
Using EFI System Partition at /tmp/composefs-root/boot.
Using XBOOTLDR partition at /tmp/composefs-root/boot as $BOOT.
layout=ostree is specified in config.
Using entry token: fedora
Created "/tmp/composefs-root/boot/EFI".
Created "/tmp/composefs-root/boot/EFI/systemd".
Created "/tmp/composefs-root/boot/EFI/BOOT".
Created "/tmp/composefs-root/boot/loader".
Created "/tmp/composefs-root/boot/loader/keys".
Created "/tmp/composefs-root/boot/loader/entries".
Created "/tmp/composefs-root/boot/EFI/Linux".
Failed to open boot loader directory /tmp/composefs-root/usr/lib/systemd/boot/efi: No such file or directory
EXIT: 1
=== Check what was installed on ESP ===
Activity
jeckersb commentedon Sep 22, 2026
Some AI-guided debugging suggests what's happening is because of the environment we're invoking bootctl in during the install path, it detects that we're in a chroot and falls back automatically to
gracefulmode:And then mocking up roughly what's going on for a reproducer:
The part about
Source directory does not exist, ignoringis coming from here, andBOOTLIBDIRis coming from here and in turn here.So in the end it gracefully ignores the fact that there's nothing in
/usr/lib/systemd/boot/efiand happily exits 0 without installing anything.jeckersb commentedon Sep 22, 2026
I think the most straightforward fix here is to explicitly set
SYSTEMD_IN_CHROOT=0to prevent it from falling into that detection code, that seems to let it error out as you would expect:bootctl: explicitly disable systemd chroot detection