How can I succesfully merge the two partitions shown using GParted?

Solution 1:

(1)If you delete the extended partition that is there, sda3 in your case, and reinstall it at the end of the drive you will be able to extend the windows 7 partition to use the free space. You could also do this in the other order, delete the partition, extend windows, then re install ubuntu.

(2)You might be able to just move the partitions but that will depend on where you installed grub, on the partition or on the hard disk MBR. I would burn a bootloader such as chimera to a cd in case this dosent work 100%, it will probably allow you to boot into windows/ ubuntu anyway.

Solution 2:

You can't merge a primary partition with an extended partition. You can delete the extended partition, and then spend a lot of time making the primary partition bigger. But then you'll just have a big primary NTFS partition, and you will probably have to spend even more time shrinking it to make room for Ubuntu.

If I were you, I would decide first how big you want your Windows partition. If you want to continue using it, you probably want to make it bigger, since it's nearly full. So, you will need to delete the extended partition. Then you can make the Windows partition to whatever size you want it, and create an extended partition for Ubuntu and whatever other logical drives you want. My advice is do not create any more primary partitions (ever).

If you wanted to switch to Ubuntu as your main system, you could leave things as they are, and install it in the existing extended partition.