This is my GParted view.
There is a 100GB of unallocated space at the very top. I want to add that space to /dev/nvme0n1p1
or the /
which is shown locked. I already searched online but most of the solutions had linux-swap
partition involved somehow. I seem to have a swap
file instead. Also it seems the order of these partitions as shown in GParted matters. Now, I want to safely add that extra space, i.e. without any data loss.
Asked
Active
Viewed 1,545 times
2

Archisman Panigrahi
- 28,338
- 18
- 105
- 212

GX_V
- 23
-
3Does this answer your question? How to resize partitions? – user535733 Mar 06 '21 at 14:40
-
1Another alternative is to move /home to the new partition. To move /home uses rsync- Be sure to use parameters to preserve ownership & permissions https://help.ubuntu.com/community/Partitioning/Home/Moving – oldfred Mar 06 '21 at 14:48
1 Answers
2
The solution to this is quite straightforward. You will need:
- A backup of any data you cannot afford to loose.
- The means to boot into a live environment. The Ubuntu install media is perfect.
The steps are as follows
- Boot into Windows and use the disk management tool to move the approximately 76GB VOLUME to the start of the disk. This will move the unallocated space next to your approximately 49GB Ubuntu root partition
- Boot into the live environment (Try Ubuntu not install Ubuntu if you are using the Ubuntu install media)
- Using GParted resize the approximately 49GB partition making use of the 100GB of unallocated space.
That’s it reboot into your enlarged Ubuntu install.
Good luck!

PonJar
- 1,868
-
1You should move the Ubuntu partition left (into the newly freed space), then expand it right, to avoid losing the filesystem at some random offset into the partition. – ubfan1 Mar 07 '21 at 03:29
-
-
@GX_V if my answer was successful for you please accept it. It will help others find answers that worked. – PonJar Mar 13 '21 at 12:56
-
So basically, I booted from a live USB and opened GParted. At first, I moved
/dev/nvme0n1p3
to the left of the 100GB unallocated space. Then I moved/dev/nvme0n1p1
to the left of 100GB as well. So/dev/nvme0n1p1
was sandwiched between the two. Then I extended it to the right covering the entire 100GB space. Hence,/dev/nvme0n1p1
totalled approx 150GB. – GX_V Mar 13 '21 at 13:33