10

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.

8
  • You can't resize the Ubuntu partition while it's running. Also, even when you're trying to do the thing in a Live CD, you have to mount the ext4 partition.
    – Star OS
    Dec 19, 2015 at 8:28
  • @StarOS what do u mean by mount ext4 partition ?
    – penta
    Dec 19, 2015 at 8:39
  • Just select your Ubuntu partition (which is probably a ext4 filesystem one), and mount it. There should be an option to mount it somewhere in GParted.
    – Star OS
    Dec 19, 2015 at 8:40
  • there is unmount option, not mount
    – penta
    Dec 19, 2015 at 8:42
  • Then it's already mounted.
    – Star OS
    Dec 19, 2015 at 8:45

2 Answers 2

4
+50

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.

1

You will need to boot from a life CD, e.g. your Ubuntu install media, then

  1. Use GParted to increase the size of your Linux partition (thereby consuming the unallocated space.
  2. Run the command resize2fs /dev/sda5 to increase the file system size of the resized partition to its possible maximum.
  3. 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.

8
  • If i do resize2fs /dev/sda5 how will the system know from where to take the space ?
    – penta
    Dec 23, 2015 at 7:48
  • @penta, yes, per default resize2fs expands the file system to its whole partition.
    – Black
    Dec 23, 2015 at 9:09
  • how will it take the unallocated space as an argument and merge with the linux partition ?
    – penta
    Dec 23, 2015 at 9:14
  • It just takes the partition as argument (at least in your use-case). The merge of the unallocated space into the partition happens in step 1 of my answer. Therefore, resize2fs only detects that the file system is smaller than the partition it resides on and expands it to the partition boundaries. (Side note: This functionality MAY be integrated into GParted, but I am not sure and calling resize2fs does no harm.)
    – Black
    Dec 23, 2015 at 9:18
  • as you told "Use GParted to increase the size of your Linux partition (thereby consuming the unallocated space." i actually cannot use gparted to increase the size, see pics
    – penta
    Dec 23, 2015 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .