Skip to content

Commit

Permalink
scripts: wipe gpt partition info after writing boot blocks
Browse files Browse the repository at this point in the history
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
  • Loading branch information
hexdump0815 committed Jan 22, 2023
1 parent 7ae5a74 commit 793423b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/create-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 793423b

Please # to comment.