You are not logged in.

#1 2024-04-21 19:08:49

CiroBurro
Member
Registered: 2024-04-21
Posts: 1

Merge root and /home partitions

I recently installed arch linux using archinstall,and as suggested, I divided the hard disk in two partitions / and /home, but only after a few days I noticed that half the space of the root partition is already occupied, while in the other there's more than 900gb of free space. So I wonder if it is possible to merge these two partitions, or resize them, in order to solve the space problem.

Offline

#2 2024-04-21 20:37:05

DEDRICK
Member
Registered: 2024-01-19
Posts: 2

Re: Merge root and /home partitions

Easiest way will be to get an ISO with Gparted or KDE Partition Manager, you can use something like EndeavourOS if you want something Arch based or any major distro ISO will typically have either tool.
With either of those you can resize your /home partition and move it to the right, then expand Root into the now free space, I did this exact operation after using archinstall to expand my boot and root partitions.

Last edited by DEDRICK (2024-04-21 20:50:08)

Offline

#3 2024-04-26 19:09:19

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: Merge root and /home partitions

To add to what @DEDRICK said: You will also need to sync the contents of your old home directory to the new home directory in root (something like "rsync -aAXv /from/directory/* /root/home/) and then edit your /etc/fstab to remove the old home mount. Pretty sure the /home directory already exists in / even if /home is not mounted. This is assuming you are not using encryption, in which case you would probably have to edit /etc/crypttab as well. May make sense to do a backup of /home on external media if you have a bunch of files and/or configuration settings you do not want to lose. Although, 900gb of free space doesn't mean much if the total size of that partition is greater than 2tb as you wouldn't have room to sync the files back without an external backup, but that information wasn't provided in the original post.

Offline

#4 2024-04-26 19:12:46

Awebb
Member
Registered: 2010-05-06
Posts: 6,311

Re: Merge root and /home partitions

I feel like I must ask this question, but has "merge two partitions linux" on, say, google, not yielded the slightest of results?

Offline

#5 2024-04-26 19:44:48

dodo3773
Member
Registered: 2011-03-17
Posts: 818

Re: Merge root and /home partitions

Awebb wrote:

I feel like I must ask this question, but has "merge two partitions linux" on, say, google, not yielded the slightest of results?

To be fair sometimes doing things in Arch Linux are slightly more complicated/require a couple of extra steps. Not in this instance specifically (assuming no lvm, luks, etc.. not really enough info in original post to know), just saying. But, you're not wrong. Basically this is what we are saying here: https://superuser.com/questions/1588039 … s-in-linux which was on the first page of a duckduckgo/google search. Also, I don't know where the suggestion of having a seperate /home comes from anyway. Must be specific to using a script to install the system I guess? Hopefully the original poster has enough information to fix their issue now.

Offline

#6 2024-04-26 21:14:01

seth
Member
Registered: 2012-09-03
Posts: 51,767

Re: Merge root and /home partitions

From a couple of recent posts, the main problem is that google researches apparently don't result in the understanding to NOT DO THIS ONLINE ie. while mounting any of the involved partitions and by inference not from a boot of the target system (but use sth. like the gparted live distro or grml instead)

Splitting root and home partition has until very recently been suggested by the install guide for certainly a decade (probably longer) and is traditionally common
There were historicaly advantages in using different FS for different parts of teh filesystem, because they'd typically have different access patterns and one could exploit the performance benefits of different FS this way.
Today you can certainly make the case to want to encrypt $HOME but not necessarily the OS (if you're more worried about exposure through good old theft than a directed attack) and some people want to share their $HOME between different systems.
It can also increase confidence if you know "ok, I'm doing this sketchy thing to fix my root partition because the nvidia-induced systemd crash during the update or rather my panicked utilization of the power button has shredded the filesystem, but I had synced the $HOME partition and it's currently not mounted, so that data is gonna be safe".

Offline

Board footer

Powered by FluxBB