I've read lots of topics about this recently, but I got stuck every time trying to extend my partition. I booted from USB, chose Swapoff on linux–swap, but can not resize sda5, where my Ubuntu is.

The unallocated space was created on Windows and I think the problem is that that freespace is not inside of my sda4.

Is there a way to "move" it there? Or what should I do?

This is what I see:

enter image description here


sda5 is an logical partition in your setup. It lives inside the partition sda4, which is the so called extended partition. This is a scheme left over from the traditional MBR way of doing things...

Adding space at the beginning of a partition means you have to rewrite the header of the partition.

gparted can do this. I did this on a virtual machine, with slightly different sizes, but the process should be more or less the same.

There is a very real risk that you will loose data! Do a backup!

enter image description here Start by moving sda3 to the beginning of the free space, by selecting Partition -> Resize / Move

Select the sda4 drive, and select Partition -> Resize / Move again: enter image description here

Move it to the beginning of free space. This should put the unallocated space inside the extended partition: enter image description here

Finally, you can Resize / Move the sda5 partition:enter image description here Hit apply to actually apply the operations

This can not be done from the running system. You have to boot from a Live CD / Live USB to move the system partition.

|improve this answer|||||
  • 1
    first sda5 is a logical drive not an extended partition, sda4 is the extended partition, second, he can not move or change the size of sda4 because sda3 is in the way, and since it is an NTFS partition he should move sda3 from within windows. – ravery Nov 3 '17 at 21:35
  • 1
    @vidarlo, your answer is a good attempt, and you can improve it according to ravery's comment, so that it will become a good answer. Good luck :-) – sudodus Nov 3 '17 at 21:40
  • @sudodus yes, I obviously missed that NTFS partition :\ – vidarlo Nov 3 '17 at 21:55
  • @vidarlo, have you considered the problem of moving the head end of the boot partition? I think you can mention, that the grub bootloader needs to be reinstalled (and link to a description how to do it). – sudodus Nov 3 '17 at 22:00

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.