7

I want to resize the /dev/sda6 to ~50GB. But I can't do this, because the unallocated space is on the wrong position.

How can I move the unallocated space to the right and resize the sda6 partition?

enter image description here

  • Could you please include the rest of the window in the screenshot? If you are running Gparted from a installed Ubuntu, you can't resize the partitions on which it is installed (it can unmount other partitions though), so you need to use a live disk (explained here). You should then be able to move partitions 5 & 6 to the left, and expand partition 6. Note this will likely take a very long time, and copies the data to the start of the disk bit by bit so is quite risky, so ensure you backup stuff beforehand. – Wilf Jun 27 '15 at 19:25
  • I booted the live cd, but where can I move the partition? – ForJ9 Jun 27 '15 at 19:47
  • Moving anallocated space doesn't really make much sense. You can, however, move sda5 and sda6 all the way to the left. The operation may take a while to complete, so don't start if you only have 15 minutes. – mikewhatever Jun 27 '15 at 20:24
2

Especially if you are moving and/or resizing existing partitions, make sure you backup all important data in case it is lost or damaged.

Firstly, if you are running Gparted from a installed Ubuntu, you can't resize the partitions on which it is installed (it can unmount other partitions though), so you need to use a live disk (explained here).

Then you can resize the partitions - one way to do it is to:

  1. Move sda5 to the left (right click and use 'Resize/Move'), so there is unallocated space between sda5 and sda6: visualization1
  2. Then you can move sda6 to the left, so the unallocated space is too the right of it: visualization2
  3. Finally, you can expand sda6 so it fills the space: visualization3

The yellow parts in the GParted visualization represent the data in the partitions - all the data in the partition has to be copied bit by bit when the partition is moved, so it could take a few hours (or even days...), particularly with slower hardware. Corruption of data is possible - if it is paused or interrupted whilst formatting/copying it is almost certain, so ensure the computer is connected to a reliable power supply and not used much (to maximise the resources available - make sure it doesn't suspend etc though). Also, if the partition is a boot partition, the computer may not boot afterwards if the bit with the boot stuff has been damaged, which I think is vaguely possible even with a successful copy.

Relevant documentation:


An alternative method would be use the allocated space by creating a new partition inside it - this is quickest (should take less than five minutes) and also the less risky way, though it may be annoying have data separated between partitions. You can do this by selecting the unallocated space and creating a New Partiton - if you are just using just Linux, then the ext4 format may be best.

You can then select the partition in you file manager (e.g. Nemo, Nautilus, Dolphin, Thunar, etc) to use it: enter image description here

You may need to use this command so you can use it as your normal user:

sudo chown -R $USER:$USER /<path>/<to>/<mounted>/<folder>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.