How to move a partition to the end in gparted?

24

6

I can't find a way to move the partition /dev/sdb2 to the end, where 12GB are free.

enter image description here

I can resize (expand) the partition, but not create (insert) any free space in front of it.

How to do the trick?

(There are 2 small black arrows on the top of the popup window in the screenshot at the side of the blue box that represents the 400 GB sdb2 - I can only move the right arrow to the right, which extends the size, but I cannot move the left arrow. When I enter something in the free space preceding box it is always reset to zero by the programm immediateley)

I hope I explained this well enough, please feel free to ask for details.

This is serious for me as I am expanding a live image.

Maybe there is another solution with linux commandline tools ?

matnagel

Posted 2010-01-23T17:44:11.827

Reputation:

Answers

33

I found out how to move the 400MB swap partition.

The swap partition is within a 400mB extended partition

1) Extend the size of the 400 MB extended partition so that it takes the whole space until the end of the disk.

2) Move the 400MB swap partition to the end of the now very big extended partition.

3) Resize the extended partition so that it is only 400MB again by sliding the left arrow which is now free to move.

The reason for my problem was that I wanted to move the extended partition and the swap partition that was within it at the same time, but it has to be done in the steps described here.

matnagel

Posted 2010-01-23T17:44:11.827

Reputation:

Resize/Move is greyed out for me on the extended partition, so this doesn't work for me. – Iain Samuel McLean Elder – 2015-09-03T13:26:32.483

Expand, move inner crap, collapse, expand first crap - didn't think to try that. Amazingly simple. – WernerCD – 2015-12-08T20:03:15.363

5Yep. Don't know why there can't be a single command which does these steps sequentially for you to create a true move. – demongolem – 2012-08-01T13:28:14.133

You are right @demongolem, I don't know why... I had to Google because even if GParted is a great tool, but things like that are not very intuitive, at least not for me. – Rubens Mariuzzo – 2013-10-30T16:44:14.377

2

Have you looked at parted? It has a move command.

Paused until further notice.

Posted 2010-01-23T17:44:11.827

Reputation: 86 075

Thank you. I am accepting this as it answers part of my question. Good to know that there is a cli tool for this. – None – 2010-01-23T19:36:45.473