How to merge unallocated partition to linux partition
Follow these Steps to Allocate the unallocated Space to your linux partition.
It is because GParted does not let you to resize/move the extended partition because of the swap partition that is inside it is on, so you have to switch it off by booting an Ubuntu Live cd and start Gparted.
To Switch off the swap partition :- select "Swapoff" from the extended volume, then you will 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.
P.S. Do take backup before doing these tasks.
You will need to boot from a life CD, e.g. your Ubuntu install media, then
- Use GParted to increase the size of your Linux partition (thereby consuming the unallocated space.
- Run the command
resize2fs /dev/sda5
to increase the file system size of the resized partition to its possible maximum. - Reboot and you should have more free space on your Linux file system.
Warning: Do not move, shrink, or otherwise mess with your partitions. Otherwise, you will lose data and the system may become unusable. It is highly recommended to backup important data before making changes to the partition table.