How to extend primary partition size in Ubuntu

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.

  1. Find a CD that has Ubuntu image burned in, i.e. a boot up CD.
  2. Reboot the device to CD-loaded Ubuntu - click "try without installing"
  3. Run "gParted"
  4. Locate "Extended Partition" with "linux-swap", remember the size of swap (mine is 8GiB
  5. Right click "linux-swap" and click "swapoff"
  6. Then right click "linux-swap" and click "Delete"
  7. Also delete the corresponding Extended Partition
  8. Now we should have "sda1" and "unallocated space"
  9. Right click "sda1" and choose "Resize/Move"
  10. Adjust the size of the primary drive and save, for instance, 8GiB for your swap
  11. Now right click "unallocated space" and create a new partition - choose "Extended Partition"
  12. Right click and select "new" and then choose "linux-swap" partition.
  13. Click the green arrow for applying the changed
  14. Restart the system!

Leave a comment

Your email address will not be published. Required fields are marked *