Ubuntu – Unable to extend partitions using GParted

15.10gpartedpartitioning

I'm on Ubuntu 15.10. My current partition state is as shown in the image.

enter image description here

I had Ubuntu 12.04 installed on a 19.22 GB partition, and I removed it and deleted the partition. Now I want to extend /dev/sda2 to include the 19.22 GB unallocated space that's right after it. However, GParted won't let me do that.

I think it has something to do with the hierarchical way the partitions are presented (the unallocated space seems to be a part of /dev/sda4 somehow), but I have no idea how to solve this.

Best Answer

In order to grow primary partition sda2, the unallocated space must be immediately adjacent. Currently it is within extended partition sda4.

The steps are:

  1. Boot from live media containing GParted, e.g. GParted Live.
  2. Shrink extended partition sda4 to butt up against sda5.
  3. Grow primary partition sda2 into the adjacent unallocated space.

See also Moving Space Between Partitions

Related Question