mirror of
https://github.com/edera-dev/sprout.git
synced 2026-11-04 22:02:20 +00:00
feat(initrd): support chaining multiple initrds (#101)
Add linux-initrd-chain to the chainload action and initrd-chain to the edera action. Each file in the list is read in order and concatenated into a single initrd. The chain can't be combined with the single initrd option on the same action. BLS entries with multiple initrds, either as repeated initrd lines or as multiple paths on one line, previously only loaded the last one. Parse all of them and set them in the initrd-0 through initrd-7 slots, which the autoconfigured BLS action now chains. Unused slots stamp to the filesystem root and are skipped. Entries with more than 8 initrds are skipped with a warning.
This commit is contained in:
8 files changed
+157
-57
No files matched your search
@@ -18,4 +18,9 @@ pub struct ChainloadConfiguration {
|
||||
/// generally better and safer as it can support additional load options in the future.
|
||||
#[serde(default, rename = "linux-initrd")]
|
||||
pub linux_initrd: Option<String>,
|
||||
/// An optional list of paths to Linux initrds to chain together.
|
||||
/// The contents of each initrd are concatenated in order and loaded as a single initrd
|
||||
/// using the same mechanism as `linux-initrd`. This cannot be used with `linux-initrd`.
|
||||
#[serde(default, rename = "linux-initrd-chain")]
|
||||
pub linux_initrd_chain: Vec<String>,
|
||||
}
|
||||
@@ -14,6 +14,11 @@ pub struct EderaConfiguration {
|
||||
/// The path to the initrd to load for dom0.
|
||||
#[serde(default)]
|
||||
pub initrd: Option<String>,
|
||||
/// The paths to the initrds to chain together for dom0.
|
||||
/// The contents of each initrd are concatenated in order and loaded as a single initrd.
|
||||
/// This cannot be used with `initrd`.
|
||||
#[serde(default, rename = "initrd-chain")]
|
||||
pub initrd_chain: Vec<String>,
|
||||
/// The options to pass to the kernel.
|
||||
#[serde(default, rename = "kernel-options")]
|
||||
pub kernel_options: Vec<String>,
|
||||
|
||||
Reference in new issue
Block a user