Skip to content

two minor bootloader cleanups #892

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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