I am in a frustrating situation - no matter how I try, gparted won't let me assign the empty space to the first partition:The middle partition is blocking me from expanding /dev/sda1. I need to move partition /dev/sda2 to the end of the drive, like so (fabricated image):Then I will be able to expand first partition:How to do that? I assume data from /dev/sda2 must be physically copied to end of the drive.
Move free space from end of the drive to first partition with gparted
partition;disk;gparted
Select the second partition, Partition menu->revize/move, and drag it to the end of the free space. Then, for the first partition, Partition menu->resize/move, and drag the right-hand side to the end of the free space. Both partitions will need to be unmounted - if you cannot unmount one of them (e.g: because it is your root partition), use a Live CD with GParted (e.g: Ubuntu) and resize them that way.