2

I am using a dual boot Windows 10 Pro 64-bit with Ubuntu 16.04 64-bit. I am getting a warning as I log in on Ubuntu about low space in the root.

screenshot of partitions in GParted

How can I resize an ext root partition in Ubuntu 16.04?

3

In order to change the root file system you will need to boot from live media, such as GParted Live so that the root file system is not in use. Then you might consider move/shrinking the home partition (sda4) by dragging the left edge of the partition to the right. Then in the unallocated space you could grow the root partition (sda3) by dragging the right edge to the right into the recently freed up unallocated space.

WARNING: Be sure to have a backup of your data in case anything goes wrong due to power outages, hardware failure, or software bugs.

For an example see Moving Space Between Partitions.

0

You reserved quite low space for the root partition – I would use at least 32 GiB. However, it is still possible to resize it now.

Since there is no free, unallocated space on your hard drive, you must decide whether you take some space from your Windows partition (/dev/sda2) or Ubuntu /home partition (/dev/sda4).

Anyway, you have to resize at least one partition the more demanding way – by moving its beginning.

ATTENTION: It’s possible to destroy your data using the partitioning tools. Create a backup of your hard drive before proceeding. I recommend backing up the whole disk using Clonezilla Live.

ATTENTION 2: If any step fails, please let me know using comments. Don’t proceed further until we find what’s wrong!

Partitioning

  1. To access all partitions on your hard disk freely, boot the Ubuntu install disk (USB or DVD) and select Try Ubuntu without installing.

  2. From the live session, run GParted.

  3. Select a partition to shrink. In your case, choose sda2 or sda4 according to your needs.

  4. Select Resize/Move (menu Partition or icon).

  5. Shrink the chosen partition.

    a. In the case of sda2, increase the Free space following.

    b. In the case of sda4, increase the Free space preceding.

  1. Select Resize/Move.

  2. Use the Resize/Move dialog to extend your root partition by utilizing the free space you created in step 5. (In other words, repeat the steps 3–6 with the root partition.)

  3. Select Apply all operations (menu Edit or icon).

Restoring GRUB

After you change the partition containing the /boot folder, you might need to update GRUB, so it can find its data during the following boot of Ubuntu. (However, my testing VM (Xubuntu 16.04) booted fine without updating GRUB as I was trying the procedure while writing this answer.)

You can restore GRUB using the chroot method (manual, command-line, and my favorite way) or using Boot-Repair (semi-automated, GUI tool). Both methods work from the live session.

After you update GRUB, you can leave the live session and (hopefully) boot normally to your Ubuntu installation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.