mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-05 03:22:22 +00:00
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:
1 parent
47020c7b92
commit
5a4bfefb6e
5 files changed
+51
-12
No files matched your search
@@ -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(())
|
||||
|
||||
Reference in new issue
Block a user