Resizing a root partition on Elementary OS

May 14, 2020

I've been using Elementary OS for just over 4 months now:

When I installed it, I created a second partition on my drive after shrinking the size of my Ubuntu partition. Now that I haven't used my Ubuntu partition for months, and after running into some “disk pressure” issues while using Kubernetes, I thought I'd remove that partition and resize the Elementary partition to fit the entire drive.

Deleting the Ubuntu partition was simple enough using the Disks app, but then I realised that while I could shrink the Elementary partition, I could not enlarge it when it was mounted as the root partition. I used Balena Etcher to write the latest edition of Elementary OS onto a USB flash drive and rebooted. It took me a while to figure out that I had to press F2 to set the boot order correctly in order to boot from the flash drive. Once running the Live version of Elementary OS, it was very easy to run the GParted partitioning tool, drag the sliders to make the partition fit the entire drive, and click Apply. Not an fdisk in sight.

Even though everything was so easy, it was still pretty nerve-wrecking to wait half an hour for all my data to be copied across the drive. After I came back from a short 30 minute walk, I could reboot into the resized partition and everything was working as expected. Phew! 😅️