Need to change path for installing packages

Well, everything depends on how you’ve partitioned your drives, but yes, in theory it is possible to fine-tune this.

What you first and foremost need to understand is that GNU/Linux is a UNIX system, and that UNIX uses a standardized directory hierarchy — called the Filesystem Hierarchy Standard.

Unlike in the DOS- and CP/M-derived multi-volume approach of Microsoft Windows — which I presume you’re most familiar with — UNIX systems fully integrate the application software with the operating system itself at the filesystem level. Therefore, executable files are commonly all kept under the /usr hierarchy — usually in /usr/bin, but there are exceptions — and if they are software packages that were not installed by way of the system’s own package managers (i.e. pacman or pamac) then they are put under /opt.

Now, the best way of doing what you would want is to have /usr be located on your HDD instead of on your SSD, and to have it mounted automatically at boot time.

This is actually quite common, but in Manjaro and other distributions that use systemd as the service manager, this requires an extra step, namely, you have to modify the initramfs for your kernel(s) to have them automatically mount /usr in early user space — i.e. right after the kernel has been loaded but before systemd is started — because otherwise you’ll run into a chicken-and-egg problem due to the fact that systemd itself lives under /usr.

I have detailed the procedure in the following tutorial… :arrow_down:

The above is the complete tutorial, but if you directly want to jump to the section about splitting off /usr, then click here. :wink:

2 Likes