Skip to content

Commit 3f512e0

Browse files
committed
update capacity after truncation
1 parent 4c90a9d commit 3f512e0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pack_image.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ if [[ ${shrink,,} = y* ]]; then
4545
fi
4646
echo "Shrinking image from ${initial_image_size} to ${image_size} bytes."
4747
truncate -s "${image_size}" "${image}"
48+
losetup --set-capacity "${loopdev}"
4849
if [[ "${part_type}" == "gpt" ]]; then
4950
# use sgdisk to fix the secondary GPT after truncation
5051
sgdisk -e "${image}"

0 commit comments

Comments
 (0)