Ubuntu – How to extend partition with free space that is before it using gparted

dual-bootgpartedpartitioning

I have my Windows partition (C), 9GB of free space and then I have my Linux partition. How do I expand my Linux partition with that 9GB of free space using Gparted and without losing everything I have?

enter image description here

If this is not possible, is there another tool (safer one) that I can use?

Best Answer

Option 1:

Moving /boot partition can render unbootable system. So, instead of moving the / (root) partition you can use the partition as a new /home partition. This link explains how.


Option 2:

But if you want to attempt a move, make sure you are backed up and then follow the steps below:

  1. Start GParted in live Ubuntu session,

  2. If you have swap partition(s), right click on it/them and select swapoff (Edit: you can skip this as your snapshot does not show any swap used), snap1

  3. Also unmount (if they're mounted) all the partitions that will be involved in the resize/move operation (by right clicking and selecting unmount from the context menu),

  4. (WARNING: moving /boot partition may cause boot failure!) Now right click your extended partition /dev/sda2 (in your case) and select Resize/Move option, and drag the slider left to cover the unallocated space. Repeat the process with /dev/sda5 to cover the space created in the extended partiton. And then click the Resize/Move button, snap2 snap3 snapWarn

  5. After specifying such move and resize options, from the menu select Edit -> Apply All Operations or click the apply button in the toolbar. The resize and particularly move option will take a long time depending on the size of the files to be moved. So wait patiently. snap4

  6. You should then be done! Reboot to see if every thing is fine. If something went wrong and you're unable to boot, try boot-repair to fix it.

Related Question