The easiest way to do this is, booted to the Ubuntu Live DVD or USB flash drive, start gparted, delete partitions sda5, then delete sda2. Then resize sda1 (maximum to the right - leave some room for a swap partition 1x the size of RAM). Then create a new swap partition in the remaining unallocated space. Right click on this new swap partition and issue a swapon
command. Reboot.
In terminal, type sudo blkid
and note (and copy to the clipboard) the UUID of the swap partition that you just created. Then type sudo gedit /etc/fstab
and change the UUID of the swap partition, to the new value you just recorded (paste from the clipboard). Save and Quit. Reboot.
Questions? Problems? Let us know how you do! Cheers, Al