Repository navigation
Systemd-Boot minor fixes (split from https://github.com/bootc-dev/bootc/pull/2569) - #2597
Open
Johan-Liebert1 wants to merge 3 commits into
Open
Johan-Liebert1 wants to merge 3 commits into
Johan-Liebert1 wants to merge 3 commits into
Conversation
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>
There was a problem hiding this comment.
🟡 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.confonto the ESP afterbootctl 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

sd-boot: Pick
loader.conffrom the imageInstead of harcoding the
timeoutline in bootc, get the loader.conffile from
/usr/lib/bootc/install/systemd-boot/loader.conffrom insidethe image. If the file is not present, the default loader.conf created
by bootctl is kept as is
Fixes: #2558
test: Unmount using
umount -lTests
32-multi-device-espand60-install-composefs-nativerandomlyfail while trying to unmount a mountpoint with the error
umount: /var/mnt/esp_check: target is busy.orumount: /var/mnt/composefs-native: target is busy.Lazily unmount them with the
-loption to prevent flakesRelated: #2177