Thanks to my friend Scott Robbins for his inspiration, first with his A Quick Guide to Installing ArchLinux, then his A Relatively Quick Guide to Installing Gentoo.
The Gentoo home page has Get started as a clickable link which suggests how to install Gentoo.
Getting started with Gentoo states "we got you covered every step of the way". Whilst that is true, most people who have ever installed Gentoo, and some other distros, don't need quite that much detail. It says:
Step 1: Boot a live environment. While it states to "Choose between a lean Gentoo installation CD, a LiveCD/DVD, LiveGUI USB, or any distribution you like to perform the installation.", my suggestion, and this guide will assume, that you use the install-<arch>-minimal-<release timestamp>.iso from the Gentoo mirror in your chosen country. Mine for today is the install-amd64-minimal-20251026T170339Z.iso.
Step 2: Follow the installation instructions states, "The Gentoo Handbook provides detailed documentation that guides you through the installation process."
To me "provides detailed documentation" is accurate. Also, there is considerably more detail than most people who have experience installing Gentoo need at this point. The purpose of this "Gentoo Quick Install Guide" is to cut out all the extra detail and just provide what is needed, in this case, to install a working Gentoo environment for amd64 using systemd as the init system. If you've never installed Gentoo before, this guide is not for you. My recommendation would be to use the Gentoo Handbook and select the that matches your target machines.
Write the downloaded ISO file to bootable media and boot your target computer with it. Once you are at the livecd ~ # login prompt, read in the message of the day two items that will allow you to ssh into the computer and work from a terminal on another computer:
To start an ssh server on this system, type "/etc/init.d/sshd start". If you need to log in remotely as root, type "passwd root" to reset root's password to a known value.
livecd ~ # /etc/init.d/sshd start
|
livecd ~ # passwd
|
Since the Live CD starts dhcpcd, there might already be an IP address and routing configured for this computer. Issue ip a then ping -c2 gentoo.org to check. If your network connection is already working, just note the local IP to ssh into it from your source machine. If not, and you know your network, you can set a manual IP address and route, I have a HOW-TO for manually setting up a network connection . Or, if you need more help with this, the Gentoo Handbook explains several methods.
There is one more suggestion for remote installation from another computer, and that is to run tmux so that you can leave the remote session if needed without losing your work and having to start over.
livecd ~ # tmux
|
livecd ~ # tmux ls
|
Then from your source machine run tmux ls so that you can see your session on the other computer.
livecd ~ # tmux ls
|
0: 1 windows (created Sun Oct 12 09:53:24 2025) (attached)
|
Now you can ssh into the machine and run tmux a -t 0 to attach to that running tmux session, and run ctrl+b d if you want to detach so that you can exit the target computer for whatever reason.
To see what disk(s) are available run lsblk with these options:
|
My target drive will be the 256GB Samsung 860 SSD. My choice for partitioning is gdisk, and this drive will have a 1GB partition for an EFI System Partition (ESP), a 10GB partition for swap (since this is a laptop and I plan to use hibernation, which requires swap space larger than or equal to the amount of RAM memory - 8GB on this laptop - and I like round numbers), 70GB for /, and the remainder for /home.
|
Run that lsblk command again, this time with your device specified:
|
The EFI system partition (sda1 for me) must be formatted as FAT32. Choose what you want for / and/or /home. I also give my partitions labels (names) that match their mount points to more easily distinguish them in lsblk output:
|
Activate the swap partition, mount your / partition, make the directory for the ESP partition under /root, and mount /home is you have it as a separate partition:
livecd ~ # swapon /dev/sda2
|
livecd ~ # mount /dev/sda3 /mnt/gentoo
|
livecd ~ # mkdir /mnt/gentoo/efi
|
livecd ~ # mount /dev/sda1 /mnt/gentoo/efi
|
livecd ~ # mkdir /mnt/gentoo/home
|
livecd ~ # mount /dev/sda4 /mnt/gentoo/home
|
A stage file, also known as a stage tarball, is an archive containing a minimal Gentoo environment, typically serving as a seed for a Gentoo install, and can be obtained from the Gentoo mirror closest to your location. Get the one that suits the type of install and init system you choose; for me today that file is a systemd desktop file. You can download the file with wget, or use links per the Gentoo Handbook's suggestion. My choice is wget with --show-progress:
livecd ~ # wget --show-progress https://gentoo.osuosl.org/releases/amd64/autobuilds/current-stage3-amd64-desktop-systemd/stage3-amd64-desktop-systemd-20251026T170339Z.tar.xz
|
Make sure to also get the associated checksum file (stage3-amd64-desktop-systemd-20251026T170339Z.tar.xz.sha256 is mine), verify the tarball is not corrupt, and install the files to disk.
livecd ~ # sha256sum --check stage3-amd64-<release>-<init>.tar.xz.sha256
|
stage3-amd64-desktop-systemd-20251026T170339Z.tar.xz: OK
|
sha256sum: WARNING: 12 lines are improperly formatted
|
livecd ~ # tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo/
|
We'll need a resolv.conf file for DNS resolution:
livecd ~ # cp --dereference /etc/resolv.conf /mnt/gentoo/etc/
|
Then we'll use this unique genfstab bash script to create /etc/fstab for us:
livecd ~ # genfstab -U /mnt/gentoo/ >> /mnt/gentoo/etc/fstab
|
Check the fstab file by running egrep -v "(^#|^ *$)" /mnt/gentoo/etc/fstab to make sure the uncommented lines are correct for your system.
Now it's time to chroot (change root) into the new Gentoo system by running arch-chroot, which is another bash script on the Gentoo live media that comes from the Arch Linux camp, then set your prompt to reflect we have now moved into the chroot.
livecd ~ # arch-chroot /mnt/gentoo
|
livecd / # export PS1="(chroot) ${PS1}"
|
(chroot) livecd / #
|
Next install Gentoo's ebuild repo by running emerge-webrsync, then make sure you have the correct profile selected with eselect profile show, and if it's not the one you expected, then show them all with eselect profile list|less and change it to the one you desire with eselect profile set x.
NB: Gentoo has 2 init systems - OpenRC and systemd. The profiles with systemd in the name are for it, the ones without systemd in the name are for OpenRC.
(chroot) livecd / # emerge-webrsync
|
(chroot) livecd / # eselect profile show
|
default/linux/amd64/23.0/desktop/systemd
|
Just like my friend Scott, vim has become the only editor for me, so let's install a binary package of it now so that as we configure software we use vim, and we don't have to use nano, which is the $EDITOR of the Gentoo minimal install system. To get binary packages we first need to download their keys for file verification with getuto. Yes, Gentoo now has a binary package host.
For amd64 (x86-64) and arm64 (aarch64), the Gentoo binhost includes many packages used on desktop systems.
(chroot) livecd / # getuto
|
(chroot) livecd / # emerge --getbinpkg -atv app-editors/vim
|
Now set vim as your $EDITOR with these commands:
(chroot) livecd / # eselect editor set vim
|
|
(chroot) livecd / # . /etc/profile && export PS1="(chroot) ${PS1}"
|
|
(chroot) livecd / # eselect editor show
|
|
That should show the $EDITOR that you set.
USE flags are keywords that embody support and dependency-information for a certain concept. They are a core feature of Gentoo, and a good understanding of how to deal with them is needed for administering a Gentoo system.
NB: In order to install the software in the manner of this guide, there are two files which need to be updated: /etc/portage/make.conf and /etc/portage/package.use. By default Gentoo now creates a directory for /etc/portage/package.use/, /etc/portage/package.accept_keywords/, and /etc/portage/package.mask/ and you would create a file under those directories for each package where you wanted to make changes from that package's defaults. IMO that is convoluted and obfuscates something that was formerly simple. Therefore, I remove those directories and use files instead. If you have an AMD system use */* VIDEO_CARDS: amdgpu radeonsi rather than */* VIDEO_CARDS: intel nvidia.
|
The other file to edit is just as crucial. Add the following lines to that file:
|
Set your timezone and check your date ( America/Chicago is mine, choose the one appropriate to you, and tab completion works here):
(chroot) livecd / # date ; ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime ; date
|
Setup the language(s) you will use on your computer with locales. There 500 or more locales supported. Choose your language with the character format UTF-8. Then update your system.
(chroot) livecd / # vim /etc/locale.gen
|
(chroot) livecd / # locale-gen
|
[1/2] Compiling locale: C.UTF-8
|
[2/2] Compiling locale: en_US.UTF-8
|
(chroot) livecd / # eselect locale set 4
|
Setting LANG to en_US.utf8 ...
|
(chroot) livecd / # env-update && source /etc/profile && export PS1="(chroot) ${PS1}"
|
I am installing a kernel (get the Gentoo binary kernel) and the firmware (intel-microcode for Intel; AMD is in linux-firmware) at the same time. You may not need or want firmware - read the next paragraph for details about linux-firmware. Check postinstall messages in /var/log/portage/elog/summary.log, and use eselect kernel to see that your link is setup.
The sys-kernel/linux-firmware (and other firmware packages) requires a license, so you must add an ACCEPT_LICENSE choice to /etc/portage/make.conf. If you don't need or want any firmware, you can skip this and just install gentoo-kernel-bin by itself, which does not require a license. This is why we added the EULA license to make.conf earlier.
|
|
For this installation GRUB was installed as the bootloader when emerging gentoo-kernel-bin as a result of the grub USE flag enabled for sys-kernel/installkernel and initramfs USE flag enabled for sys-kernel/gentoo-kernel-bin. Yes, USE flags are important, and provide the software of your choice if different than the profile's USE flags. These are the changes I make in Gentoo's default GRUB configuration file.
|
|
|
To generate the final GRUB configuration, run the grub-mkconfig command:
|
Give your computer a name:
(chroot) livecd / # echo gentooligan > /etc/hostname
|
If a static IP address is not desired for this computer, emerge -atv net-misc/dhcpcd then systemctl enable dhcpcd will be enough. If you prefer to configure your network for a static IP address, add net.ifnames=0 to GRUB when we configure it in a bit, and create /etc/systemd/network/10-wired.network with your desired information replacing mine:
|
|
Set the root password using the passwd command.
|
Create a normal user account.
(chroot) livecd / # useradd -m -G users,wheel,audio mingdao
|
|
Get systemd ready for first boot:
(chroot) livecd / # systemd-machine-id-setup
|
(chroot) livecd / # systemctl enable gpm.service
|
(chroot) livecd / # systemctl enable sshd.service
|
(chroot) livecd / # systemctl enable systemd-timesyncd.service
|
(chroot) livecd / # exit
|
livecd /mnt/gentoo # cd
|
livecd ~ # umount -R /mnt/gentoo
|
livecd ~ # swapoff /dev/sda2
|
livecd $ # reboot
|