File tree 1 file changed +7
-6
lines changed
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -345,8 +345,6 @@ partprobe
345
345
346
346
echo " >> Writing image and partition table"
347
347
dd if=/dev/zero of=" ${output_image} " bs=1024000 count=" ${size} " || exit 1
348
- # make it gpt
349
- echo " label: gpt" | sfdisk " ${output_image} "
350
348
if [ " $model " == " rpi64" ]; then
351
349
sgdisk -n 1:8192:+96M -c 1:EFI -t 1:0c00 ${output_image}
352
350
else
@@ -360,8 +358,11 @@ sgdisk -n 3:0:+$(( ${recovery_size} + ${oem_size} ))M -c 3:lvm -t 3:8e00 ${outpu
360
358
fi
361
359
sgdisk -n 4:0:+64M -c 4:persistent -t 4:8300 ${output_image}
362
360
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
365
366
366
367
# Prepare the image and copy over the files
367
368
@@ -382,7 +383,7 @@ export device="/dev/mapper/${device}"
382
383
383
384
partprobe
384
385
385
- kpartx -vag $DRIVE
386
+ kpartx -va $DRIVE
386
387
387
388
echo " >> Populating partitions"
388
389
efi=${device} p1
470
471
sleep 5
471
472
sync
472
473
473
- kpartx -dvg $DRIVE || true
474
+ kpartx -dv $DRIVE || true
474
475
475
476
umount $DRIVE || true
476
477
You can’t perform that action at this time.
0 commit comments