You can't resize sda5
because there is no adjacent free space that you could assign to it. You have to move sda6
, sda7
and sda8
out of the way.
sda6
looks like a Windows recovery partition. From my experience moving these can result in inability to boot into recovery. In such case you'd have to use a Windows flash drive for any recovery. You can try to fix it with the reagentc
command in Windows Command Line later, but I won't guide you through this. Just run it before dealing with partitions and take a screenshot or make notes before you proceed. You'll want to recreate those settings later if recovery breaks.
Both sda6
and sda7
can be moved with GParted. If I remember correctly, older versions of GParted don't allow moving swap partitions such as sda8
. However the version provided with Ubuntu 19.04 can do that, so you can boot it from USB if your version turns out problematic.
Data partitions (sda5
, sda6
, sda7
) will have to be unmounted to work on them. The swap partition (sda8
) must be currently unused. This can be achieved by booting from USB or by using the command sudo swapoff -a
to disable swap until reboot.
Start moving partitions with sda8
, then proceed to sda7
and sda6
. Finally resize sda5
to desired size. GParted will let you batch operations, but in my experience it sometimes causes unhelpful error messages or leaves small gaps of unused space between partitions, so I'd recommend moving them one by one, applying changes after each operation.