In this post we have a look at how to resize root disk partion on Ubuntu.
So I had to resize the root disk partition on one of my Ubuntu VM’s.
First I have expanded the .vmdk file as described in my previous post.
Now I had some un allocated Space available.
I thought I would find countless examples of how to do this via command line, but really there was not a lot that seemed to apply, since it was the root drive i needed to expand.
However one guy on askubuntu.com had the following answer which I did not test myself Possible way to expand Ubuntu root drive from command line
However what i did was to use a Tool called GParted.
(Always remember to backup your systems before perfoming operations like this)
- Download GParted live CD
- In my case i was running VMware so I mounted the ISO and booted on it
- Choose default settings (or customize if you need special language or other)
- In my case I ran with the GUI version
- Now take your swap partition and move it to the end of the drive
- Next expand your root drive.
- apply changes and Voila you are done, and your Ubuntu now has more Space available on root drive.
Of course your situation may vary from mine and the steps above needs to be changed in order to fit your environment.