Introduction

Gentoo is probably one of the most complicated, but rewarding, operating systems that I've ever ran. I know it's a lot of effort, but please don't allow the complexity of this guide, or the OS, scare you off.
That being said, let's dive in. You'll need to download Gentoo's minimal installation CD boot it up and follow the prompts until you get to a cli prompt.

Output of the ifconfig command on the Gentoo live install media.

Configure the Network

First, check with ifconfig that your network isn't already configured. If it is, move on to the next step.
If your netowrk is not configured, you will need to run net-setup <device> (in my case: net-setup enp16777736).

Manual Network Configuration

SSHd

If you would like to take over the installation over your network, you can start the sshd & set the root password now, and then follow then rest of the installation steps over SSH.

Prepare your disk(s)

Partition Disk(s)

You will need to use the command line tool, fdisk, to partition your disk, press m in fdisk for help.

When partitioning your disk, you should be sure to have at least a 150MB boot partition (Typically setup on /dev/sda1), a swap partition twice the size of your max memory (no more than 4GB recommended, typically on /dev/sda2), and your third partition (/dev/sda3) should be created with the remaining free space. After your disk is partitioned, we need to create the file systems.

Create file systems and swap

Mount the file system(s)

The next step is to mount & extract the stage 3 to your new filesystem

Once your files are extracted, be sure that your ‘date’ command returns the correct UTC time, and if not fix it to match the correct UTC time (# date MMDDhhmmYYYY), after that is sorted we can chroot into our environment. If you are SSH’d into the system at this point, it is best to start a session in screen before you chroot.

Prepare the Stage

Install the current portage snapshot

Set your Timezone

Select & Set System Profile

Example output:

Select your profile (your default USE flags are determined based on the profile that you set).

Set Hostname

Your machine needs a name, or may be part of a domain, here you will get a chance to set that up

Configure the Kernel

You could manually go in and make your kernel & initramfs, however I prefer to go the genkernel route. If you are comfortable with default kernel configuration you can just immediately exit the menuconfig on the genkernel step and skip right to building your kernel. If you decide to use systemd, however, then you will need to enable that in your kernel before you compile.

It will take some time to build your kernel & modules, go ahead and grab a cup of coffee.

Boot configuration

/etc/fstab

Grub2

Gentoo has made grub2 default for installation, it's a lot easier to setup than you might think.

Finish Base Installation

Merge Startup Packages

Unless you've opted to run systemd, you'll probably want some of the core packages such as a DHCP client, cron daemon, and system logging daemon. Here's a good starter kit that includes superadduser (a user add script) as well:

Set Passwords

Now is a good time to add users and change your root password before you reboot into your new system.

How to install Gentoo Linux in under 5 minutes!.

You should be safe to reboot & install the rest of your systems packages now. Noticed an error in this article? Please leave a comment with any errors or deviations from the guide.

Robert Whitney
Thing Breaker, Stuff Fixer, and Sh!# Sorter

I am a programmer, writer, and avid PC gamer with a passion for technology and storytelling. My background in programming allows me to bring a unique perspective to my writing, and I enjoy sharing my knowledge and experiences with others through my blog. I look forward to connecting with like-minded individuals and exploring the latest developments in the tech world.

Sóc un programador, escriptor i jugador apassionat de PC amb una passió per la tecnologia i la narrativa. La meva formació en programació em permet tenir una perspectiva única en la meva escriptura, i m'agrada compartir els meus coneixements i les meves experiències amb altres a través del meu blog. Espero connectar amb persones amb interessos similars i explorar les darreres novetats en el món de la tecnologia.

Robert has authored a total of 7 posts. Robert's last post was 2024-01-01T00:00:00-06:00