MCPcopy Create free account
hub / github.com/bootc-dev/bootc / find_first_colocated_esp

Method find_first_colocated_esp

crates/blockdev/src/blockdev.rs:211–215  ·  view source on GitHub ↗

Find a single ESP partition among all root devices backing this device. Walks the parent chain to find all backing disks, then looks for ESP partitions on each. Returns the first ESP found. This is the common case for composefs/UKI boot paths where exactly one ESP is expected.

(&self)

Source from the content-addressed store, hash-verified

209 /// partitions on each. Returns the first ESP found. This is the common
210 /// case for composefs/UKI boot paths where exactly one ESP is expected.
211 pub fn find_first_colocated_esp(&self) -> Result<Device> {
212 self.find_colocated_esps()?
213 .and_then(|mut v| Some(v.remove(0)))
214 .ok_or_else(|| anyhow!("No ESP partition found among backing devices"))
215 }
216
217 /// Find all BIOS boot partitions across all root devices backing this device.
218 /// Calls find_all_roots() to discover physical disks, then searches each for a BIOS boot partition.

Callers 3

newMethod · 0.80
setup_composefs_bls_bootFunction · 0.80
setup_composefs_uki_bootFunction · 0.80

Calls 2

find_colocated_espsMethod · 0.80
removeMethod · 0.45

Tested by

no test coverage detected