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?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
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:
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.
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:
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>