Gentoo Installation Runbook
Gentoo Installation Runbook
From a booted live medium to first boot. Modernized layout: GPT + UEFI, LVM root, binary dist-kernel, and the official binhost so the install is mostly downloads, not compiles. Tuned for Sofia (Europe/Sofia, bg_BG.UTF-8) and a Bulgarian mirror.
Pre-flight
Confirm the target disk, network, and clock before touching anything.
lsblk -o NAME,SIZE,TYPE,MODEL
ping -c2 gentoo.org
# Set the clock (UEFI/NTP)
chronyd -qDisk name The rest of this guide assumes the target is /dev/sda. On NVMe it is /dev/nvme0n1 and partitions are p1, p2, p3; adjust accordingly.
Partition (GPT / UEFI)
Scripted, non-interactive parted: ESP, swap, and an LVM partition for everything else.
| Part | Size | Role | FS |
|---|---|---|---|
| sda1 | 1 GiB | EFI System Partition | FAT32 |
| sda2 | 8 GiB | swap | swap |
| sda3 | rest | LVM PV (vg0) | ext4 |
# WARNING: wipes /dev/sda
parted -s -a optimal /dev/sda -- \
mklabel gpt \
mkpart ESP fat32 1MiB 1025MiB \
set 1 esp on \
mkpart swap linux-swap 1025MiB 9217MiB \
mkpart root 9217MiB 100% \
set 3 lvm on
parted /dev/sda printLVM + filesystems
# LVM: PV -> VG -> one root LV using all free space pvcreate /dev/sda3 vgcreate vg0 /dev/sda3 lvcreate -l 100%FREE -n root vg0 # Filesystems mkfs.vfat -F32 /dev/sda1 mkfs.ext4 /dev/vg0/root mkswap /dev/sda2 && swapon /dev/sda2
Dropped The old tune2fs -O extents,uninit_bg,dir_index and a post-format fsck are unnecessary; modern mkfs.ext4 already enables those features on a clean filesystem.
Mount
mount /dev/vg0/root /mnt/gentoo mkdir -p /mnt/gentoo/efi mount /dev/sda1 /mnt/gentoo/efi
Why /efi With a dist-kernel the kernel image lives in /boot on the root filesystem; the ESP only holds the GRUB EFI binary, so it is mounted at /efi.
Stage3 tarball
No separate Portage snapshot any more; that is handled by emerge-webrsync after chroot. Just fetch, verify, and extract a current stage3.
cd /mnt/gentoo # Browse the BG mirror and grab the latest desktop/openrc stage3 + .asc links http://mirrors.telepoint.bg/gentoo/releases/amd64/autobuilds/current-stage3-amd64-desktop-openrc/ # Verify the signature (keys ship on the install medium) gpg --verify stage3-*.tar.xz.asc # Extract, preserving permissions + xattrs tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner -C /mnt/gentoo
Variant Pick desktop-openrc for a workstation (matches GNOME later), or systemd if you prefer that init. The variant must match the profile chosen in Phase 6.
make.conf & chroot
Tune the compiler and turn on the binhost before chrooting, so the very first emerges already pull prebuilt packages.
# nproc expands to a real number at write time
cat >> /mnt/gentoo/etc/portage/make.conf <<EOF
COMMON_FLAGS="-O2 -pipe -march=native"
MAKEOPTS="-j$(nproc)"
EMERGE_DEFAULT_OPTS="--jobs=4 --load-average=$(nproc) --getbinpkg --binpkg-respect-use=y --quiet-build=y"
FEATURES="getbinpkg candy parallel-fetch"
ACCEPT_LICENSE="*"
VIDEO_CARDS="amdgpu radeonsi" # intel OR nvidia
GRUB_PLATFORMS="efi-64"
EOF# DNS for the new environment cp --dereference /etc/resolv.conf /mnt/gentoo/etc/ # Pseudo-filesystems (canonical handbook sequence) mount --types proc /proc /mnt/gentoo/proc mount --rbind /sys /mnt/gentoo/sys && mount --make-rslave /mnt/gentoo/sys mount --rbind /dev /mnt/gentoo/dev && mount --make-rslave /mnt/gentoo/dev mount --bind /run /mnt/gentoo/run && mount --make-slave /mnt/gentoo/run chroot /mnt/gentoo /bin/bash source /etc/profile export PS1="(chroot) ${PS1}"
Sync, profile & world
emerge-webrsync emerge --sync --quiet eselect news read eselect profile list # eselect profile set default/linux/amd64/23.0/desktop/gnome # Trust keyring for signed binary packages getuto # Bring the stage3 up to date (mostly downloads via binhost) emerge --getbinpkg -uDU --with-bdeps=y @world
Timezone & locale
echo "Europe/Sofia" > /etc/timezone emerge --config sys-libs/timezone-data cat > /etc/locale.gen <<EOF en_US.UTF-8 UTF-8 bg_BG.UTF-8 UTF-8 EOF locale-gen eselect locale list eselect locale set en_US.utf8 env-update && source /etc/profile
Optimized Dropped the legacy ISO-8859-1 and CP1251 locales; UTF-8 is all a modern desktop needs.
Kernel, firmware & initramfs
A binary dist-kernel replaces the old manual menuconfig build. dracut builds an initramfs that activates the LVM root at boot.
# LVM userspace (root is on LVM) + firmware + microcode emerge sys-fs/lvm2 sys-kernel/linux-firmware sys-firmware/intel-microcode # installkernel wires up dracut (initramfs) and the GRUB entry emerge sys-kernel/installkernel sys-kernel/dracut # Prebuilt, signed kernel; triggers initramfs + bootloader config emerge sys-kernel/gentoo-kernel-bin
Replaced The original make menuconfig + manual bzImage copy for kernel 2.6.34 is gone. To still build from source, use sys-kernel/gentoo-kernel (auto-built) or gentoo-sources for a hand-rolled config.
fstab
UUIDs survive disk reordering. This fills them in automatically from blkid.
{
echo "UUID=$(blkid -s UUID -o value /dev/sda1) /efi vfat defaults,noatime 0 2"
echo "UUID=$(blkid -s UUID -o value /dev/vg0/root) / ext4 noatime 0 1"
echo "UUID=$(blkid -s UUID -o value /dev/sda2) none swap sw 0 0"
} >> /etc/fstab
cat /etc/fstabHost, network, password & services
echo "gentoo" > /etc/hostname
# Simplest: DHCP on all interfaces
emerge net-misc/dhcpcd
rc-update add dhcpcd defaultStatic instead Modern netifrc replaces the old bash-array syntax: emerge net-misc/netifrc, then in /etc/conf.d/net use config_eno1=”192.168.0.2/24″ and routes_eno1=”default via 192.168.0.1″, then ln -s net.lo /etc/init.d/net.eno1 && rc-update add net.eno1 default. Check the real name with ip link.
passwd
# Logger, time, SSH, and LVM activation at boot
emerge app-admin/sysklogd net-misc/chrony net-misc/openssh
rc-update add sysklogd default
rc-update add chronyd default
rc-update add sshd default
rc-update add lvm bootFixed Your notes never set a root password (you would be locked out) and referenced a misspelled chronie; the service is chronyd.
Bootloader (GRUB / UEFI)
emerge sys-boot/grub grub-install --target=x86_64-efi --efi-directory=/efi grub-mkconfig -o /boot/grub/grub.cfg
BIOS / legacy Set GRUB_PLATFORMS=”pc” in make.conf instead of efi-64, then grub-install /dev/sda. The obsolete /etc/mtab step from the old notes is not needed; mtab is a symlink now.
Core tools, cron & desktop
emerge app-portage/gentoolkit app-portage/eix app-portage/cpuid2cpuflags \ sys-apps/pciutils sys-process/htop sys-apps/mlocate sys-process/cronie rc-update add cronie default eix-update cat > /var/spool/cron/crontabs/root <<EOF @daily /usr/bin/emerge-webrsync 2>/dev/null 1>/dev/null @daily /usr/bin/eix-update @daily /usr/bin/updatedb EOF
GNOME on OpenRC needs elogind. Heavy build even with the binhost; skip on a server.
emerge gnome-base/gnome rc-update add elogind boot rc-update add gdm default
After first boot Add your user and the workstation apps from the companion Gentoo Homelab Runbook (NextDNS, Tailscale, mpv, mounts, etc.).
Finalize & reboot
exit # leave the chroot
cd /
umount -R /mnt/gentoo
swapoff /dev/sda2
rebootCleaned up A single recursive umount -R replaces the old duplicate/partial unmounts and the accidental double reboot.
References
| Resource | Use | Link |
|---|---|---|
| Handbook: amd64 | Canonical install reference | wiki.gentoo.org |
| Distribution Kernel | gentoo-kernel-bin + dracut | Distribution kernel |
| Binary Host Quickstart | getbinpkg + getuto | binhost quickstart |
| LVM | Root-on-LVM specifics | wiki.gentoo.org/LVM |
| GRUB | UEFI + BIOS install | wiki.gentoo.org/GRUB |
| BG mirror | Telepoint Gentoo mirror | mirrors.telepoint.bg |