I don't quite agree with @gronostaj's answer. What you are asking is quite possible to do (although it involves risk of data corruption, so make backups before proceeding).
In my method, I will bring the unallocated space to the left-most (top-most) section of my Extended Partition. After that is done, I will resize my Extended partition to leave out the unallocated space contiguous to sda1
.
My method goes something like this:
- First, boot from a separate GParted/PartedMagic CD/USB.
- Then, using
gparted
:
- Resize
sda6
to include all of your Unallocated Space.
- Resize
sda6
again to leave out your unallocated space to the left of sda6
.
- Then, resize
swap
to include unallocated space in that, and then resize it again to leave out the unallocated space to the left of swap
.
- You will now finally have your unallocated space to the top-most/left-most section of your extended partition.
- Now, resize your extended partition to leave out the unallocated space.
- The left out unallocated space will now be contiguous to
sda1
. Huzzah!!