pub struct HybridBootOptions {
pub partition_scheme: PartitionScheme,
pub mbr_bootstrap: Option<Vec<u8>>,
pub bootable: bool,
pub efi_boot_partition: Option<String>,
}sync and write only.Expand description
Hybrid boot options for creating bootable ISO images from USB/disk.
This enables the ISO to be bootable when written directly to a USB drive or other storage media, in addition to being bootable as a CD/DVD.
Fields§
§partition_scheme: PartitionSchemeThe type of partition table to write.
mbr_bootstrap: Option<Vec<u8>>Optional MBR bootstrap code to inject (must be 446 bytes or less). This is typically the first stage of a bootloader like GRUB or Syslinux.
bootable: boolWhether to mark the ISO partition as bootable in the MBR.
efi_boot_partition: Option<String>Path (in the ISO tree, using the configured path separator) of the El Torito UEFI boot image to additionally expose as a GPT EFI System Partition.
Applies to PartitionScheme::Gpt and PartitionScheme::Hybrid.
When None, and the El Torito options contain exactly one
PlatformId::UEFI section entry, that entry’s boot image is exposed
automatically. Formatting fails with a not-found error when the
configured path does not resolve to a file in the ISO tree.
Implementations§
Source§impl HybridBootOptions
impl HybridBootOptions
Sourcepub fn with_efi_boot_partition(self, path: impl Into<String>) -> Self
pub fn with_efi_boot_partition(self, path: impl Into<String>) -> Self
Set the path of the El Torito UEFI boot image to expose as a GPT EFI
System Partition. See HybridBootOptions::efi_boot_partition.