Skip to content

Commit

Permalink
partitioning: Add check to use legacy BIOS boot partition with GPT on…
Browse files Browse the repository at this point in the history
…ly, not MBR

Exit with an error message if trying to add this partition to an MBR disk.
  • Loading branch information
ColorfulRhino authored and igorpecovnik committed Aug 5, 2024
1 parent 01d8716 commit a027c4b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/functions/image/partitioning.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a027c4b

Please sign in to comment.