0

My GParted image:

My GParted image

I have Ubuntu on dual-boot with Windows, but I started to need more free space for Ubuntu so I shrank the Windows partition (sda2). But I can't use the unallocated space that I have now, because it`s to the left of the Ubuntu partition (sda5) and GParted doesn't allow me to extend it to the left or the right. I can only shrink the Ubuntu partition.

How exactly can I proceed in order to use that unallocated space for Ubuntu?

pomsky
  • 70,557

2 Answers2

1

The Ubuntu partition sda5 is a secondary partition to the primary partition sda4 so you can't resize sda5 beyond the size of sda4

To resize the Ubuntu partition, you must first resize sda4 by extending it into the free space you have created. Then the next step is to extend sda5 to use up the extra spaces in sda4. You can do this in gparted and apply the change in one go.

Here are the steps:

  1. Move the sda3 partition so that the free space is after sda3 (not before it like it is shown now).
  2. Resize sda4 into the free space before it (by extending sda4). Be sure not to select sda5 by mistake as it is just an outline surrounding sda5.
  3. Lastly, resize sda5 to fill up the larger sda4 partition you have created.
  4. Now, apply the changes.

Good luck.

PS: Should backup important stuff in case things go wrong.

pomsky
  • 70,557
Bernard Wei
  • 2,175
  • 1
  • 14
  • 23
0

First of all you can't manage Linux partitions when logged into the system, assuming you're logged in.

Second, editing/resize/move partitions in Linux can be trouble and is not without risk - just a friendly warning.

Solution: insert live cd/usb of Ubuntu with gparted installed or (best) create a gparted iso image and boot into it. Open gparted, unmount the partitions to be edited and select the partition to resize/move. Click the edge of the partition and drag it so it takes up the unallocated space.

Select Edit and Apply All Operations. Reboot, open gparted to check the partitions.

From the info you provided - hope this helps

Have fun