Ubuntu: Unable to Expand Ubuntu Partition using Gparted Live USB



Question:

I have 1TB HDD in which 755 GB is Win 7 and 164 GB is ext4 partition out of which 60 GB has Ubuntu OS on it.

A small history: I had dual booted a while ago with windows 7 on my laptop, such that I had taken 64 GB from windows 7 partition and installed Ubuntu in this. Out of this 64 GB, 4GB was given to swap and then rest 60 GB was where the Ubuntu system directory resides.

Sequentially the drives were marked as (inside gparted live):

Win7 ---> ext4(/dev/sda4[this 64 GB])  

Now ext4 is divided into two logical partition

  • /dev/sda5 (4GB) [SWAP]
  • /dev/sda6 (60GB)

Today due to lack of space in ubuntu partition I decided to expand its space, by first resizing the big Win7 partition and taking 100 GB from it and then formatting the resultant unalloacted 100 GB to ext4 partition, and thus was create /dev/sda7 (100 GB) as another logical partition inside /dev/sda4 (which is now 164 GB)

So logically inside /dev/sda4 the partitions are

/sda7(100GB) --> /sda5(4GB)[SWAP] --> sda6(60GB)  

NOW, Gparted was not able to merge /sda6 and /sda7 due to swap in between them and as a result I formatted swap to ext4

/sda7(100GB) --> /sda5(4GB)[NO MORE SWAP] --> sda6(60GB)  

Here is a screenshot:

Gparted screenshot

The problem is Gparted is still not able to merge any of these logical partition together as you can see when i click on /sda6 to resize

NO SPACE IS SHOWN BEFORE IT TO  EXPAND


Solution:1

  1. When trying to resize internal disk linux partition ALWAYS use a LiveCD/USB, because all internal partitions must be unmounted (not blocked by the installed Ubuntu). You are doing that, which is very good.
  2. In GParted, right-click on the swap partition and choose swapoff. You can't resize or move it if it's not off (unused). Then move it out of the way, reposition it before or after the ext partitions.
  3. When trying to merge (any) partitions, make sure they are of the same kind: both either primary, or both logical. To make sure you won't run into trouble, i suggest you first delete one of the two ext partitions, and expand the other to encompass the unformatted space resulted from the deletion.


Solution:2

You can't "merge" partitions in Gparted. You can create, delete, or resize them.

There was no need to format swap partition to ext4.

You need to unmount your sda6 partition, delete sda5 and sda7, then expand the sda6.

Consider leaving space for a swap partition and do not forget to add the new UUID of it to /etc/fstab.

Note: After you move the start of the / partition the system may not boot. You will need to re-install grub.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »