I Installed Gentoo So You Don’t Havtoo

A popular expression in the Linux forums nowadays is noting that someone “uses Arch btw”, signifying that they have the technical chops to install and use Arch Linux, a distribution designed to be cutting edge but that also has a reputation of being for advanced users only. Whether this meme was originally posted seriously or was started as a joke at the expense of some of the more socially unaware Linux users is up for debate. Either way, while it is true that Arch can be harder to install and configure than something like Debian or Fedora, thanks to excellent documentation and modern (but optional) install tools it’s no longer that much harder to run than either of these popular distributions.

For my money, the true mark of a Linux power user is the ability to install and configure Gentoo Linux and use it as a daily driver or as a way to breathe life into aging hardware. Gentoo requires much more configuration than any mainline distribution outside of things like Linux From Scratch, and has been my own technical white whale for nearly two decades now. I was finally able to harpoon this beast recently and hope that my story inspires some to try Gentoo while, at the same time, saving others the hassle.

A Long Process, in More Ways Than One

My first experience with Gentoo was in college at Clemson University in the late ’00s. The computing department there offered an official dual-boot image for any university-supported laptop at the time thanks to major effort from the Clemson Linux User Group, although the image contained the much-more-user-friendly Ubuntu alongside Windows. CLUG was largely responsible for helping me realize that I had options outside of Windows, and eventually I moved completely away from it and began using my own Linux-only installation. Being involved in a Linux community for the first time had me excited to learn about Linux beyond the confines of Ubuntu, though, and I quickly became the type of person featured in this relevant XKCD. So I fired up an old Pentium 4 Dell desktop that I had and attempted my first Gentoo installation.

For the uninitiated, the main thing that separates Gentoo from most other distributions is that it is source-based, meaning that users generally must compile the source code for all the software they want to use on their own machines rather than installing pre-compiled binaries from a repository. So, for a Gentoo installation, everything from the bootloader to the kernel to the desktop to the browser needs to be compiled when it is installed. This can take an extraordinary amount of time especially for underpowered machines, although its ability to customize compile options means that the ability to optimize software for specific computers will allow users to claim that time back when the software is actually used. At least, that’s the theory.

It didn’t work out too well for me and my Dell, though, largely because Dell of the era would put bottom-basement, obscure hardware in their budget computers which can make for a frustrating Linux experience even among the more user-friendly distributions due to a general lack of open-source drivers. I still hold a grudge against Dell for this practice in much the same way that I still refuse to use Nvidia graphics cards, but before I learned this lesson I spent weeks one summer in college with this Frankensteined computer, waiting for kernels and desktop environments to compile for days only to find out that there was something critical missing that broke my installations. I did get to a working desktop environment at one point, but made a mistake with it along the way and decided, based on my Debian experiences, that re-installing the operating system was the way to go rather than actually fixing the mistake I had made. I never got back to a working desktop after that and eventually gave up.

This experience didn’t drive me away from Gentoo completely, though. It was always at the back of my mind during any new Linux install I performed, especially if I was doing so on underpowered hardware that could have benefited from Gentoo’s customization. I would try it occasionally again and again only to give up for similar reasons, but finally decided I had gained enough knowledge from my decades as a Debian user to give it a proper go. A lot has changed in the intervening years; in the days of yore an aspiring Gentoo user had to truly start at the ground up, even going as far as needing to compile a compiler. These days only Gentoo developers take these fundamental steps, providing end users with a “Stage 3” tarball which contains the core needed to install the rest of Gentoo.

Bringing Out The Best of Old Hardware

And I do have a piece of aging hardware that could potentially benefit from a Gentoo installation. My mid-2012 Macbook Pro (actually featured in this article) is still a fairly capable machine, especially since I only really need a computer these days for light Internet browsing and writing riveting Hackaday articles. Apple long ago dropped support for this machine in macOS meaning that it’s no longer a good idea to run its native operating system. In my opinion, though, these older, pre-butterfly Macs are still excellent Linux machines aside from minor issues like finding the correct WiFi drivers. (It also can’t run libreboot, but it’s worth noting that some Macs even older than mine can.) With all of that in mind I got to work compiling my first Linux kernel in years, hoping to save my old Macbook from an e-waste pile.

There’s a lot expected of a new Gentoo user even with modern amenities like the stage 3 tarball (and even then, you have to pick a stage file from a list of around 50 options), and although the handbooks provided are fairly comprehensive they can be confusing or misleading in places. (It’s certainly recommended to read the whole installation guide first and even perform a trial installation in a virtual machine before trying it on real hardware.) In addition to compiling most software from source (although some popular packages like Firefox, LibreOffice, and even the kernel itself are available as precompiled binaries now), Gentoo requires the user to configure what are called USE flags for each package which specify that package’s compile options. A global USE flag file is also maintained to do things like build GNOME, Bluetooth, even 32-bit support into every package, while specific package USE flags are maintained in other separate files. For example, when compiling GIMP, users can choose which image formats they want their installation of GIMP to support. There’s a second layer of complexity here too as certain dependencies for packages can be “masked” or forbidden from being installed by default, so the user will also need to understand why certain things are masked and manually unmask them if the risk is deemed acceptable.

One thing that Gentoo has pioneered in recent years is the use of what it calls distribution kernels. These are kernel configurations with sane defaults, meaning that that they’ll probably work for most users on most systems on the first try. From there, users can begin tweaking the kernel for their use case once they have a working installation, but they don’t have to do that leg work during the installation process anymore. Of course, in true Gentoo fashion, you can still go through the process of configuring the kernel manually during the install if you choose to.

Aside from compiling a kernel, Gentoo also requires the user to make other fundamental choices about their installation during the install process that most other major distributions don’t. Perhaps the biggest one is that the user has to choose an init system, the backbone of the operating system’s startup and service management systems. Generally most distributions decide for you, with most larger distributions like Debian, Fedora, and Arch going with systemd by default. Like anything in the Linux world, systemd is controversial for some, so there are alternatives with OpenRC being the one with the most acceptance in the Gentoo world. I started out with OpenRC in my installations but found a few pieces of software that I use regularly don’t play well with it, so I started my build over and now use systemd. The user also can select between a number of different bootloaders, and I chose the tried-and-true Grub seeing no compelling reason to change at the moment.

In addition, there’s no default desktop environment, so you’ll also need to choose between GNOME, KDE, XFCE, any other desktop environment, or among countless window managers. The choice to use X or Wayland is up to you as well. For what it’s worth, I can at least report that GNOME takes about three times as long to compile as the kernel itself does, so keep that in mind if you’re traveling this path after me.

It’s also possible you’ll need to install a number of drivers for hardware, some of which might be non-free and difficult to install in Gentoo while they might be included by default in distributions like Ubuntu. And, like everything else, they’ll need to be compiled and configured on your machine as well. For me specifically, Gentoo was missing the software to control the fans on my MacBook Pro, but this was pretty easy to install once I found it. There’s an additional headache here as well with the Broadcom Wi-Fi cards found in older Macs, which are notoriously difficult pieces of hardware to work with in the Linux world. I was eventually able to get Wi-Fi working on my MacBook Pro, but I also have an 11″ MacBook Air from the same era that has a marginally different wireless chipset that I still haven’t been able to get to work in Gentoo, giving me flashbacks to my experience with my old Dell circa 2007.

This level of granularity when building software and an overall installation is what gives Gentoo the possibility for highly optimized installations, as every package can be configured for the user’s exact use case for every package down to the kernel itself. It’s also a rolling release model similar to Arch, so in general the newest versions of software will be available for it as soon as possible while a Debian user might have to wait a year or two for the next stable release.

A Few Drawbacks

It’s not all upside, though. For those without a lot of Gentoo experience (including myself) it’s possible to do something like spend a day and a half compiling a kernel or desktop environment only to find out a critical feature wasn’t built, and then have to spend another day and a half compiling it again with the correct USE flags. Or to use the wrong stage file on the first try, or realize OpenRC won’t work as an init system for a specific use case, or having Grub inscrutably be unable to find the installation. Also, don’t expect Gentoo to be faster out-of-the-box than Debian or Fedora without a customization effort, either; for me Gentoo was actually slower than Debian in my benchmarks without a few kernel and package re-compiles. With enough persistence and research, though, it’s possible to squeeze every bit of processing power out of a computer this way.

Personally, I’m not sure I’m willing to go through the amount of effort to migrate my workstations (and especially my servers) to Gentoo because of how much extra configuration is required for often marginal performance gains thanks to the power and performance capabilities of modern hardware. Debian Stable will likely remain my workhorse for the time being for those machines, and I wouldn’t recommend anyone install Gentoo who doesn’t want to get into the weeds with their OS. But as a Linux hobbyist there’s a lot to be said for using other distributions that are a little more difficult to use than Debian or even Arch, although I’d certainly recommend using a tool like Clonezilla to make backups of your installation from time to time so if you do make the same mistakes I made in college you can more easily restore your system. For me, though, I still plan to keep Gentoo on my MacBook Pro since it’s the machine that I tinker with the most in the same way that a classic car enthusiast wants to keep their vehicle on the road and running as well as it did when it was new. It also lets me end forum posts with a sardonic “I use Gentoo, btw” to flex on the Arch users, which might be the most important thing of all.

46 thoughts on “I Installed Gentoo So You Don’t Havtoo

  1. Ah, memories of a Pentium III building the kernel for hours… only to realise I’d forgotten to build in file system support for ext3. Was powerful in that you could avoid unnecessary junk, and have optimisations for your hardware though – good for squeezing out performance (say, from a pentium III…). Nowadays I find nixos scratches that itch – you can customise builds (of any part!) a la Gentoo, but it’s nice to have the precompiled binaries. The rollback would have saved me so much time too back then! (plus having an simple text file you can rebuild from, which has “all the tweaks” you inevitably make).

    1. Yep! System config for all the tweaks you always want, hardware config for the drivers, storage configuration, etc. It’s made me much happier about spinning up new systems or changing my environment (though the learning curve was a little brutal), everything is just fearless.

  2. I used Gentoo for a good while a couple of decades ago and that’s where I got a lot of my Linux knowledge from, but eventually I ditched it because it just wasn’t worth all the time it took to compile everything. Sure, one could make the stuff run faster than with the precompiled distros, but not that much faster that it even remotely made up for the wasted time twiddling my thumbs.

    Haven’t felt the need to so much as look back after I ditched it.

    1. Check out Calculate Linux.

      It’s all the good Gentoo stuff (e.g.: does what you want/configure it, or maybe you happen to really need/want some package built with “weird” compile time options) – and the other 99% of packages you get a binaries.

  3. I wouldn’t consider myself an advanced linux user, having had only Ubuntu experience before installing Gentoo. However, I should say that trying out Gentoo is worth it for multiple reasons. One is that the wiki is so well informed and so well written, that you will learn a lot about how an unix system works, if you’re a beginner like me. Secondly, that Gentoo wasn’t too hard to build if you didn’t pick the hardest option – which is ma de possible (as mentioned) by “distribution kernels”. Then comes the very satisfying liberty of accepting only the licenses you would agree with: Gentoo is one of the systems that will give you the most liberty of choice when it comes to software. Lastly, most issues that one may encounter are really well documented in the wiki aswell. Gentoo has been my daily driver for a while and I don’t have any issue. On modern computers, compiling times are generally reasonable, and a little patience is a good thing when we’re (too much) used to do everything fast. The only downside I found is that making an integrated graphic card and a dedicated nvidia graphic card work together and smartly switch seems near impossible and it is very hard to undersand how to. But so far I haven’t had any issue running everything on the nvidia. Most of the time, KDE only uses 8mb of VRAM. To my taste and in everyda use, this is a very achieved and very nice OS.

  4. “it’s possible to do something like spend a day and a half compiling a kernel or desktop environment only to find out a critical feature wasn’t built, and then have to spend another day and a half compiling it again with the correct USE flags”

    Last time I installed Gentoo, I used the kernel from an Arch box and put that on the machine, set up Grub and done. Then I spend the time to compile the kernel to make sure I could reboot back into a working kernel.

  5. I am a Linux ‘user’ now… Not a ‘builder’. Rather be using Linux applications and just getting a task done. Compile/design my ‘own’ applications as well. I’ll leave the Linux underbelly to the younger generation :) .

    1. We’re not talking “./configure && make && sudo make install” here, just “emerge -a www–client/firefox” and wait unless you want to change the default USE flags.

      1. Speaking of youngsters, I read a post over on a Linux forum about a ‘young’ and ‘motivated’ individual who is willing to help out in the kernel arena, but wanted to code using help from AI…. Makes me wonder :) :eek: ….

    2. Depends on what you are doing. I had processes that took over a week to run. Gentoo could save me half a day or more on runtime (I tested it). I’d typically just emerge world at the end of the week to keep things up to date while I was at home.

  6. Installing Gentoo is my favorite way of stress testing “underpowered” embedded devices for defects. Even a 100MHz ARM can compile world and if it can make it through the week without faults, I know the hardware is reliable. The ultimate goal is to have a minimalist system with the smallest attack surface and Gentoo offers that flexibility.

  7. You can also do something like going with Calculate Linux where you get binary packages for packages that you’re fine with the default USE flags or built from source where you want to wring every little bit of performance you can out of it. Like if you don’t particularly care if libjpeg is as fast as it could possibly be but you want mesa or xorg or ffmpeg to burn as much rubber as they’re able.

    They usually have a few custom tools as well but they’re basically Gentoo with a BINHOST. Which means you get binary packages with relatively sane defaults unless you have custom USE flags set.

    Oh, and if you do weekly system updates on a system less than ten years old instead of waiting 3-4 months, they usually go by in a couple hours or less. The build jobs are not run at -20 niceness or anything so you can still be using your box for non-intensive stuff.

    https://wiki.gentoo.org/wiki/Distributions_based_on_Gentoo

  8. My first linux experience was Gentoo. A friend printed out the entire manual for me, and provided me with floppy disks for the source. It took 3 days to compile. I succeeded in getting it up and running, but didn’t really know how to use it and quickly moved on to other things. I haven’t been back to Gentoo. These days my time is worth more than the freedom of configuration, so I stick to more well trodden paths like Debian and Redhat variants.

  9. Installing Gentoo nowadays isn’t harder than installing Arch Linux or any other distribution.
    Gentoo provides pre compiled packages for all the ebuilds, not just Firefox and kernel.
    Adding to that, you can use flatpacks if there isn’t an already native package for Gentoo.
    Finally, the handbook is a good resource for learning, but if you just want a working installation there are many excellent automated installers. To name a few:

    https://github.com/szorfein/getch
    https://github.com/oddlama/gentoo-install
    https://gitlab.com/oz123/gains

  10. Arch is basically Gentoo without all the compiling. You can “measure” that however you want on social circle jerks, but unless you have some “exceptional” use cases, it seems to fly in the face of hacker ethos to waste time compiling when there are trusted binaries ready to go. Just my 2 cents. Happy hacking.

    1. Except Arch forces systemd (unless you use a systemd-free derivative). Gentoo doesn’t. You’re free to do whatever you want, and not just inside the approved paradigm. The only thing they really have in common are that they’re both GNU/Linux distributions.

      “exceptional” use cases

      Like not wanting systemd, pulseaudio, or a pile of pointless (for me) dependencies… all of which I can address with USE flags or a custom ebuild?

      hacker ethos

      Isn’t the “hacker ethos” doing what you want with whatever you have to optimize it for your own workflow, and not a “one size fits all” copout?

      waste time compiling

      compilation isn’t really an issue anymore on anything even remotely modern. The longest compile I have is qtwebengine, and that’s 30 minutes… in the background… while I’m doing other stuff. Everything else might as well be instantaneous.

      trusted binaries

      Trusted by whom?

      I think people should use what works for them. Just my 2 cents.

  11. Long time reader, first time commenter … I’ve been daily driving Gentoo on computers, remote servers/VPSs and even weird iOmega ARM thing that’s supposed to be like a print server, but with external USB WD drive – well it was home server before home server was really a popular term.

    Just do yourself a favor and install Calculate Linux.

    It’s 100% Gentoo… Actually it’s more like 125% Gentoo.

    Basically normal Gentoo, except bunch of geeks agreed to standardize on half a dozen default profiles (portage USE stuff) – and provide prebuilt binaries for that.

  12. gentoo is definitely neat. i love the ability to build from source. really, debian gives me enough of that for my taste. ‘apt-get source xxx’. but gentoo definitely has a niche, and an allure.

    but i don’t really understand all this talk about efficiency. small and old computers can generally run debian fine. you don’t need to rebuild anything from source. most reasonable programs use reasonable amounts of ram and cpu. a 2012 macbook is a powerful computer. even 15 years ago, 1GB of RAM was pretty standard, and 1GB is a lot of RAM.

    you’ll wish you had a better computer if you run a modern browser. building from source won’t solve that problem.

    i don’t really know what it’s like to use gnome but i imagine that makes you feel like your computer is too slow, too. and building from source won’t solve that problem either.

    i feel like a lot of times people want to monkey around with the things that give you 1% or 0.1%, which can be fun, but really there’s no reason to. just don’t use gnome, don’t use modern browsers. that’s all it takes. my 2GB raspi 4b is swimming in unused memory!

  13. I’ve played with Gentoo for a while a few years ago, but I didn’t find it too useful for my use-cases. Well, it might’ve been less of a struggle didn’t I choose to go with musl + clang, but what’s done is done, I guess. But it was quite ab interesting experience anyways.

    And now I’m currently reasonably happy with nixos. While it doesn’t give you the same level of customization (e.g. you can’t go with openrc or musl), you still have plenty of control over what you have installed. And, perhaps more importantly, if you’re not satisfied with how the software provided in the repos is built, you can fiddle with it on a per-package basis via override and overrideAttrs (the most common use-case for me is pulling newer sources from git, but also I did occasionally add some patches).

    Guix may be more interesting if you don’t like systemd while being able to tolerate lisp and having much less packages in the repos. Nix has pretty much everything one can need, while guix is a bit more nuanced due to both smaller user base and its devs being foss absolutists refusing to ship stuff generally accepted as useful to have, like cpu microcode updates. Although, given that can be dealt with via nonguix and friends, guix is a rather interesting distro to try out

  14. I was the Gentoo/amd64 Lead back in the early/mid-2000’s when the Linux kernel was being ported to that platform. While I enjoyed that time and gained some knowledge of Linux development and distribution release engineering, I’m not sure I’d use Gentoo today. Not because of any technical fault in the distribution, but because I just want my distro to work. I’m not interested in salvaging old hardware or optimizing my kernel to the nth degree. I didn’t need to customize my distribution beyond some basics. So, I just use vanilla Ubuntu now. And I’m ok with that.

  15. I propose a billion dollar bounty for the first AI that can install and configure Linux on a PC. An additional billion if it has a desktop OS. And an additional billion if it can diagnose and fix broken installations. I am good for the first two bounties, waiting for someone to pony up the last billion. ;-)

  16. Back in the early 00s one of the other Linux guys at work was deeply into Gentoo. We had a distcc based comple farm that he used to cut down the build time for his clean installs and for software updates for some of the apps. It was a big enough speed increase that I’d recommend booting up 4 or more crappy old boxes with it before trying a Gentoo build.

  17. The article has an odd emphasis on wringing performance out of low-end machines. That’s certainly an upside, but the obvious downside is recompiling everything on low-end machines. (Of course there are solutions where you have a beefy machine cross-compile optimized binaries for your wimpy machine, but that’s advanced even for gentoo.)

    I’m not convinced that low-end performance is really gentoo’s sweet spot at all. For me, the big attraction is nothing to do with performance, but the near-zero friction in customizing packages. This is true across the range of customization options: toggling –with-foo flags to configure, cherry-picking a git version for a bugfix or feature that hasn’t been released yet, or applying a completely custom patch.

    In my experience with other distros, some or all of these customizations are going to require opting out of the distro’s package, and adding it to your own parallel ports tree. Obviously some work is fundamentally required to define a custom build, but I’ve always encountered additional friction of telling the system to use your local version instead, and/or a separate step of rebuilding your custom packages into a local repository every time you upgrade the system.
    (It’s possible my perspective is flawed; maybe some distros did have better tools to streamline local customizations, and I just failed to learn about them.)

    Whereas in gentoo, there is practically nothing beyond the actual productive work of adding a patch, or copying and editing an ebuild. If there’s a per-package USE line in /etc/portage/package.use/, it gets applied automatically. If there’s an ebuild in my local repository, it automatically overrides the gentoo repository. And if there are patches in /etc/portage/patches/category/package/, they get applied automatically, too.

    Because of this, ever since I started using Gentoo, I’ve tweaked many minor things that I wouldn’t have bothered with on other distros.

    As an example, I recently yoinked the Unicode 16.0 commit from glibc’s git, and added it as a patch against the current release (2.40) for those sweet Symbols for Legacy Computing Supplement glyphs.
    Once I verified the patch applied cleanly to the release, the whole interaction with the system was just:
    #mkdir -p /etc/portage/patches/sys-lib/glibc-2.40
    #cp Unicode_16.0.patch /etc/portage/patches/sys-lib/glibc-2.40
    #emerge -a1 glibc
    And when glibc-2.41 is released and stabilized in a few months, I won’t have to take any action at all to retire the now-obsolete patch — an ordinary upgrade will build and install the new version, ignoring the mismatched patches directory, and I’ll be back to vanilla.

    1. Emerge and local overlays are what i miss everywhere else. “Ohh this patch fixes my issue” is super easy ro do in a way that doesn’t break everything. USE flags for disabling functionality I don’t need to save space and compile time is also nice.

      I need to give it a try now that they have binpkgs available.

  18. I think of Gentoo vs other Linux distributions like building a vehicle from scratch vs buying a complete vehicle.

    There are genuine use cases and advantages to building a vehicle from scratch, but the vast majority of cases seem to be “because I can” or for a sense of elitism, rather than necessity.

    The parallels between computing and car culture are amusing sometimes. But hey, each to their own, right?

  19. Gentoo was the first live boot linuzzz distro I got my hands on. Don’t know why it was considered difficult nor Arch linuzzz. We are all used to config options and having to type in unrecognized esoteric commands to get linuzzz to compile and eventually boot lol. It is a feature that it is famous for. To each their own.

  20. “or realize OpenRC won’t work as an init system for a specific use case”

    Come on don’t leave us hanging, what’s this use case you’ve found that doesn’t work with OpenRC?

    The joy of Gentoo is the ability to install older/newer versions of any package (within reason) as they’re built against your current libraries.

    The benefit of Gentoo is it really gets you involved in the nitty gritty of Linux (which, depending on who you are may not be a benefit), making it a great learning experience. Years ago my dad brought home a copy of Solaris X86. I installed it, wondered what the point of it was and subsequently ignored it. A few years later I was introduced to Gentoo, tried my own system and got involved.

    1. I might accidentally invoke Cunningham’s Law here, but I use Syncthing on almost all of my machines as a self-hosted Dropbox replacement. It’s especially useful for keeping my laptops and other mobile devices synced up with the latest versions of whatever files I’m working on without me having to think about it. Anyway, Syncthing needs to be started as a regular user and can’t/shouldn’t be run as root, but I could not figure out how to start a service with OpenRC as a non-root user. If it’s possible, it’s at least not well-documented.

      1. I’m not sure what all you need out of systemd’s rather expansive feature set.

        I haven’t used syncthing, but for a single-user laptop/desktop, all I’d really expect to need would be changing SYNCTHING_USER, SYNCTHING_GROUP, etc. in /etc/conf.d/syncthing, and maybe adding some commands (roughly, ‘rc-service syncthing stop’/…start/etc.) to sudoers.

        If you actually need to run instances for an arbitrary number of users, to start/stop at login/logout, or various other features, it gets more complicated; there’s some pointers at https://wiki.gentoo.org/wiki/OpenRC/User_services , but at some point just using systemd is probably the easy answer.

  21. I became a Linux system administrator years ago, thanks to Gentoo. My previous career had nothing to do with IT, but as a Linux hobbiest, I knew my way around the command line. When I applied for my first job, I was running Gentoo as my daily driver. In my first job interview, I was asked about my experience with Linux. When I told the interviewer I was using Gentoo with Gnome desktop, I got hired on the spot. I haven’t used Gentoo in over a decade, but maybe it’s time to give it another try.

  22. Realistically though, you can just install Debian and re-compile a few resource-hungry packages (with apt source) if all you want is an usable Linux installation for an early 2010-era PC.

    That said, I have not used Gentoo, but I have used BSD Ports and found it pretty usable. I guess Gentoo shouldn’t be too bad either.

  23. You should use bindist on most desktop systems anyway.

    I’ve been using Gentoo for over 20 years, but my daily driver has been Ubuntu for the largest part and since this year made the switch to Arch.

    Most of my experimental devices all run Gentoo, maintaining them can be an endeavour but you learn a lot from it.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.