I had a hard time trying to figure out as to how to resize my partitions using Gpart. I am currently using Ubuntu 12.04 LTS aka Precise Pangolin.
First it's better you use Gpart from a Live CD/USB. You can do this by using your Ubuntu Installation CD/USB.
So the main thing you will have to note while resizing your partition is there should be unallocated space either at the immediate left or right of your partition. Only then will you be able to expand your partition.
If you don't have Gparted Partition Editor you can install one from the terminal using the following command:
sudo apt-get install gparted
- To Extend just select an inactive partition (active partitions are locked).
- Then right click and select Resize/Move.
- Then you can move the arrows on the left and the right to resize/expand.
- Free Space preceding is the free space/unallocated space to the left of your selected partition.
- Free Space following is the free space/unallocated space to the right of your selected partition.
- Then click on Resize/Move.
- Then finally click Apply (The Green Check Icon).
Depending on the size of your partition the operation might execute shortly or take some time.