Ubuntu – Increase Root Partition Size

diskpartitioningroot

I want to increase size of my root partition /dev/sda1 but I'm not able to do so either with GParted or with Terminal.

  1. On Terminal It gives the following error:

    The filesystem is already 4718592 blocks long. Nothing to do!

  2. On GParted it doesn't give me any option to increase the disk size.

  3. Use Gparted Live same result as Point 2

screenshot

Best Answer

What you are trying to do does not work from within a running system ... so follow these steps :

  • Boot from a GParted Live media, either GParted Live or Ubuntu Live media.
  • Right click the swap partition and select swap off in case it is mounted.

  • As there is no data on sda2 and sda5, first delete sda5 and then sda2.

  • Resize sda1, right click the partition and select Resize/Move to increase it.

  • Now create a new linux-swap partition from the unallocated free space.

You have to update the UUIDs of the partitions in the /etc/fstab file afterwards.

Open a terminal and execute : sudo mount /dev/sda1 /mnt

To correct the UUID entries in the fstab file execute : sudo blkid

Open another terminal and execute : sudo gedit /mnt/etc/fstab

Replace the UUID entries of sda1 (in case it is different) and sda2

(with those entries of the output given from the blkid command).

Shutdown, remove the Live media and boot the operating system ...

Related Question