Skip to content

Commit d8a56ba

Browse files
authored
Merge pull request #69 from Itxaka/revert_gpt
2 parents e5f563c + f835332 commit d8a56ba

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tools-image/build-arm-image.sh

+7-6
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,6 @@ partprobe
345345

346346
echo ">> Writing image and partition table"
347347
dd if=/dev/zero of="${output_image}" bs=1024000 count="${size}" || exit 1
348-
# make it gpt
349-
echo "label: gpt" | sfdisk "${output_image}"
350348
if [ "$model" == "rpi64" ]; then
351349
sgdisk -n 1:8192:+96M -c 1:EFI -t 1:0c00 ${output_image}
352350
else
@@ -360,8 +358,11 @@ sgdisk -n 3:0:+$(( ${recovery_size} + ${oem_size} ))M -c 3:lvm -t 3:8e00 ${outpu
360358
fi
361359
sgdisk -n 4:0:+64M -c 4:persistent -t 4:8300 ${output_image}
362360

363-
# Make the disk GPT
364-
sgdisk -g ${output_image}
361+
sgdisk -m 1:2:3:4 ${output_image}
362+
363+
if [ "$model" == "rpi64" ]; then
364+
sfdisk --part-type ${output_image} 1 c
365+
fi
365366

366367
# Prepare the image and copy over the files
367368

@@ -382,7 +383,7 @@ export device="/dev/mapper/${device}"
382383

383384
partprobe
384385

385-
kpartx -vag $DRIVE
386+
kpartx -va $DRIVE
386387

387388
echo ">> Populating partitions"
388389
efi=${device}p1
@@ -470,7 +471,7 @@ sync
470471
sleep 5
471472
sync
472473

473-
kpartx -dvg $DRIVE || true
474+
kpartx -dv $DRIVE || true
474475

475476
umount $DRIVE || true
476477

0 commit comments

Comments
 (0)