From a027c4be37ba74cbce0e354fba89a0c9014ba549 Mon Sep 17 00:00:00 2001 From: ColorfulRhino <131405023+ColorfulRhino@users.noreply.github.com> Date: Tue, 9 Jul 2024 18:17:37 +0200 Subject: [PATCH] partitioning: Add check to use legacy BIOS boot partition with GPT only, not MBR Exit with an error message if trying to add this partition to an MBR disk. --- lib/functions/image/partitioning.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/functions/image/partitioning.sh b/lib/functions/image/partitioning.sh index 9f5f2b9d31ec..f423a85dfca5 100644 --- a/lib/functions/image/partitioning.sh +++ b/lib/functions/image/partitioning.sh @@ -189,6 +189,7 @@ function prepare_partitions() { # Legacy BIOS partition if [[ -n "$biospart" ]]; then # gpt: BIOS boot + [[ "$IMAGE_PARTITION_TABLE" != "gpt" ]] && exit_with_error "Legacy BIOS partition is not allowed for MBR partition table (${BIOSSIZE} can't be >0)!" local type="21686148-6449-6E6F-744E-656564454649" echo "$biospart : name=\"bios\", start=${next}MiB, size=${BIOSSIZE}MiB, type=${type}" local next=$(($next + $BIOSSIZE))