Help with disk partitions - cannot add adjacent free space to my Ubuntu 20.04

I know there are many questions about this topic, but I could not find an answer to my particular case. I have a dual-boot configuration on my 500 GB single hard drive, and I needed to add some space to my Ubuntu.

I have freed 7292 MB of space inside Windows in order to fix that, but now I am in the condition of being unable to add that space to Ubuntu (40 GiB partition), even if the free space appears to be adjacent to my root partition.

Here's a screenshot of my hard disk situation:

enter image description here

How do I add the free space to my Ubuntu partition?


First, are you booted into your Ubuntu system? If so, you can't make any edits to its partition. Reboot into a live system.

In your live system, after you've set the unallocated space, right click on the Ubuntu ext4 partition and click "Resize/Move." You should be able to move the partition to the start of the unallocated space and increase its size.