This post was written 2019-12-02 10:00:00 -0600 by Robert Whitney and has been viewed an unknown number of times since unknown time. This post was last viewed an unknown length of time ago.
This guide is not frequently updated. If you notice that you need to deviate from this guide for any reason then please let me know in the comments below. :)
This page last updated : Updated mount commands for /dev & /sys
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.
First, check with
that your network isn't already configured. If it is, move on to the next
If your netowrk is not configured, you will need to run
<device> (in my case:
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.
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.
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.
Select your profile (your default USE flags are determined based on the profile that you set).
Your machine needs a name, or may be part of a domain, here you will get a chance to set that up
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.
Gentoo has made grub2 default for installation, it's a lot easier to setup than you might think.
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:
Now is a good time to add users and change your root password before you reboot into your new system.
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.