Skip to content

Commit

Permalink
Merge pull request containers#892 from cgwalters/bootloader-cleanups
Browse files Browse the repository at this point in the history
two minor bootloader cleanups
  • Loading branch information
cgwalters authored Nov 9, 2024
2 parents c49ccec + e421dca commit 5ae8b6b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/src/bootloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use crate::task::Task;

/// The name of the mountpoint for efi (as a subdirectory of /boot, or at the toplevel)
pub(crate) const EFI_DIR: &str = "efi";
pub(crate) const ESP_GUID: &str = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B";
pub(crate) const PREPBOOT_GUID: &str = "9E1A2D38-C612-4316-AA26-8B49521E5A8B";
pub(crate) const PREPBOOT_LABEL: &str = "PowerPC-PReP-boot";
#[cfg(target_arch = "powerpc64")]
Expand Down
4 changes: 2 additions & 2 deletions lib/src/install/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ pub(crate) fn install_create_rootfs(
}

let esp_partno = if super::ARCH_USES_EFI {
let esp_guid = crate::bootloader::ESP_GUID;
partno += 1;
writeln!(
&mut partitioning_buf,
r#"size={EFIPN_SIZE_MB}MiB, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B, name="EFI-SYSTEM""#
r#"size={EFIPN_SIZE_MB}MiB, type={esp_guid}, name="EFI-SYSTEM""#
)?;
Some(partno)
} else {
Expand Down Expand Up @@ -411,7 +412,6 @@ pub(crate) fn install_create_rootfs(
.run()?;
let efifs_path = bootfs.join(crate::bootloader::EFI_DIR);
std::fs::create_dir(&efifs_path).context("Creating efi dir")?;
mount::mount(espdev.node.as_str(), &efifs_path)?;
}

let luks_device = match block_setup {
Expand Down

0 comments on commit 5ae8b6b

Please sign in to comment.