I'm using Ubuntu 22.04.2 LTS. Below is my current partition table configuration. Initially, I allocated 37GB for the root partition and left the remaining space for the home partition. However, I have realized that the root partition requires more space nowadays.
One mistake I made was not creating an extended partition, which complicates the resizing process. My plan now is to shrink the home partition and use that space to extend the root partition. However, the swap partition is located in between, posing a challenge.
To address this, I intend to follow these steps:
- Disable the swap partition using the
swapoff
command and remove it from the operating system.
- Boot the system using a live USB so partitions aren't used and I can alter them.
- Delete the sda3 partition using
gparted
- Utilize
gparted
to shrink and move the home partition (sda4).
- Extend the root partition using the freed space.
- Create a new swap partition.
- Reboot into the operating system and activate the new swap partition using the
swapon
command.
While this plan seems viable, I would appreciate any advice or alternative approaches that could help ensure a smooth and error-free process. Thank you.
P.S
The reason I used a seperate home partition is to reinstall OS in case of a catastrophy but to keep the user data safe but in this point I really would like to avoid that and just make space in the root partition.