Great you all have been heavily working on this. Looks like we are getting there although the initially posted disk layout (sda1=root, sda2=extended, sda5=swap) has changed. From the latest pictures posted it looks as if the expansion is still not working for this kind of layout (SWAP being on sda1).
I was just able to replicate this issue. But I didn’t have the time to find what’s causing the issue in our script:
$ cat in1.txt
label: dos
label-id: 0x77265efa
device: /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 3940352, type=82, bootable
/dev/sda2 : start= 3942400, size= 69457920, type=5
/dev/sda5 : start= 3944448, size= 3940352, type=83
/dev/sda6 : start= 7886848, size= 65513472, type=83
$ ./procsfdisk.awk -v SECTOR_SIZE=512 -v CHUNK_SIZE=512 -v MIN_START=2048 -v action=filldisk -v target=/dev/sda -v sizePos=146800640 -v diskSize=146800640 -v fixedList=1:5 in1.txt
ERROR: New start and size (150960130) on (/dev/sda1) is larger than the disk (146800640).
# ERROR in new partition table, quitting.
# ERROR: /dev/sda5 has an overlap.
label: dos
label-id: 0x77265efa
device: /dev/sda
unit: sectors
/dev/sda1 : start= 2048, size= 3940352, type=82, bootable
/dev/sda2 : start= 3944448, size= 142856192, type=5
/dev/sda5 : start= 142856194, size= 8103936, type=83
/dev/sda6 : start= 142856194, size= 134747648, type=83
From my point of view the output of sfdisk -d /dev/sda
is much more helpful than df -h
.