From 6b69df91a51147063cc9d6eeab299013b400b337 Mon Sep 17 00:00:00 2001 From: Itxaka Date: Wed, 12 Jul 2023 16:36:34 +0200 Subject: [PATCH] Use GPT for raw images Signed-off-by: Itxaka --- tools-image/build-arm-image.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools-image/build-arm-image.sh b/tools-image/build-arm-image.sh index 53ee8ae..94709cb 100755 --- a/tools-image/build-arm-image.sh +++ b/tools-image/build-arm-image.sh @@ -345,6 +345,8 @@ partprobe echo ">> Writing image and partition table" dd if=/dev/zero of="${output_image}" bs=1024000 count="${size}" || exit 1 +# make it gpt +echo "label: gpt" | sfdisk "${output_image}" if [ "$model" == "rpi64" ]; then sgdisk -n 1:8192:+96M -c 1:EFI -t 1:0c00 ${output_image} else @@ -383,7 +385,7 @@ export device="/dev/mapper/${device}" partprobe -kpartx -va $DRIVE +kpartx -vag $DRIVE echo ">> Populating partitions" efi=${device}p1