How to merge this unallocated space to my root partition.
Asked
Active
Viewed 814 times
1
1 Answers
1
First of all, editing partitions always comes with the risk of data loss, so please back up your system first. If you use a laptop, make sure your power supply is connected properly, you don't want to run out of battery while performing such actions.
You can't edit partitions while they are mounted, so you have to boot from your installer medium (USB,DVD) and choose the Try Ubuntu without installing
option. Then open GParted. Now perform the following steps:
- Select the swap-partition
sda6
with a right-click and chooseswapoff
- Select the extended partition
sda2
with a right-click, chooseResize/Move
and increase the size of this partition to the right. - Select the swap-partition
sda6
with a right-click, chooseResize/Move
and move the partition to the right. - Select the data-partition
sda5
with a right-click, chooseResize/Move
and move the partition to the right. This will take some time, 66GB of data have to be moved, be patient. - Select the extended partition
sda2
with a right-click, chooseResize/Move
and decrease the size of this partition on it's left end. - Select your system-partition
sda1
with a right-click, chooseResize/Move
and increase the size of the partition to the right.
After each step click the Apply
-button (the small green check-mark in GParted's toolbar).

mook765
- 15,925
-
+1. This should work but there is a risk, which you say. So there should be a backup. And if there is a backup (backed up files), I think it would be easier and faster to remove the content of the extended partition, and then the extended partition will be very easy to shrink and/or move and use the created unallocated space near the root partition to grow that partition. Afterwards it is easy and fast to create logical partitions again and copy back the data. The swap partition can be created (and needs no restore of data). But make its UUID match the swap line in the file
/etc/fstab
. – sudodus May 16 '18 at 19:53
Unused
is next you your root partition. – waltinator May 16 '18 at 04:26