I'm using Ubuntu 20.04 and during the installation process I opted for manual partitioning, and I chose to keep root and home separate. So at the end, I obtained this configuration:
- 650 Mb EFI partition (sdb3)
- 20 Gb root partition @ / (sdb4)
- 10 Gb swap partition (sdb5)
- about 650 Gb partition (remaining free space) @ /home (sdb6)
Now I noticed that 20 Gb could be too little for root partition as this partition is already full for 80% of his dimension, so basically I may have been wrong to reserve only 20 Gb for it. I have to say that, at the moment, I haven't particular problems with this configuration but maybe I could face them in the future.
Can I resize the root partition taking some space from home partition? As I see here How to resize partitions? I must use Gparted from liveUSB since it is not possible to modify mounted partitions, but as I explained home and root partitions aren't close to each other (there is swap partition in between). Is this a problem?
NB.: There isn't free space or unallocated space on sdb.
Additional informations: This is a dual boot stystem (on two different drives, win 10 is on sda). I did not mention "sdb1" and "sdb2" because before installing Ubuntu on "sdb" I chose to create (from win 10) a shared ntfs partition for both OS, here called sdb2, while sdb1 is an automatic generated partition labeled "Microsoft reserved partition"
You'll have a worry free resizing only if you have unused space in between root and home. As far as I know the newest Ubuntu which is 20.04 can work without a swap partition as it's able to do the same with swap file. I don't know much in detail though. So you can remove the swap partition and extend the root by another 10GB which is released from swap. This would be the easiest for you. Another solution is to take a backup of /home. Then delete swap and home and do a re-partition. This can be done running the Live CD and once partitioning is done, you can copy data back to /home. As a thumb rule, when you partition your disk instead of allocating the space at the beginning of the unused space, you may use end of the space. This will help you easily resize the root partition in future.
Consider a 200 GB disk
Hope this helps.
Resize root and Home partitions
Boot from Live USB
GParted:
Shrink /home partition 20GB to the right.
Delete swap partition.
Expand root partition 30GB to the right.
Terminal
sudo swapon -a
sudo swapon -s
- to confirm swapfile is in useEnable Hibernation: How to enable hibernate on ubuntu 20.04 LTS