Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gentoo:installation [2024/04/09 13:16] – willy | gentoo:installation [2025/03/13 14:49] (current) – [The fast&quick Gentoo Installation checklist] willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== | + | ====== |
| - | The **internal** server should be Gentoo. If you prefer a different distribution, go ahead, but you will need to adapt all the future instruction as i will use Gentoo. | + | Why [[https:// |
| - | The **external** | + | These instructions are aimed at supporting you during the installation of your home server, |
| - | All the following applies | + | This is not meant to be an exustive guide, as there are plenty |
| - | + | ||
| - | ===== Quick & Dirty Gentoo Installation ===== | + | |
| - | + | ||
| - | Why [[https://www.gwntoo.org|Gentoo | + | |
| 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. | 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. | ||
| - | |||
| - | For reference, always follow the [[https:// | ||
| 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 22: | 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 33: | Line 32: | ||
| Mount your root folder: | Mount your root folder: | ||
| <code bash> | <code bash> | ||
| - | > | + | mount /dev/sda2 /mnt/gentoo |
| </ | </ | ||
| Line 40: | 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 57: | 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 70: | Line 69: | ||
| It's time to populate the portage tree: | It's time to populate the portage tree: | ||
| <code bash> | <code bash> | ||
| - | > | + | emerge --sync |
| </ | </ | ||
| Configure your timezone (choose the correct one): | Configure your timezone (choose the correct one): | ||
| <code bash> | <code bash> | ||
| - | > | + | echo " |
| - | > emerge --config sys-libs/ | + | emerge --config sys-libs/ |
| </ | </ | ||
| Configure your locales by editing the file **/ | Configure your locales by editing the file **/ | ||
| <code bash> | <code bash> | ||
| - | > | + | 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 |
| </ | </ | ||
| Line 108: | 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 |
| </ | </ | ||
| Line 148: | Line 147: | ||
| Note: i don't care for SystemD. It does fix a problem i don't have and never had. It's a complication i never had a need for, and Gentoo gives me the choice to not use it. Please use it yourself if you prefer, just adapt the commands where it is involved accordingly. | Note: i don't care for SystemD. It does fix a problem i don't have and never had. It's a complication i never had a need for, and Gentoo gives me the choice to not use it. Please use it yourself if you prefer, just adapt the commands where it is involved accordingly. | ||
| - | ===== Specific installation finalization | + | ===== Specific installation finalization ===== |
| (not needed for the **external** server) | (not needed for the **external** server) | ||
| Line 155: | Line 154: | ||
| <code bash> | <code bash> | ||
| - | > | + | groupadd media |
| </ | </ | ||
| Line 162: | 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/ |
| </ | </ | ||