This post was written 2019-12-02 08:00:00 -0800 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
If you find this guide useful, then please consider donating some crypto:
Bitcoin: 373B5MJU2qhC44wzWJnU8qQYZfBAf6uVDh
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 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
).
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.
Example output:
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.
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.