engineering: Add BLS entry support for grub boot arg extraction#679
Draft
Britel wants to merge 2 commits into
Draft
engineering: Add BLS entry support for grub boot arg extraction#679Britel wants to merge 2 commits into
Britel wants to merge 2 commits into
Conversation
AZL4 (Fedora-based) uses Boot Loader Spec entries instead of inline linux commands in grub.cfg. When grub.cfg contains blscfg and no inline linux lines, fall back to reading boot args from /boot/loader/entries/*.conf. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Adds Boot Loader Spec (BLS) support to the osmodifier grub.cfg parser. AZL4 (Fedora-based) uses BLS entries instead of inline
linuxcommands in grub.cfg, which caused both AZL4 E2E test stages to fail.Part 3 of the AZL4 enablement stack. Depends on PR #672 (ESP vendor-dir discovery).
Problem
extract_boot_args_from_grub_cfg()parseslinux /boot/vmlinuz ... argslines from grub.cfg to sync boot args into/etc/default/grub. On AZL4, grub.cfg containsblscfginstead of inline menuentry blocks — the kernel command line lives in/boot/loader/entries/*.conffiles. The parser found nolinuxline and bailed with "no linux line found in non-recovery menuentry."This broke both AZL4 E2E stages:
Changes
Single file:
crates/osmodifier/src/grub_cfg.rsBLS fallback in
extract_boot_args_from_grub_cfg()When
find_non_recovery_linux_lines()fails AND grub.cfg containsblscfg, fall back to reading boot args from BLS entry files.New function
extract_options_from_bls_entries()/boot/loader/entries/*.confoptionsline as a synthetic linux line for downstream parsingZero AZL3 impact
The BLS path only triggers when:
find_non_recovery_linux_lines()finds zero results, ANDblscfgAZL3 grub.cfg never contains
blscfg(BLS is disabled viaGRUB_ENABLE_BLSCFG=false). The fallback never fires on AZL3.Testing
PR Stack
azl4-1-grub-nativeazl4-2-esp-layoutsazl4-2b-bls-grubazl4-5a-builder-infraazl4-5b-image-pipelineazl4-6-bm-testazl4-7a-qcow2-rustazl4-7b-rollback-stage