hello friends! new(ish)!

Gentoo

From InstallGentoo Wiki v2
Revision as of 21:39, 2 July 2014 by >Echelon1 (→‎Installation Method)
Jump to navigation Jump to search
Gentoo logo

Gentoo Linux is a source-based GNU/Linux distribution. It has a stigma for being a difficult distribution to use, and is often recommended as a solution to any problem on /g/. After all, if the person asking the question could install Gentoo, they could probably figure out whatever problem they're having in the first place. If you are considering installing Gentoo, the best resource available to you is the Gentoo Handbook.

Differences between Gentoo and other Distros

Gentoo is different than most other Linux distributions, all the way down to how it is installed.

Installation Method

Most other distros include some form of graphical installer. Gentoo is installed by manually partitioning a device, extracting a stage3 tarball, extracting a portage snapshot, compiling a kernel, installing a bootloader, and then configuring various files that are needed to get it up and running. In those regards, it is somewhat similar to installing Debian with debootstrap, Fedora with febootstrap, or an Arch Linux install.

Because of this highly manual approach to installing the system, always keep in mind that installing Gentoo will probably be LITERALLY THE LENGTHIEST SOFTWARE INSTALLATION IN YOUR ENTIRE LIFE. YOU HAVE BEEN WARNED. THIS IS WHY WE TROLL UNSUSPECTING NOOBS INTO INSTALLING GENTOO. Take your time when installing Gentoo and don't try to rush it. If you're a NEET with literally nothing else to do you might be able to rush a Gentoo installation in at least 24 hours; if you're a busy person with a day job and friends, it might take you over an entire week to set everything up. On a 2014-semi-modern quad core CPU with 8 GB of RAM, setting up the minimum system (the stage-3 tarball + Portage snapshot) will take you about an hour, compiling the kernel an hour and a half (assuming you're cheating with genkernel instead of undertaking a manual compilation and fixing an endless series of kernel panics), finishing your basic installation another hour, installing the graphical interface at least 2 hours (because the GUI is an optional component in Gentoo), and installing Google Chrome or Firefox at least 4 hours each while the entire software compiles from source code. And that's if you're not planning on using a LUKS volume, in this case you should add another 24 hours while your system fills a 750 GB disk with pseudorandom data using four concurrent jobs to exploit your four CPU cores.

Package Manager

Gentoo's package manager, portage, is more similar to what you will find in BSD than in other Linux distributions. Portage tracks installation scripts, called ebuilds, for almost every package you can imagine by default. These ebuilds contain all the information necessary to automatically download a project's source, compile, and install it. If a package is not available for default, you can add other "repositories" as overlays on top of the default Gentoo overlay.

USE Flags

One of the most prominent features of Gentoo is the ability to custom tailor the features of software via USE flags. USE flags are a handy way of automatically specifying options to a piece of software's configuration script during compile time. For example, it is trivial to blacklist something like PulseAudio by simply including -pulseaudio into your global USE flags. USE flags can be specified globally in /etc/portage/make.conf or on a per-package basis through /etc/portage/package.use

CFLAGS

Typical of building from source, you are able to specify CFLAGS that add additional optimizations to the compiled software, the most common ones being "-O2 -march=native" to specify average-level optimization tailored for whatever CPU your computer has.

Overlays

Additional repositories of ebuilds are known as overlays. It is common practice to have a local overlay for any custom ebuilds you have created or acquired. Overlays are typically managed with the layman utility.

License Enforcement

Portage allows you to specify which licenses you agree with, to prevent any software with other licenses from being automatically pulled in at any point. For example, you can restrict installed software to only that which is FSF approved by including ACCEPT_LICENSE="-* @FREE" into /etc/portage/make.conf

Release Schedule

Gentoo is a rolling-release distribution that allows you to mix channels on a per-package basis. For example, you can maintain a system on the stable channel and selectively install unstable releases, or even compile the latest development releases from Git/SVN/etc. Because of this, Gentoo can be either extremely stable or on the very bleeding edge, depending on how you configure it.

Init System

Gentoo uses OpenRC for its init system. It also gives you the option of using systemd if you so choose.

Related Distributions

Gentoo variants

Like most distros, Gentoo has a few variants that are based off of it.

Funtoo Linux

Funtoo.png

A fork of Gentoo by Gentoo's founder Daniel Robbins. It aim's to correct some issues he sees with Gentoo that he wasn't able to rectify because of internal dispute. It also aims to be slightly easier than Gentoo, and offers more optional preconfiguration by default because of that. To that end, Funtoo ships with ebuilds that support the binary USE flag, allowing users to skip the step of customizing their own kernel if they so desire.

  • Advantages
    • Includes some ebuilds that Gentoo doesn't by default.
    • Initial setup may be slightly easier than Gentoo.
    • Uses Git for portage syncing instead of rsync.
    • Common Gentoo scripts and programs patched with Funtoo specific features (genkernel, portage, rc-update, etc).
  • Disadvantages
    • Funtoo uses an older version of udev than Gentoo, which may cause some compatibility issues with certain software like systemd if you choose to use it. Funtoo now uses eudev by default.
    • Funtoo's ebuilds do not always contain the same features as Gentoo's. For example, some are missing ABI flags. E.g. As of 2014-01-29 Funtoo does not contain tcp-wrappers 7.6.22-r1, which added such support while Gentoo does Funtoo now has up-to-date tcp-wrappers. Having many packages missing that support makes a multilib system with gx86-multilib very difficult.

Sabayon

Sabayon.png

Sabayon is a Gentoo-based distro designed to deliver the best out of the box user experience. It offers an installer with a GUI and provides various DE options. Ships with Entropy and Portage as package managers.

Other

Exherbo

Exherbo.png

Exherbo was created by a former Gentoo developer, incorporating many ideas and concepts from Gentoo.