I have a linux virtual machine configured in windows host using Virtualbox. The virtual machine has got 15 GB storage with one primary partition (sda1) and an extended partition. My primary partition is almost used up and I would like to expand the capacity by another 4 GB. Using Gparted Live I could shrink the extended partition to salvage about 4 GB space. However, I am unable to increase the size of primary partition using this newly created space. How can this be achieved? The screenshot below depict the situation that I am facing.
In the second reference, an ext3 partition is resized, it makes no difference for an ext4 partition, just substitute ext4 wherever ext3 appears. Also notice the following: this cannot be achieved from within gparted, because you are trying to alter the exact partition (/dev/sda1) on which the Linux operating system resides, which is a big no-no. After freeing the unallocated space from the extended partition, you will have to shut down the VM, insert the installation disk and boot from this, not from your (virtual) HDD. Then you use the OS on the installation disk to enlarge (without data loss) the /dev/sda1 partition from outside your system, so to speak. This is what the instructions achieve with a Knoppix disk, which you do not need because you should still have the installation disk. That's all.