How to merge this unallocated space to my root partition.
Asked
Active
Viewed 769 times
1
-
1Possible duplicate of [What does it mean for two partitions to be adjacent?](https://askubuntu.com/questions/624616/what-does-it-mean-for-two-partitions-to-be-adjacent) – waltinator May 16 '18 at 04:23
-
The partitions must be adjacent. You'll have to move each intervening partion right, until `Unused` is next you your root partition. – waltinator May 16 '18 at 04:26
-
Did you try booting with a live CD/pendrive, move the partitions so you can increase root partition using the unallocated space? – Pablo Bianchi May 16 '18 at 04:42
-
Possible duplicate of [How to resize partitions?](https://askubuntu.com/questions/126153/how-to-resize-partitions) – karel May 16 '18 at 12:50
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
sda6with a right-click and chooseswapoff - Select the extended partition
sda2with a right-click, chooseResize/Moveand increase the size of this partition to the right. - Select the swap-partition
sda6with a right-click, chooseResize/Moveand move the partition to the right. - Select the data-partition
sda5with a right-click, chooseResize/Moveand move the partition to the right. This will take some time, 66GB of data have to be moved, be patient. - Select the extended partition
sda2with a right-click, chooseResize/Moveand decrease the size of this partition on it's left end. - Select your system-partition
sda1with a right-click, chooseResize/Moveand 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
- 14,911
- 5
- 35
- 67
-
+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
