Resize root disk partion on Ubuntu

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 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)

  1. Download GParted live CD
  2. In my case i was running VMware so I mounted the ISO and booted on it
  3. Choose default settings (or customize if you need special language or other)
  4. In my case I ran with the GUI version
  5. Now take your swap partition and move it to the end of the drive
  6. Next expand your root drive.
  7. 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.