Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gentoo:installation [2024/02/07 13:01] – willy | gentoo:installation [2025/03/13 14:49] (current) – [The fast&quick Gentoo Installation checklist] willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | Why [[https:// | + | Why [[https:// |
| - | When installing Gentoo Linux you have the total freedom to choose any single piece of the system, including whether to install | + | These instructions are aimed at supporting |
| - | For reference, always follow | + | This is not meant to be an exustive guide, as there are plenty of good resources on the topic, specially |
| + | |||
| + | When installing Gentoo Linux you have the total freedom to choose any single piece of the system, including whether to install or not a Cron Daemon and even a logger daemon. No other distro gives you so much freedom. Moreover, while you can use SystemD and NetworkManager with Gentoo, you are **not** forced to use them, and in fact specially for small servers, they might both be unneeded. | ||
| Installing Gentoo Linux is less difficult than you might think. The great [[https:// | Installing Gentoo Linux is less difficult than you might think. The great [[https:// | ||
| + | |||
| ===== The fast& | ===== The fast& | ||
| Line 14: | Line 17: | ||
| **Prerequisite**: | **Prerequisite**: | ||
| + | |||
| + | I will assume your home server has one drive dedicated to the Gentoo installation. Data, media, and other files will be stored on a separate RAID array of some kind. | ||
| + | |||
| + | Please do not configure that RAID array now, but read the [[gentoo: | ||
| === Get Ready for First Boot === | === Get Ready for First Boot === | ||
| Line 25: | Line 32: | ||
| Mount your root folder: | Mount your root folder: | ||
| <code bash> | <code bash> | ||
| - | > | + | mount /dev/sda2 /mnt/gentoo |
| </ | </ | ||
| Line 32: | Line 39: | ||
| Decompress the Stage 3, be careful to specify the following options (the ' | Decompress the Stage 3, be careful to specify the following options (the ' | ||
| <code bash> | <code bash> | ||
| - | > | + | cd / |
| - | > tar xvfp stage3.blah-blah.tar.zy | + | tar xvfp stage3.blah-blah.tar.zy |
| </ | </ | ||
| Prepare and enter the chroot environment: | Prepare and enter the chroot environment: | ||
| <code bash> | <code bash> | ||
| - | > | + | cp / |
| - | > modprobe efivarfs | + | modprobe efivarfs |
| - | > for i in dev dev/pts sys run proc sys/ | + | for i in dev dev/pts sys run proc sys/ |
| - | > chroot /mnt/gentoo /bin/bash | + | chroot /mnt/gentoo /bin/bash |
| - | > source / | + | source / |
| </ | </ | ||
| Line 49: | Line 56: | ||
| You also need, now, to mount the boot/efi partition in side the chroot (let's assume it's **/ | You also need, now, to mount the boot/efi partition in side the chroot (let's assume it's **/ | ||
| <code bash> | <code bash> | ||
| - | > mkdir /boot | + | mkdir /boot |
| - | > mount /dev/sda1 /boot | + | mount /dev/sda1 /boot |
| </ | </ | ||
| Line 60: | Line 67: | ||
| </ | </ | ||
| - | Configure your timezone (choose | + | It's time to populate |
| <code bash> | <code bash> | ||
| - | > echo " | + | emerge --sync |
| - | > | + | |
| </ | </ | ||
| - | Configure your locales by editing | + | Configure your timezone (choose |
| <code bash> | <code bash> | ||
| - | > locale-gen | + | echo " |
| + | emerge | ||
| </ | </ | ||
| - | It's time to populate | + | Configure your locales by editing |
| <code bash> | <code bash> | ||
| - | > emerge | + | locale-gen |
| </ | </ | ||
| And select your preferred profile. I would choose a plain basic profile like **default/ | And select your preferred profile. I would choose a plain basic profile like **default/ | ||
| <code bash> | <code bash> | ||
| - | > | + | eselect profile list |
| </ | </ | ||
| Install and properly setup your CPU flags: | Install and properly setup your CPU flags: | ||
| <code bash> | <code bash> | ||
| - | > | + | emerge -vp cpuid2cpuflags |
| - | > echo "*/* $(cpuid2cpuflags)" | + | echo "*/* $(cpuid2cpuflags)" |
| </ | </ | ||
| Now reinstall/ | Now reinstall/ | ||
| <code bash> | <code bash> | ||
| - | > | + | emerge -uv --deep --newuse @world |
| </ | </ | ||
| And it's time to install some basic stuff (pick your own! there are also many choices): | And it's time to install some basic stuff (pick your own! there are also many choices): | ||
| <code bash> | <code bash> | ||
| - | > emerge -vp genkernel gentoo-sources | + | > emerge -vp genkernel gentoo-sources |
| </ | </ | ||
| Research each one and pick yours. | Research each one and pick yours. | ||
| Line 100: | Line 107: | ||
| Now it's time to build the kernel: | Now it's time to build the kernel: | ||
| <code bash> | <code bash> | ||
| - | > | + | eselect kernel set 1 |
| - | > genkernel --mountboot --install all | + | genkernel --mountboot --install all |
| </ | </ | ||
| Then create a user and set root password: | Then create a user and set root password: | ||
| <code bash> | <code bash> | ||
| - | > | + | passwd |
| - | > useradd user | + | useradd user |
| - | > passwd user | + | passwd user |
| </ | </ | ||
| Setup network and ensure SSH starts by default on boot (i assume your ethernet device is called xxx, you can check in / | Setup network and ensure SSH starts by default on boot (i assume your ethernet device is called xxx, you can check in / | ||
| <code bash> | <code bash> | ||
| - | > | + | vi / |
| - | > rc-update add sshd default | + | rc-update add sshd default |
| - | > ln -s / | + | ln -s / |
| - | > rc-update add net.xxx default | + | rc-update add net.xxx default |
| </ | </ | ||
| Last, setup boot loader (Grub2 here): | Last, setup boot loader (Grub2 here): | ||
| <code bash> | <code bash> | ||
| - | > | + | grub-install --target=x86_64-efi --efi-directory=/ |
| </ | </ | ||
| Line 132: | Line 139: | ||
| A few more notes and suggestion that will be important in the future. | A few more notes and suggestion that will be important in the future. | ||
| - | |||
| A few notes to follow: | A few notes to follow: | ||
| Line 142: | Line 148: | ||
| ===== Specific installation finalization ===== | ===== Specific installation finalization ===== | ||
| + | |||
| + | (not needed for the **external** server) | ||
| You will need to create a special group called **media** which will be used to allow the different tools to access the respective data folders without compromising the security of your installation and media collection: | You will need to create a special group called **media** which will be used to allow the different tools to access the respective data folders without compromising the security of your installation and media collection: | ||
| <code bash> | <code bash> | ||
| - | > | + | groupadd media |
| </ | </ | ||
| Line 153: | Line 161: | ||
| There are also a few specific tools we need to install for what comes ahead, let's do it: | There are also a few specific tools we need to install for what comes ahead, let's do it: | ||
| <code bash> | <code bash> | ||
| - | > | + | emerge -v sys-fs/ |
| </ | </ | ||