GParted moving partition from beginning of disk to the end of a disk?
Solution 1:
Partitions must be contiguous (you cannot use two separate disk areas for a single /dev/sda2), so you will first need to move sda3 to the end of the disk, using GParted's "Move/resize" function.
|1|------sda2------| free space |-----------sda3-----------|
Afterwards, use the same function to expand sda2 into the free space in the middle:
|1|----------------------sda2-----------------------|-----------sda3-----------|
However, since sda3 is your system partition, you cannot move or resize it from the same system. You will have to boot from the Ubuntu CD instead.
Moving (or, in rare cases, resizing) partitions can cause all files to be lost – for example, if the power goes out during moving (it takes a long time to move a partition). It never causes physical damage, however.
Solution 2:
grawity's answer is not entirely complete for this question. It is possible to move the contents of partition 2 to the end of the device. Simply right-click and copy the partition, and paste it at the end. After that succeeds, delete partition 2.
It will cause partition 2 and partition 3 to switch in naming. After moving sda2 to the end of the device- sda3 will be renamed to sda2, and sda2 renamed to sda3.
You will need inform the system of this change. If sda2 or sda3 are referenced in /etc/fstab, then you will need to change any references of sda2 to sda3 and sda3 to sda2. Also, you will have to reinstall the Grub bootloader so it knows about the changes.