Linux Partitioning – How to Merge Unallocated Partition to Linux Partition

gpartedlinuxpartitioningUbuntu

I have a windows partition which was 500gb, then i installed ubuntu with a 40gb partition, now i am short of space, so i booted my ubuntu14 live cd and shrunk my windows paritition and got 88gb free unallocated space.

Now i want to merge this 88gb unallocated space to my linux parition.

What have I tried :- I tried to Move/resize this unallocated space from live cd, but it is greyed out.

What I want :- How to merge this unallocated space to my linux partition such that my 40gb linux becomes (40+88) 128gb single partition.
enter image description here
enter image description here
enter image description here

UPDATE:- I needed the 88 gb so i reshrunk it to 44 gb and gave it back to windows, now the unallocated space is 44gb, and all the screenshots are taken from Gparted by live boot. So you can see the options provided.

UPDATE 2:- I was not able to re-allocate because of the swap on, thanks to harrymc, I got the idea what Daniel was trying to say.

Best Answer

It is because GParted does not let to resize/move the extended partition because of the swap partition that is inside it, as it may consider the swap as mounted.

Try to right-click the swap partition and to select "Swapoff", to be able to move the extended partition. You might need to use "Edit → Apply All Operations" for Swapoff to have effect.

After this you can shift the unallocated space inside the extended volume, then resize the /dev/sda5 volume to add the unallocated space.

Related Question