From 7aa96c412bb67ba76d70b97f8372d08a87d1d9d3 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 9 Nov 2024 10:16:28 -0500 Subject: [PATCH 1/2] install: Hoist ESP GUID to a const Prep for further work. Signed-off-by: Colin Walters --- lib/src/bootloader.rs | 1 + lib/src/install/baseline.rs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/bootloader.rs b/lib/src/bootloader.rs index e90b365ef..2a696f1fd 100644 --- a/lib/src/bootloader.rs +++ b/lib/src/bootloader.rs @@ -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")] diff --git a/lib/src/install/baseline.rs b/lib/src/install/baseline.rs index f9b8795ca..8f6db035f 100644 --- a/lib/src/install/baseline.rs +++ b/lib/src/install/baseline.rs @@ -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 { From e421dcab297e42e5c38d10824918b1ac6f790ece Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Sat, 9 Nov 2024 10:16:55 -0500 Subject: [PATCH 2/2] install: Drop an unnecessary mount This is handled by bootupd. Signed-off-by: Colin Walters --- lib/src/install/baseline.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/src/install/baseline.rs b/lib/src/install/baseline.rs index 8f6db035f..50ef8d369 100644 --- a/lib/src/install/baseline.rs +++ b/lib/src/install/baseline.rs @@ -412,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 {