Installing gparted tool in HostPC


sudo apt-get install gparted

https://gparted.org/display-doc.php%3Fname%3Dmoving-space-between-partitions

Resizing of Partition(P2)


Please resize the rootfs partition to 2098 MB or 2GB (/dev/sdb1) accordingly from below procedure as captured in various stages

  1. Select gparted tool from menu


2. Select the rootfs partition of format ext3 for resize/move option



3. Resize the rootfs partition by giving new size image to 2098 MiB


4. After resize , position stands as below


Partition-P3 Creation 


Partition-P4 Creation