Situatie
1.Boot from the USB and open a terminal.
Check internet connectivity:
If not connected:
- Use
nmtuifor Wi-Fi - Or configure networking manually using
ipordhcpcd
2. Disk Partitioning
Identify your disk:
Assume /dev/sda.
Start partitioning:
Example layout (UEFI):
/dev/sda1— EFI partition (512 MB)/dev/sda2— root partition (remaining space)
3. Format Partitions
mkfs.ext4 /dev/sda2
mkdir -p /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
5. Download and Extract Stage3
Go to:
https://www.gentoo.org/downloads/
Download a suitable stage3 tarball (OpenRC or systemd).
Example:
wget <stage3-url>
tar xpvf stage3-*.tar.xz –xattrs-include=‘*.*’ –numeric-owner
6. Configure Portage Environment
Copy DNS configuration:
Mount system directories:
mount –rbind /sys /mnt/gentoo/sys
mount –make-rslave /mnt/gentoo/sys
mount –rbind /dev /mnt/gentoo/dev
mount –make-rslave /mnt/gentoo/dev
7. Chroot into Gentoo
source /etc/profile
export PS1=“(gentoo) $PS1“
8. Sync Portage Tree
emerge –sync
9. Configure make.conf
Edit:
Basic configuration:
MAKEOPTS=“-j$(nproc)“
Optional USE flags:
Keep USE flags minimal at first.
10. Select Profile
eselect profile set <number>
Choose based on your needs:
- default/linux/amd64
- desktop profile
- systemd or OpenRC variant
11. Update System
This compiles the base system and may take significant time.
12. Timezone and Locale
Set timezone:
emerge –config sys-libs/timezone-data
Configure locale:
Add:
Generate:
eselect locale set en_US.utf8
13. Install Kernel
Recommended method:
Manual method:
cd /usr/src/linux
make menuconfig
make -j$(nproc)
make modules_install
make install
14. Configure fstab
Example:
/dev/sda2 / ext4 noatime 0 1
15. Install Bootloader (GRUB)
grub-install –target=x86_64-efi –efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg
16. Set Root Password
17. Install Basic Tools
Enable networking:
18. Create User
passwd youruser
Enable sudo:
Uncomment:
19. Exit and Reboot
umount -l /mnt/gentoo/dev{/shm,/pts,}
umount -R /mnt/gentoo
reboot
Post-Installation Setup
Desktop Environment (example GNOME)
rc-update add gdm default
Xorg (if needed)
Audio (PipeWire)
Performance Optimizations
Enable ccache:
Binary packages:
Common Pitfalls
- Incorrect kernel configuration can prevent booting
- Missing filesystem support in kernel
- Overusing USE flags early in setup
- Forgetting to mount
/bootbefore installing kernel.
Leave A Comment?