From 0782d243d23e64d8420f8c067a4169eb69a55f92 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Wed, 1 Oct 2025 16:20:25 +0100 Subject: [PATCH] Revert "ptgen: do not create stub partition to fill a gap if gap caused by alignment" Without the BIOS Boot Partition in the gap GRUB fails to install on MBR-boot images. Hence revert commit f1f98b0b8456e89f6c959d8f028c5204da82365e. Signed-off-by: Daniel Golle --- src/ptgen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ptgen.c b/src/ptgen.c index d9fb744..d480908 100644 --- a/src/ptgen.c +++ b/src/ptgen.c @@ -489,8 +489,7 @@ static int gen_gptable(uint32_t signature, guid_t guid, unsigned nr) printf("%" PRIu64 "\n", (sect - start) * DISK_SECTOR_SIZE); } - if ((parts[0].start != 0) && - (parts[0].actual_start > gpt_first_entry_sector + GPT_SIZE)) { + if (parts[0].actual_start > GPT_FIRST_ENTRY_SECTOR + GPT_SIZE) { gpte[GPT_ENTRY_MAX - 1].start = cpu_to_le64(gpt_first_entry_sector + GPT_SIZE); gpte[GPT_ENTRY_MAX - 1].end = cpu_to_le64(parts[0].actual_start - 1); gpte[GPT_ENTRY_MAX - 1].type = GUID_PARTITION_BIOS_BOOT; -- 2.30.2