Correct MAX_SIXE calc in installToInternal.sh
This commit is contained in:
parent
1398ef7c7c
commit
f182a5385a
@ -31,7 +31,9 @@ then
|
|||||||
# Make new partition table
|
# Make new partition table
|
||||||
sgdisk -g /dev/mmcblk2
|
sgdisk -g /dev/mmcblk2
|
||||||
#Get the last usable sector, cant just take last sector as we depend on the secondary gpt
|
#Get the last usable sector, cant just take last sector as we depend on the secondary gpt
|
||||||
MAX_SIZE="$(sgdisk -p /dev/mmcblk2 | grep -o 'last usable sector is.*' | awk '{print $5}')"
|
LUS="$(sgdisk -p /dev/mmcblk2 | grep -o 'last usable sector is.*' | awk '{print $5}')"
|
||||||
|
#Now use that to find how bit the filesystem partition can be
|
||||||
|
MAX_SIZE="$(expr $LUS -20480 - 65536)"
|
||||||
# Make new entries
|
# Make new entries
|
||||||
cgpt add -i 1 -b 20480 -s 65536 -t kernel -l KERNEL -S 1 -T 5 -P 10 /dev/mmcblk2
|
cgpt add -i 1 -b 20480 -s 65536 -t kernel -l KERNEL -S 1 -T 5 -P 10 /dev/mmcblk2
|
||||||
cgpt add -i 2 -b 86016 -s $MAX_SIZE -t data -l Root /dev/mmcblk2
|
cgpt add -i 2 -b 86016 -s $MAX_SIZE -t data -l Root /dev/mmcblk2
|
||||||
|
Loading…
Reference in New Issue
Block a user