1

So I'm on a dual boot machine and was wondering if there was any way I could expand the root partition (Booted into Windows or Ubuntu) because I accidentally allocated too little space when setting up. Here's a Gparted screenshot. I just want to know if I am able to allocate some of the memory in the unallocated area to root, thanks in advance.

3
  • Adding space to sda2 would be very easy. Adding space to sda4 very hard and messy. As in answer, can make a data partition or there are ways to separate out /home from /root and have separate /home partition from root. You seem to not have much data, so the easiest way would be to back up and do a new install either keeping partition sizes or redo sizes.
    – crip659
    Jul 28, 2020 at 14:45
  • Yes you can... but first tell me... did you delete Windows? Are you ever going to reinstall Windows? You have 712G of unallocated space. How much do you wish to add to root? Your Ubuntu partition is not full now... what is the reason to increase it's space? What is the 32G NTFS partition used for?
    – heynnema
    Jul 28, 2020 at 18:19
  • I don't recommend doing the /home or /data partitions that others are recommending.
    – heynnema
    Jul 28, 2020 at 18:22

2 Answers 2

0

That depends on what you want your system to do.

Many would be happy with your setup, and would use the unallocated space as a /data partition for example. This would have the advantage that it is completely independent from the operating system.

If you want to store all your data in /home, then you might run into problems. Some data intensive programs store a lot in /tmp, and this might need more space than the ~170 GB you had for your entire system.

If you want to create a partition /data, you can do that in gparted and then mount it using the file

/etc/fstab

You can attribute unallocated space to enlarge your root but I wouldn't recommend it, as it is complex and hacky. If you need to do this, I would reinstall.

0

I agree with colindaven, please think twice if you really need to enlarge the root partition instead of making a new "my_data" NTFS partition in the free space (it will be available both in Ubuntu and Windows).

If you want to do this anyway, first it's recommended to backup your important data, just because managing partitions is always risky (though I've never had real problems with it, but I recommend to make a backup).

Root partition can't be moved while you are booted from it, so you'll need to boot from another Linux system — the easiest way is to use the default app "Startup Disk Creator" to make an Ubuntu Live USB and then boot from it. When booted from Live USB, run Gparted and do the following:

  1. right-click /dev/sda3 partition, select "Resize/Move" and move it to the very left edge (move in the figure at the top of Resize/Move window), click Resize/Move, then click Apply;
  2. right-click /dev/sda4 partition, select "Resize/Move" and resize it to fill the unallocated space, click Resize/Move and then Apply.

These operations sometimes take a long time (up to dozens of minutes).

Reboot from internal drive and check it.

1
  • Would google on moving EFI partition first, so you have an idea of what to do if there are problems booting up again.
    – crip659
    Jul 28, 2020 at 15:31

Not the answer you're looking for? Browse other questions tagged .