I have 3 partitions in this order, 100gb (sda5,lba), 132gb(sda2,boot) and 230gb(sda3). sda5 is unused, sda2 is Windows and sda3 is Ubuntu. They are shown below:

enter image description here

I want to merge the first and second (sda5 & sda2) partitions but GParted can't merge 2 partitions if the unallocated space is before the partition to merge with. Can I move sda5 with GParted? Does it have to be unallocated to move it? I have looked at GParted help but I'm a bit confused by it. Is there another program I could use that can merge with preceding partition?

Any help would be greatly appreciated.

2 Answers 2


It would be helpful if you were to post a snapshot of gparted showing your sda drive, as I suspect that your description may not be complete.

Just to confirm, what you want is to make your Windows partition larger, and that sda5 is empty and can be deleted to make it truly unallocated, yes? If yes, then it's possible to do what you want, but I'll caution you... BACKUP BACKUP BACKUP first. Moving data and partitions around can be risky, so be prepared.

I'll also caution you that any time you mess with a Windows partition, it'll probably not boot into Windows the first time without some help. You'll want to have boot-repair, and a Windows install disk ready, just in case.

Based just on what you've told us so far, a brief outline of what you'll need to be prepared to do is:

  • install boot-repair (using Synaptic) in Ubuntu (this will be used to fix booting issues)
  • if boot-repair is not available in Synaptic, you'll have to start the Terminal app from the Dash, and enter the following, as separate lines:

    sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

    sudo apt-get install -y boot-repair

  • start "Boot Repair" from the Dash just to make sure it works, then quit it
  • start gparted from the Dash in Ubuntu
  • use gparted to delete sda5 and sda1 to make it truly unallocated space
  • use gparted to move sda2 all the way to the beginning of the drive
  • try to boot into Windows now (and here's where you may have trouble, and may need to use boot-repair from Ubuntu, or use a Windows install disk running in repair mode)
  • once Windows is booted, you'll want to start the Disk Management program, and EXTEND the Windows C: partition

Are you ready to do this, or is it too much, too scary? More detail available on request.

  • The word "GParted" in my post is a link to the GParted image. I'm not "allowed" to post images yet! Boot-Repair doesn't fix Windows boot issues and NOTHING of what you've said is scary but doesn't answer anything either. Please check the GParted link and read the q's
    – Babsky
    Aug 6, 2016 at 16:51
  • OK, I see your gparted image link now. You might wish to put "and here's a gparted image of my disk configuration" next to the now unmarked link. I do believe that I've answered the question. I've given you a pretty specific outline of the steps, told you what resources you'll need to have, told you what applications you'll need to use, and I've been careful not to exceed the unknown level of Linux experience of the user. What more information can I provide for you?
    – heynnema
    Aug 6, 2016 at 18:05
  • The original question is about merging partitions but I guessed i'd have to move sda2 as it follows sda5, unless It can be done with something other than GParted. It's the moving part of GParted help I wasn't sure about.
    – Babsky
    Aug 6, 2016 at 18:19
  • You don't merge partitions. You delete and move partitions. Gparted is the best/easiet tool for the job. To move a partition in Gparted, you select the partition you wish to move, go to the Partition menu and choose resize/move, then place the hand pointer in the middle of the sda2 partition, and graphically slide the partition all the way to the left.
    – heynnema
    Aug 6, 2016 at 18:25
  • ps: don't use gparted to resize the Windows partition. Use Disk Management under Windows to extend the Windows C: drive partition.
    – heynnema
    Aug 6, 2016 at 18:32

Using GParted I removed the flag from sda5 as it couldn't be deleted with it, deleted sda5 and sda1 to make them unallocated. Then selected sda2, selected partition>resize/move then moved the slider all the way to the left, effectively merging the two partitions into one. I updated the grub manually. No need for Boot-Repair, no need to boot into Windows. So where ever it was I read GParted can't merge with a preceding partition was probably old because it can!.

  • You did it almost the way I suggested above... but... I'll bet that you can't boot into Windows right now... you changed the Windows partition geometry just the way I said not to... using gparted, instead of doing it from Windows... and Windows doesn't usually like that... please report back.
    – heynnema
    Aug 9, 2016 at 0:10
  • And just to correct your last sentence... you didn't merge two partitions. After deleting sda5 and sda1 and thereby creating unallocated space, and then you resized sda2.
    – heynnema
    Aug 9, 2016 at 12:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .