Skip to content

Systemd-Boot minor fixes (split from https://github.com/bootc-dev/bootc/pull/2569) - #2597

Open
Johan-Liebert1 wants to merge 3 commits into
bootc-dev:mainfrom
Johan-Liebert1:sdboot-minor-fixes-p1
Open

Johan-Liebert1 wants to merge 3 commits into
bootc-dev:mainfrom
Johan-Liebert1:sdboot-minor-fixes-p1

Conversation

@Johan-Liebert1

Copy link
Copy Markdown
Member

sd-boot: Pick loader.conf from the image

Instead of harcoding the timeout line in bootc, get the loader.conf
file from /usr/lib/bootc/install/systemd-boot/loader.conf from inside
the image. If the file is not present, the default loader.conf created
by bootctl is kept as is

Fixes: #2558


test: Unmount using umount -l

Tests 32-multi-device-esp and 60-install-composefs-native randomly
fail while trying to unmount a mountpoint with the error

umount: /var/mnt/esp_check: target is busy. or
umount: /var/mnt/composefs-native: target is busy.

Lazily unmount them with the -l option to prevent flakes

Related: #2177

Instead of harcoding the `timeout` line in bootc, get the loader.conf
file from `/usr/lib/bootc/install/systemd-boot/loader.conf` from inside
the image. If the file is not present, the default loader.conf created
by bootctl is kept as is

Fixes: bootc-dev#2558

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Tests `32-multi-device-esp` and `60-install-composefs-native` randomly
fail while trying to unmount a mountpoint with the error

`umount: /var/mnt/esp_check: target is busy.` or
`umount: /var/mnt/composefs-native: target is busy.`

Lazily unmount them with the `-l` option to prevent flakes

Related: bootc-dev#2177

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Copilot AI balanced review requested due to automatic review settings October 28, 2026 04:51
@github-actions github-actions Bot added the area/documentation Updates to the documentation label Oct 28, 2026
@bootc-bot
bootc-bot Bot requested a review from henrywang October 28, 2026 04:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Regression tests are missing for both copying the image’s exact loader.conf contents to the ESP and preserving bootctl’s template when the source file is absent.

1 open issue
What changed in this PR

This PR lets container images define the initial systemd-boot configuration for Composefs installations and adjusts test cleanup to reduce busy-mount failures.

Changes:

  • Copy image-provided loader.conf onto the ESP after bootctl install, preserving bootctl’s configuration when no source file exists.
  • Remove the hardcoded timeout fallback and document the image configuration path.
  • Use lazy unmounts in two installation tests.
File Description
tmt/​tests/​booted/​test-multi-device-esp.nu Use lazy unmounts during ESP validation and cleanup.
tmt/​tests/​booted/​test-install-composefs-native.nu Lazily unmount the installation test filesystem.
docs/​src/​bootc-bootloaders.7.md Document initial systemd-boot configuration behavior.
crates/​lib/​src/​bootloader.rs Copy optional image-provided loader configuration onto the ESP.
crates/​lib/​src/​bootc_composefs/​boot.rs Remove the hardcoded loader timeout fallback.

Review effort: Balanced

Comment on lines +370 to +373
if let Some(mut src) = prepared_root
.dir()
.open_optional(SYSTEMD_LOADER_CONF_SRC)
.context("Opening image systemd-boot loader config")?
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

composefs: systemd-boot "timeout 5" is never written, bootctl install already created loader.conf

2 participants