From 793423b50929fd9b66d7b19585fe1a4ecf276a63 Mon Sep 17 00:00:00 2001 From: hexdump Date: Sun, 22 Jan 2023 22:33:10 +0100 Subject: [PATCH] scripts: wipe gpt partition info after writing boot blocks in case boot blocks from other dists like armbian or minimyth2 are used it is a good idea to wipe the gpt partition info to avoid old remaining gpt partition info from those boot blocks to confuse newly created mbr partition based setups --- scripts/create-image.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/create-image.sh b/scripts/create-image.sh index f30db9fc..128aa545 100755 --- a/scripts/create-image.sh +++ b/scripts/create-image.sh @@ -166,6 +166,10 @@ if [ "${CROSPARTS}" = "true" ]; then else if [ -f ${DOWNLOAD_DIR}/boot-${1}-${2}.dd ]; then dd if=${DOWNLOAD_DIR}/boot-${1}-${2}.dd of=/dev/loop0 + # clear the partition table and reread it via partprobe in case the boot + # blocks provided contained a gpt partition table which might confuse later + sgdisk -Z /dev/loop0 + partprobe /dev/loop0 fi fi