File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -345,8 +345,6 @@ partprobe
345345
346346echo " >> Writing image and partition table"
347347dd if=/dev/zero of=" ${output_image} " bs=1024000 count=" ${size} " || exit 1
348- # make it gpt
349- echo " label: gpt" | sfdisk " ${output_image} "
350348if [ " $model " == " rpi64" ]; then
351349 sgdisk -n 1:8192:+96M -c 1:EFI -t 1:0c00 ${output_image}
352350else
@@ -360,8 +358,11 @@ sgdisk -n 3:0:+$(( ${recovery_size} + ${oem_size} ))M -c 3:lvm -t 3:8e00 ${outpu
360358fi
361359sgdisk -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
383384partprobe
384385
385- kpartx -vag $DRIVE
386+ kpartx -va $DRIVE
386387
387388echo " >> Populating partitions"
388389efi=${device} p1
470471sleep 5
471472sync
472473
473- kpartx -dvg $DRIVE || true
474+ kpartx -dv $DRIVE || true
474475
475476umount $DRIVE || true
476477
You can’t perform that action at this time.
0 commit comments