How can I merge two unallocated spaces?

I have got a new laptop with Windows 7. It has a 500gb HDD and it is partitioned to 3 volumes. Now I want to install Windows 8 in it. I shrunk 2 volumes (D: & E:) to get the enough space for installing Windows 8, but I have got two different unallocated spaces.

I want to merge those two unallocated spaces. How can I do that?

I did not find any option to merge them.

Volume  Volume Before Shrunk  Amount Shrunk  Unallocated space
  D       132GB                 32GB           32GB
  E       132GB                 32GB           32GB

How can I merge these two unallocated spaces to install Windows 8 in that combined space?


You can easily resize and move partitions using PartedMagic.

Easiest way to get started with PartedMagic is to prepare bootable USB stick. Download unetbootin, choose Parted Magic from drop-down list, insert USB stick (1GB+), and create new Parted Magic live USB:

make PartedMagic using unetbootin

Once USB stick is ready, boot from it, resize your partitions as you see fit, and move them around. Depending on partition sizes, this process can take a while (1-2 hours).

Typically it works great, but one word of caution: backup critical data in case something is screwed up. Also, avoid moving Windows bootable partition if you can. It typically works, but moving only secondary partitions is much safer to avoid nasty surprises. In my experience, probability of losing data using PartedMagic is low, but not 0. To date, I did this many, many times, but lost data just once.