summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2025-10-01 15:20:25 +0000
committerDaniel Golle2025-10-01 15:39:47 +0000
commit0782d243d23e64d8420f8c067a4169eb69a55f92 (patch)
tree5d65a0a64f018d3138e9093406026cb8c3536db1
parent7e6f69b444c33a6ca4e9efb98832820e3d8e87ba (diff)
downloadfirmware-utils-0782d243d23e64d8420f8c067a4169eb69a55f92.tar.gz
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 <daniel@makrotopia.org>
-rw-r--r--src/ptgen.c3
1 files changed, 1 insertions, 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;