this post was submitted on 23 Aug 2023
98 points (91.5% liked)
Linux
47951 readers
1406 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
@Ozzy @rtxn I just thought of this, could one, create symbolic links that point to /lib (for ex.) to "repoint" the directory a package gets installed to?
Not sure if this would work, but was curious if someone's attempted it before.
Yeah I was thinking the same thing too, technically if we would recreate the file structure on the second drive, move everything there and set up soft links to those folders instead it might work? I need to try it out in a vm
Some directories can be moved, but you risk messing up your boot process if /lib, /etc, /bin, /sbin, and /dev are not on your root partition. Having /usr on a separate partition is sort-of possible, but even on Gentoo that's an uncommon configuration, and I'd expect less flexible distros not to allow it at all. /var, /opt, /root, and /home can be wherever, though.
It may be possible to put only selected files in your /lib and so on, and then mount another partition on a different drive on top of the minimal one late in the boot process, or even to stopgap things with a carefully-designed initramfs, but I think you'd be looking at some trial and error (and make it more difficult to update basic system packages).
Also, defining what is "just the OS" on Linux is not as easy as you may think. The smallest possible configuration that will get you a running system is a Linux kernel + busybox (a set of cut-down system tools that includes a simple init system, a shell, and a basic device manager). Most of what your distro packages is not part of the OS, strictly speaking—it's optional add-ons that the people making the distro think most users will find useful.
@Ozzy Exactly what I was thinking. Kind of a PiTA if everyone needed to do that, but maybe an excuse to throw up an open-source script on github for it.
Take a look at this, might be interesting: https://wiki.archlinux.org/title/Overlay_filesystem
I had no idea this exists and it looks like it might just work, thank you