Skip to main content

write_boot_simple

Function write_boot_simple 

Source
pub fn write_boot_simple<ObjectID: FsVerityHashValue>(
    repo: &Repository<ObjectID>,
    entry: BootEntry<ObjectID>,
    karg: &ComposefsCmdline<ObjectID>,
    boot_partition: &Path,
    boot_subdir: Option<&str>,
    entry_id: Option<&str>,
    cmdline_extra: &[&str],
) -> Result<()>
Expand description

Writes boot entry to the boot partition

ยงArguments

  • repo - The composefs repository
  • entry - Boot entry variant to be written
  • karg - The composefs kernel argument (encodes format version, digest, and insecure flag); used to build the composefs= or composefs.digest= cmdline argument
  • boot_partition - Path to the boot partition/directory
  • boot_subdir - If Some(path), the path is prepended to initrd and linux keys in the BLS entry

For example, if boot_partition = "/boot" and boot_subdir = Some("1") , the BLS entry will contain

linux /boot/1/<entry_id>/linux
initrd /boot/1/<entry_id>/initrd

If boot_partition = "/boot" and boot_subdir = None , the BLS entry will contain

linux /<entry_id>/linux
initrd /<entry_id>/initrd
  • entry_id - In case of a BLS entry, the name of file to be generated in loader/entries
  • cmdline_extra - Extra kernel command line arguments