0

I have free space on the disk but I can't add that space to the ubuntu partition, gparted doesn't let me resize the ubuntu partition at all.

I'm running the livecd 14.04 LTS, my ubuntu version is 15.04

gparted screen shot https://i.stack.imgur.com/UHfQM.png

Edit:

sda1 and sda2 are the windows partition sda3 is my data partition

I want to shrink my data partition (sda3) by around 50gb and add that 50gb to my ubuntu partition (runnning low on space frequently)

I can't add that free space to the sda4

Current state: https://i.stack.imgur.com/BbBHm.png

Solved:

The free spaces must be next to the partition you want to resize, and all the partitions must not be mounted, even the swap partition (select swapoff)

Gabriel
  • 23
  • Which partition do you want resized? /dev/sda5 is the Ubuntu partition. Why resize it? – mikewhatever May 01 '15 at 14:38
  • I need more space to my ubuntu partition, I want to shrink my data partition (sda3) by around 50GB and add that 50GB to my Ubuntu partition – Gabriel May 01 '15 at 14:40
  • Not really a strict duplicate as the problem was swap was mounted. None of the accepted answers addresses swap ;) – Panther May 01 '15 at 16:06

1 Answers1

0

You have to do this in steps, not all at once, and you need to move any free space you want to add next to the partition(s) you want to add space to.

First, you need to turn swap off, you can do this from the gparted menu.

Next add the free space to the extended partition (sda4) -> apply changes.

Then you need to move the swap partition so the free space is adjacent to the ubuntu partition (sda5) -> apply changes

Then add the free space before the ubuntu partition -> apply changes

Then add the free space after the ubuntu partition -> apply changes.

Panther
  • 102,067
  • Why cant he just queue the tasks and apply changes at one go. – Rumesh May 01 '15 at 14:53
  • How can I move the free space next to the extended partition sda4? http://i.imgur.com/HsMWFpJ.png – Gabriel May 01 '15 at 14:54
  • I am not entirely sure since I haven't really worked with the extended partition before but this answer seems like it should work, to add the small unallocated space(6gb) you will have to move the swap partition – Rumesh May 01 '15 at 14:57
  • @RumeshSudhaharan - because gparted will not do all the changes in one step – Panther May 01 '15 at 15:45
  • @Gabriel - You hvae two free spaces (unpartitioned). You have to be more specific where you have a problem , but gparted is all menu driver, copy, paste, move ... See http://gparted.org/display-doc.php?name=help-manual#gparted-move-partition – Panther May 01 '15 at 15:46
  • @bodhi.zazen gparted allows you to queue some of the tasks together. So isnt it possible just to tell gparted what to do and click apply changes once. – Rumesh May 01 '15 at 15:48
  • @bodhi.zazen My swap partition was on, that was why I was unable to resize the whole extended partition sda4. – Gabriel May 01 '15 at 15:53
  • great, I forgot the Ubuntu live CD automaticaly mounts swap. They make a gparted live iso that does not do this, but it is a separate download. – Panther May 01 '15 at 16:04