0

I want to merge two partitions into one. I'm currently using Ubuntu on my main drive, which is nvme0n1p5. There's also an unallocated space of about 101 GB next to it.

Basically I want to merge this unallocated space with my main Ubuntu partition, however the unallocated space doesn't have a delete option and I'm not sure how to proceed.

Screenshot of Gparted window

karel
  • 122,292
  • 133
  • 301
  • 332

2 Answers2

3

Delete Unallocated Space?

Unallocated space is empty and there is nothing to delete.

Merge nvme0n1p5 and unallocated space?

You can't merge partitions. You can't merge a partition with unallcoated space. There is not "merge" option in Gparted. What you can do is "make the nvme0n1p5 bigger to fill the unallocated space" using using the context menu for the partition and select "Resize/Move". Currently two things prevent you from doing this.

First Problem: The partition nvme0n1p5 must be next to the unallocated space

Note the unallocated space is not next to nvme0n1p5, the Ubuntu partition. It is next to nvme0n1p4, an NTFS partition. From the Screenshot of Gparted in the question, the order of partitions and unallocated space looks like:

  1. nvme0n1p1
  2. nvme0n1p2
  3. nvme0n1p3
  4. nvme0n1p5
  5. nvme0n1p4 <-- in between the two!
  6. Big unallocated space
  7. nvme0n1p6
  8. Little unallocated space

You can use Gparted to move nvme0n1p4 to the right next to nvme0n1p6. However, it is safer to used Windows to manipulate Windows (NTFS) partitions. I recommend you use Windows to move nvme0n1p4 to the right next to nvme0n1p6 using Windows tools. You want the partitions to be ordered like this:

  1. nvme0n1p1
  2. nvme0n1p2
  3. nvme0n1p3
  4. nvme0n1p5
  5. Big unallocated space
  6. nvme0n1p4 <-- Out of the way now!
  7. nvme0n1p6
  8. Little unallocated space

Second Problem: Partitions cannot be resized or moved when they are in use in Ubuntu

When you boot your computer to Ubuntu from the internal SSD, the boot process mounts nvme0n1p5 and uses it. While Ubuntu is running, trying to resize the Ubuntu partition is like trying to change the tire of your car while you are driving the car. The car cannot be moving when you change the tire.

Boot from Ubuntu Live USB you used to install Ubuntu. Use the Try Ubuntu option (Do not install Ubuntu). Make sure the nvme0n1p5 is not mounted. Expand nvme0n1p5 using Gparted. Click the Green Check Mark in Gparted to apply all changes.

See How to resize partitions? for more details.

Hope this helps

user68186
  • 37,461
0

What I did

  1. I had Ubuntu on my primary partition (ext4, approximately 174 GB) and 101 GB of free space alongside a tiny NTFS recovery partition (651 MB). I needed to combine that 101 GB with my Ubuntu partition.

  2. I first booted into Windows and installed MiniTool Partition Wizard (you can't do this with Windows's Disk Management tool).

  3. I also observed that the unallocated space was not immediately after the Ubuntu partition since there was a 651 MB NTFS recovery partition between them.

  4. So, I removed that 651 MB NTFS partition (it was not that crucial), which put the unallocated space immediately after my Ubuntu (ext4) partition.

  5. I then booted into Ubuntu via a bootable USB drive, opened GParted, chose the Ubuntu partition, and resized it to encompass the unallocated space.

I clicked Apply, waited a couple of minutes, and I was finished.

My Ubuntu partition is larger now, and I didn't even touch my Windows boot or key. It all works perfectly. ✅

Still don't understand the move.....

Picture: enter image description here

user68186
  • 37,461