You can increase your Ubuntu partition if you have free space in your hdd in any other partition.
You must boot from Ubuntu live disk.So that all the partitions will be unmounted.And make sure that no one is mounted.
After opening gparted, right click on the partition with free space and select Resize/Move option. Resize it to get unallocated space.
You need to move the unallocated space just to right of the partition where Ubuntu is installed, so that it can be combined with your Ubuntu partition.
Right click on the partition you just shrinked, select Resize/Move and move the dragger to the extreme right, so that the unallocated space will be moved to left of the partition.
Try the above step to move the unallocated space just to the right of the Ubuntu partition (if you have many partition in between.)
Now right-click on the Ubuntu partition and select Resize/Move option. Now you can be able to add the unallocated space to the Ubuntu partition.
If you are using Wubi (Ubuntu installed under Windows), the normal resize methods (Gparted, etc.) won't work and you have to follow these steps.
Resize root.disk
You have to boot from a live CD/USB. This won't work while running Wubi.
Backup the root.disk (not required, but a good idea)
Mount the NTFS partition that your root.disk is on (this example assumes it's /dev/sda1 and the mountpoint is /media/win - adjust accordingly in the following instructions):
sudo mkdir -p /media/win
sudo mount /dev/sda1 /media/win
- Check the size of the root.disk (not required)
du -h --apparent-size /media/win/ubuntu/disks/root.disk
- Run fsck on the root.disk
fsck -f /media/win/ubuntu/disks/root.disk
- Resize - specify the desired final size (this example resizes to 10 GB)
resize2fs /media/win/ubuntu/disks/root.disk 10G
Reboot back into Wubi Ubuntu
Live Resize
Rather than boot from the livecd, it is possible to extend the disk online with the following commands:
sudo dd if=/dev/zero bs=1MiB of=/host/ubuntu/disks/root.disk conv=notrunc oflag=append count=2048
sudo losetup -c /dev/loop0/
sudo resize2fs /dev/loop0
This will add 2 GiB to the disk. Adjust the count=2048 argument for different sizes.