From 8f2b909d59d1a0627f8dd537b9dc2d448adff8e9 Mon Sep 17 00:00:00 2001 From: jalr Date: Sun, 11 Feb 2018 18:20:31 +0100 Subject: [PATCH] fix partitioning --- imagesync.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/imagesync.sh b/imagesync.sh index 7c2ba21..e645de9 100755 --- a/imagesync.sh +++ b/imagesync.sh @@ -21,18 +21,16 @@ esac disk=/dev/sda -sfdisk -J /dev/sda << PARTTABLE -{ - "partitiontable": { - "label": "dos", - "id": "0x2708bc46", - "device": "/dev/sda", - "unit": "sectors", - "partitions": [ - {"node": "/dev/sda1", "start": 2048, "size": 497664, "type": "83", "bootable": true}, - ] - } -} + +size_part_1=$((3072 * 1024 * 1024 / 512)) + +sfdisk /dev/sda << PARTTABLE +label: dos +label-id: 0xdeadbeef +device: /dev/sda +unit: sectors + +/dev/sda1 : start= 2048, size= $size_part_1, type=83 PARTTABLE mke2fs -t ext4 ${disk}1