How to increase root partition?

Hi, is it possible increase my root partition / with gparted?

Currently looks like this:

I have 60GB but I would like to extend to 100/120GB using the unallocated space.

Someone could guide me. I was searching in google and youtube but I prefer ask before touching something wrong.

Thanks!

Hi @ZeR0ByTe,

I’ve never done this, always just reinstalled to do something like this. But from my understanding you’d need to move your home partition (/dev/nvme0n1p4) to right without actually shrinking it and then make your root partition (/dev/nvme0n1p2) bigger to fill the space.

But, according to Partitioning - ArchWiki GPaated is the right tooool for the job:

GParted — Partition editor for graphically managing your disk partitions. It can be used to resize, copy and move partitions without data loss. It uses parted as backend.

Hope this helps!

Edit:

See:

https://superuser.com/questions/1579668/resize-root-filesystem-in-gparted

Edit #2:

Also

https://askubuntu.com/a/492137

You are not advised to do this, this will make you home partition shift, as gparted will warn you that. If you keep to do it,

  • backup your home,
  • wipe it, extend your root and restore your home to the rest region(or do a home shift to reserve space for root, at you risk)

isn’t it just to select the partition, right click and there is resize/move?

You probably already know this but just in case, use a live USB.

If you have another disk:

  1. Backup / and home to the other disk
  2. Check it copied ok
  3. Delete swap and home
  4. Extend /
  5. Recreate swap and home
  6. Copy data back to home
  7. Check everything copied ok
  8. Check /, or just copy everything back to make sure

If you don’t have another disk:

  1. Create a temporary partition using the unallocated space
  2. Copy data from home to new partition
  3. Check it copied ok
  4. Delete swap and home
  5. Extend /
  6. Recreate swap and home
  7. Copy data back to home
  8. Check everything copied ok
  9. Delete temp partition. Or keep it if you want.
  10. Extend home. This is optional as you should already have plenty of space for now.

You may (or may not) lose data if you follow step 10 without a backup. If root was damaged during the extend you may have to reinstall (unless you have a backup)

1 Like

If 8 gig will do it, the easiest will be to delete and recreate the swap.
If not, either move home, or copy the whole root to the unallocated space. I have not done it, but as a minimum you will then have to adjust the uuid in grub and fstab.

You need to shift the the paritions above root the the end of the disc.

  1. home
  2. swap
    And then increase the size of root.

Usually 100 GB for root is sufficient.

2 Likes

Gparted is able to do this

To be save, make a backup of all partitions beforehand.

Then from an USB-boot

  • move /home up
  • move swap up
  • extend / to 120G

If you are lucky, this will not change the UUIDs of the affected partitions. If they are not changed the system will boot :wink:
:footprints:

Deleting one of the partitions will change the UUID, and you will have extra work to get it booting again ( fstab, grub.cfg, uefi)

2 Likes

Thanks to everyone and help!

@Keruskerfuerst @andreas85 How can I move home and swapto TOP?
I cannot see the option. And also I’m afraid to break my system and ask in a new topic how to fix it xD

Thanks again for read and help!

GParted / Partition / move

or right klick on partition, move

Then change the start, keep the size

Thanks.
I’m in this moment in the last step. It’s ok like this, right?

In the bottom are the pending operations, I did the movements and looks good but I’m afraid hahaha. I attach the image and I will wait someone confirm it’s looks good

Thanks again

shrink $HOME (nvnm01p4) from the left to the right

then you can move swap to the new beginning
then you can expand / (the root partition) towards the right - to make use of the space created

@dmt outlined two scenarios perfectly !

Do this from the outside.
Not from within your running system.
Boot some ISO from USB …

Then it is just like moving Lego blocks.

You definitely should have a backup - something might not go as planned … and then you are … screwed

1 Like

The worst that can happen is to break the 1.34TB home volume.
P.s. and disable sleeping after 15 minutes in the power settings because this can take some time.

1 Like

The last 2 steps are not necessary, and will only cost time, and wear down your disk.
The rest is ok.

Thank you all for reading and helping me.
I did the whole process and after 35 min, i’m writting from my manjaro now with 120GB on my root partition :).

Thank you so much!!

2 Likes

This is rather important and I wish it was the default in a Live session.

2 Likes

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.