Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question

migrated from Jan 25 '10 at 17:30

This question came from our site for system and network administrators.

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.

share|improve this answer
Yep. Don't know why there can't be a single command which does these steps sequentially for you to create a true move. – demongolem Aug 1 '12 at 13:28
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 Oct 30 '13 at 16:44
Resize/Move is greyed out for me on the extended partition, so this doesn't work for me. – Iain Elder Sep 3 '15 at 13:26
Expand, move inner crap, collapse, expand first crap - didn't think to try that. Amazingly simple. – WernerCD Dec 8 '15 at 20:03

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

share|improve this answer
Thank you. I am accepting this as it answers part of my question. Good to know that there is a cli tool for this. – Anonymous Jan 23 '10 at 19:36

You must log in to answer this question.