Lately I'll need to add some space to Ubuntu, but it was installed in VMware. And the following method could be the same for the actual desktop.
- Find a CD that has Ubuntu image burned in, i.e. a boot up CD.
- Reboot the device to CD-loaded Ubuntu - click "try without installing"
- Run "gParted"
- Locate "Extended Partition" with "linux-swap", remember the size of swap (mine is 8GiB
- Right click "linux-swap" and click "swapoff"
- Then right click "linux-swap" and click "Delete"
- Also delete the corresponding Extended Partition
- Now we should have "sda1" and "unallocated space"
- Right click "sda1" and choose "Resize/Move"
- Adjust the size of the primary drive and save, for instance, 8GiB for your swap
- Now right click "unallocated space" and create a new partition - choose "Extended Partition"
- Right click and select "new" and then choose "linux-swap" partition.
- Click the green arrow for applying the changed
- Restart the system!