From 36184b4b4f585c13d8dd463b358de623e27c1d17 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Tue, 10 Dec 2024 12:19:02 +0100 Subject: [PATCH] disk: fix ESP and BIOS partition type IDs for dos The correct partition type ID for ESP is 'ef' (not 'ef00') [1]. BIOS boot partitions aren't meant for (or required) on dos partition tables [2]. We will eventually make this a partitionless gap in the PT, but for now let's simply use the code for 'empty'. [1] https://tldp.org/HOWTO/Partition-Mass-Storage-Definitions-Naming-HOWTO/x190.html [2] https://www.gnu.org/software/grub/manual/grub/html_node/BIOS-installation.html#BIOS-installation --- pkg/disk/disk.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/disk/disk.go b/pkg/disk/disk.go index 2c64d402e5..d4b483b81c 100644 --- a/pkg/disk/disk.go +++ b/pkg/disk/disk.go @@ -67,11 +67,14 @@ const ( // Partition type ID for any native Linux filesystem on dos DosLinuxTypeID = "83" - // Partition type ID for BIOS boot partition on dos - DosBIOSBootID = "ef02" + // Partition type ID for BIOS boot partition on dos. + // Type ID is for 'empty'. + // TODO: drop this completely when we convert the bios BOOT space to a + // partitionless gap/offset. + DosBIOSBootID = "00" // Partition type ID for ESP on dos - DosESPID = "ef00" + DosESPID = "ef" // Partition type ID for swap DosSwapID = "82"