This is a problem I'm facing because my root space is running low.

- 74,764

- 1
-
1Please, instead of relying on a screenshot, copy-paste the terminal output into your post. – Levente Nov 30 '23 at 16:22
-
2Does this answer your question? How to resize partitions? – guiverc Nov 30 '23 at 20:45
1 Answers
Yes, you probably can, but not from your currently booted system. One CANNOT mess with a disk's partitions while any of the disk's partitions is mounted.
Backup your system before you start.
You'll have to boot from your install medium in "Try Ubuntu" mode, or a Live distribution. You can download a purpose-built distribution from https://gparted.org/ which also has documentation.
Ensure that your system is plugged in. This is not something to do on bsttery power.
Once booted, run gparted
.
Use the box at the upper right of the gparted
screen to select your disk. Be sure to pick the right disk.
Select the sda3
partition (the donor). Slide the left edge of sda3
to the right, creating available (unallocated) disk space between sda3
and sda2
. This is the space to be donated, I recommend 20GB, at least. You don't want to do this procedure often.
Select the sda2
partition (the recipient). Slide the right edge of sda2
right to cover the unallocated space.
Take a calming breath, and inspect what gparted
is about to do. There's a lot of disk block juggling, be prepared to wait.
Click the checkmark to start the process. You can either watch gparted
grind, or go out and play.
When gparted
finishes, look at the gparted
resultd, shutdown your system, remove the gparted
boot medium, and reboot.
Read man gparted parted
.

- 36,399