I'm pretty new to Ubunut and I've just installed Ubuntu on a virtual machine, but allowed too little space for my virtual machine apparently, so I've added 20 gb extra. Now this is what my gparted looks like this: enter image description here

However the 20gb is unallocated, so i've tried to make a new partition but it keeps saying that my space is full for every action that I do. For example, creating a new laravel project. I also can't resize anything. How am I suppose to be able to use this 20gb thats not being used?

  • You have to extend the extended partition (sda2) first, then extend sda5. You can only do that sanely from a LiveUSB though I believe, not while it's mounted. – Thomas Ward Oct 13 '20 at 22:25
  • @Thomas Ward Do not think that would work for a VM, would it? I think you would have to make a new virtural machine with enough space. – crip659 Oct 13 '20 at 23:14
  • Can see if this link helps without having to redo. howtogeek.com/124622/… – crip659 Oct 14 '20 at 0:24
  • @crip659 if it's a VM it can still be altered via gparted boot disk, etc. booted in the VM. VM doesn't mean you have to 'recreate it' to expand partitions, just means it's a little more complex. – Thomas Ward Oct 14 '20 at 3:41
  • @ThomasWard What do you mean? I have just created it and installed some things, but not like there's a lot of stuff on it. Would you recommend me just creating a new virtual machine? If so, I'd still like to know how to actually solve this. – Loko Oct 14 '20 at 8:35

This should be easy to fix. The key to it is you need to boot into a live environment and work on your partitions while they are not mounted. Try the following:

  1. Backup any data you cannot afford to lose
  2. Assuming you have an Ubuntu iso file place it in the VM CD drive and boot the VM from the iso as if you are installing.
  3. Choose Try Ubuntu.
  4. From the live environment run GParted.
  5. Expand sda2 fully to the right. You can drag the right hand edge. You should now have sda5 and the unallocated space inside sda2.
  6. Expand sda5 to fill all the unallocated space.

There are plenty of YouTube videos that show how to use GParted if you’ve not used it before.

Good luck

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.