Skip Navigation

How do you realistically build your own OS with Arch Linux?

cross-posted from: https://lemm.ee/post/40063668

As a Linux newbie, all I know about Arch Linux is that it is a DIY distro where you assemble the entirely of the OS by scratch. Somehow it feels like it is too easy than it needs to be, even if it is primarily meant for experienced users. I imagine it to be less like building your PC from parts bought from the market and more like building each and every component of the PC by scratch along with building the PC, which I assume to be much harder for the average consumer. It seems absurd how it is possible for a single person to incorporate the innumerable components required for functionality in a personal system that does not crash 100% of the time due to countless incompatibility errors that come with doing something like this.

I would like someone to elaborate on how it feels to 'build' a system software by yourself with Arch and how it is reasonable to actually do so in a simple language. I do have some experience in programming, mainly in webdev, so it's not like I need a baby-like explanation in how this works but it would be nice to get to know about this from someone who could understand where this confusion/curiosity is coming from.

11
11 comments
  • I think you misunderstand what Arch is. You absolutely do not assemble the entirety of the OS from scratch. You don't compile anything during an Arch install—you install pre-compiled binaries. And you don't actually have an awful lot of OS freedom in terms of what gets installed. If you wanted to use, say, openrc+musl+busybox+dracut, Arch wouldn't be for you, as Arch uses systemd+glibc+gnu+mkinitcpio (You can try to replace these but these are what Arch uses by default; if you're wanting to change these things, maybe just use a different distro). Arch just doesn't install a display manager (you don't need one; I don't use one), any kind of graphical session (you technically don't need one either, but I assume the vast majority of desktop users want a graphical session), or a bootloader. You can install all of those things yourself. Assuming you want all three of those things, that's probably just three packages you install, and the OS doesn't install for you, so that you can pick them yourself.

    Arch doesn't have an installer insofar as you install it with shell commands, but also the actual install itself is just one pacstrap command which installs a full OS for you in one command.

    If you're wanting to build an OS entirely from scratch, you may want to look into Linux from Scratch [disclaimer: I have not done LFS]. I don't know of anyone who actually daily drives LFS though, as you wouldn't have a package manager which would put most users off.

  • Oh it's not quite as "from scratch" as some people make it out to be. It definitely can be more work than most distros, but mostly it's pretty straightforward and you generally just follow some wiki guide or another when picking "components" to install and I think nowadays you can use prebuilt binaries too (I haven't used Arch in a good while.) There's really not all that many moving parts, most of them are sort of a package deal – if you want to use X, you have to install Y and Z. It really is more like building a PC from parts.

    Now, if you actually want to build a Linux system from scratch, there's the very surprisingly named Linux From Scratch project

  • Arch is not really a DIY distro and certainly not for noobies. Those saying so are either naive or a troll. Arch is an excellent resource and it has its uses. Arch assumes you have a full understanding of a POSIX operating system and all components. Arch has an encyclopedic wealth of great information. What Arch is not, is beginner friendly, or remotely tutorial. If you try to use Arch to learn how a POSIX system works, you are going to have a very bad experience. This is about like me handing you the encyclopedia and telling you to go learn physics.

    For a beginner, start with Fedora or Ubuntu because they won't wreck your system. Fedora is on the cutting edge while Ubuntu is stable — which only means that most packages are frozen and will not stay updated in the latest version. It means many things are old and outdated, but you can write a high level script that will never be broken by some change that happens in a software library in a random update. Windows is also a stable (outdated) operating system so that companies can write software that will not get broken because they fail to maintain it regularly.

    Gentoo is a tutorial distro. It is the compile everything yourself and learn how everything works distro. Gentoo must be kept up to date, but if the Portage package manager needs input from the user, the Gentoo packagers layout the details in a very approachable way, assuming you are competent enough to make it through a Gentoo installation in the first place. Most people take days to weeks to make it through their first full Gentoo installation and configuration. This is guided, but there is an enormous amount to take in and figure out. You'll be compiling and configuring everything from the bootloader and kernel all the way up. If you are at this level of competence and understanding, where you can run Gentoo, THAT is when you should consider running Arch. Arch is basically Gentoo, but without the compiling and configurations. All the components are easily accessible in binary form.

    If you run Gentoo for awhile and you really want to understand what the packagers are doing on an even deeper level, then do a Linux From Scratch build (LFS) this is a thing too.

    If you want to learn in situ and actually use a system, use Fedora, get The Linux Bible if you want to learn sysadmin, and leverage the RHEL documentation for more advanced stuff because REHL is the original distro, and where a lot of the core kernel devs come from. RHEL is down stream of Fedora.

    Every distro has a distinct reason it exists. It is foolish to turn them into team sports like brands. A key part of the learning curve is figuring out why each distro exists and leveraging that knowledge. I use them all for various reasons and know which to use for documentation. I may use Fedora as my base, but I have Arch, Ubuntu, and Gentoo that run in containers on my host machine, and have run all three as my base system in the past.

    • Arch is not basically gentoo. Gentoo is about as close as you can get to vanilla Linux while still being a distro. Arch is pretty opinionated about what defaults should run, gentoo is explicitly flexible. Also the compiling on gentoo thing really needs to stop, there have been binary kernel packages for ages, even before the recent improvement to binary packages. The gentoo installation in someways is easier than the arch installation, as long as you use defaults and customize after first booting up, and if you really want to customize stuff, portage is an absolute beast.

      • Arch is a foundational distro like Gentoo. It is not fully configured and requires considerable configuration to be secure in ways that are not clearly defined. Pacman is an abysmal package manager for anyone short of a CS degree. Changes are regularly made that assume considerable knowledge of systems and otherwise require in depth reading. This often involves peripheral packages of no interest the the end user and where an incorrect choice may require loading from backups.

        In the last 10 years I have run most of the major distros. Arch is the only time I have ever had to actually use my backups. The third time, I just moved on. Arch does a terrible job of describing these types of changes, and it is deeply frustrating to actually use Arch for some detailed project, need to install a package, have some tangent peripheral update that requires input, and get stuck in a rabbit hole of research because of the tangent. Arch will not make anything about this easy or clear like with Gentoo. Arch will dump you into some dev's magnum opus of a wiki article that still does not layout the issue you are faced with. That article will put the user into a bottomless fractal links chasm of articles as a result, because nothing about Arch is tutorial.

        Yes Gentoo has some binary packages. People run RHEL and Debian-stable as a desktop; they run Fedora as a script server; they use a steamdeck as a desktop. What a distro is known for is just a stereotype. It still applies and the exceptions do not change the primary use case.

        The important choice right now IMO is how you protect your bootloader, but I'm a foolish intermediate level user at best. I do my best to tell people the counter point to the evangelical believers distro. It was by-far my worst experience with any distro and pushing beginners into that experience is downright toxically counter productive.

  • You don't really build it from scratch. It's just very customizable. And it's usually installed by typing in the command line instructions yourself to do every step of the installation. That also gives you customizability. Other distributiins have a nice installer, you get some default options and click on "continue" and it does the same thing behind the scene. Like partition the harddrive, choose the default software, write it to disk, configure things and install a bootloader. With arch you do that yourself on the command line. They wrote some good documentation to help you. And you'll learn quite a bit in the process.

You've viewed 11 comments.