You are not logged in.

#1 2023-07-11 14:01:34

jd0x0
Member
Registered: 2023-07-10
Posts: 1

Disk Partitioning issues Expanding the /root by reducing /home partion

Hi!

I've done a normal Archlinux setup as follows with

/dev/sda
|_
|   /dev/sda1 = /root = 20GB
|_
|   /dev/sda2 = /Swap = 12GB
|_
|   /dev/sda2 = /home = ~850GB

How do we reduce the size of the /home partition(has lot of data) to 600GB and add the rest of the space to /root partition. I was trying to load up blackarch repos on the root for experimental purposes however, this requires 57G of installation space, which I realized once I started the setup.
I'm skeptical about using the GParted(https://wiki.archlinux.org/title/Parted) method. Is there a method to create and add the partition to the /root without losing the data on either of the drives?

Offline

#2 2023-07-11 14:36:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,237

Re: Disk Partitioning issues Expanding the /root by reducing /home partion

Low level disk operations like these are hairy - always. Have backups and hope you don't need them rather than not having them.

Assuming you have backups,  a gparted live disk makes this fairly easy from a process perspective, remove the swap partition, decrease /home, move home to the left, allocate new size to root, create a new swap partition. This is clicked up in a few mins in gparted and will generally work correctly and do it's job, assuming your system doesn't crash in the middle of it.

That said "experimenting with blackarch" will often lead to your actual Arch being in a broken state because the repos from BlackArch are not 100% compatible with Arch, so do those experiments at your own risk. For the mentioned task of resizing root and home gparted is probably the easiest, least risky choice to do something that can go awry quickly if you do it manually.

Last edited by V1del (2023-07-11 14:36:52)

Offline

Board footer

Powered by FluxBB