fix(boot): count tries without using them, add XBOOTLDR once, and warn about dropped initrds

An entry that is not counted in strict mode still has its tries, so it
can be bad. Strict mode adds the extended boot loader partition to the
first BLS generator only. A chainload chain that does not list an initrd
that the entry has now warns, as the kernel may not find its root
without it, and strict autoconfigure says when it can't find the
partition of Sprout.
This commit is contained in:
alex authored and Alex Zenla committed 2026-10-04 10:55:07 -07:00
1 parent 47020c7b92
commit 5a4bfefb6e
5 files changed
+51 -12

No files matched your search

+12 -6
View File
@@ -140,12 +140,18 @@ pub fn autoconfigure(
}
// In strict mode, one generator reads both partitions, with the root of Sprout's partition.
if strict
&& strict_found
&& let Some(root) = own_root
&& let Err(error) = bls::add_generator(config, &root, true)
{
warn!("unable to add the bls generator: {:#}", error);
if strict && strict_found {
match own_root {
Some(root) => {
if let Err(error) = bls::add_generator(config, &root, true) {
warn!("unable to add the bls generator: {:#}", error);
}
}
None => warn!(
"found BLS entries, but not the partition that Sprout was loaded from, \
so none are used in strict mode"
),
}
}
Ok(())