From 9d14d7296ad5fa9fe301ce4f3b4581e47c7066fc Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Wed, 21 Aug 2024 18:19:23 +0100 Subject: [PATCH] image: Skip BIOS Boot partion on sd-boot images This partition was never useful and is now unused. We will find out which of our tools assume a 3-partition disk image... https://phabricator.endlessm.com/T34775 --- stages/eib_image | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/stages/eib_image b/stages/eib_image index 58cc99e5..6b9965b8 100755 --- a/stages/eib_image +++ b/stages/eib_image @@ -209,8 +209,10 @@ create_image() { i386|amd64) # EFI system partition echo "size=${esp_size}MiB, type=C12A7328-F81F-11D2-BA4B-00A0C93EC93B" - # GRUB BIOS BOOT partition - echo "size=1MiB, type=21686148-6449-6E6F-744E-656564454649" + if [[ "${EIB_IMAGE_SDBOOT}" != "true" ]]; then + # GRUB BIOS BOOT partition + echo "size=1MiB, type=21686148-6449-6E6F-744E-656564454649" + fi ;; esac @@ -273,9 +275,14 @@ create_image() { case "${EIB_ARCH}" in i386|amd64) - esp_loop=${img_loop}p1 - bios_boot_loop=${img_loop}p2 - root_loop=${img_loop}p3 + if [[ "${EIB_IMAGE_SDBOOT}" == "true" ]]; then + esp_loop=${img_loop}p1 + root_loop=${img_loop}p2 + else + esp_loop=${img_loop}p1 + bios_boot_loop=${img_loop}p2 + root_loop=${img_loop}p3 + fi ext4_opts="dir_index,^huge_file" ESP="${ROOT}"/boot/efi if [[ "${EIB_IMAGE_SDBOOT}" = "true" ]]; then