User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gentoo:installation [2024/10/24 11:18] willygentoo:installation [2026/02/25 08:26] (current) willy
Line 1: Line 1:
-====== Gentoo Linux Installation ======+====== A) Gentoo Linux Installation ======
  
-Why [[https://www.gwntoo.org|Gentoo Linux]]? In short, because its lightweight, gives you full control on your server and can be much more secure than others bloated Linux distributions. More in detail, see [[selfhost:linux|here]].+Why [[https://www.gwntoo.org|Gentoo Linux]]? In short, because its lightweight, gives you full control on your server and can be much more secure than others bloated Linux distributions. More in detail.
  
 These instructions are aimed at supporting you during the installation of your home server, the one on which most, or all, your self-hosted home services will run. This same page can be referred to when installing your //external// server(s), provided they don't already come pre-installed with some other flavour of Linux. These instructions are aimed at supporting you during the installation of your home server, the one on which most, or all, your self-hosted home services will run. This same page can be referred to when installing your //external// server(s), provided they don't already come pre-installed with some other flavour of Linux.
Line 17: Line 17:
  
 **Prerequisite**: you already know //where// (on which disk/partition) you are going to install Gentoo and which IP address you want to use for your home (internal) network. **Prerequisite**: you already know //where// (on which disk/partition) you are going to install Gentoo and which IP address you want to use for your home (internal) network.
 +
 +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:storage|Storage Setup]] page.
  
 === Get Ready for First Boot === === Get Ready for First Boot ===
Line 79: Line 83:
 </code> </code>
  
-And select your preferred profile. I would choose a plain basic profile like **default/linux/amd64/17.1** or a **selinux/hardened** one if you feel adventurous:+And select your preferred profile. I would choose a plain basic profile like **default/linux/amd64/23.0** or a **selinux/hardened** one if you feel adventurous:
 <code bash> <code bash>
 eselect profile list eselect profile list
Line 97: Line 101:
 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 pciutils usbutils mdadm vim tmux cronie  syslog-ng bash-completion chrony dosfstools  io-scheduler-udev-rules intel-microcode + > emerge -vp pciutils usbutils mdadm vim tmux cronie  syslog-ng bash-completion chrony dosfstools  io-scheduler-udev-rules intel-microcode 
 </code> </code>
 Research each one and pick yours. Research each one and pick yours.
  
-Now it's time to build the kernel:+Setup boot loader (assuming grub2 here):
 <code bash> <code bash>
 +grub-install --target=x86_64-efi --efi-directory=/boot
 +</code>
 +
 +Now it's time to build the kernel, here you have two choices, either go with a fully source kernel or use the gentoo-kernel-bin package to reduce compile time.
 +
 +To go the source way emerge **genkernel** and the latest gentoo sources, then run genkernel:
 +<code bash>
 +emerge -vp genkernel gentoo-sources 
 eselect kernel set 1 eselect kernel set 1
 genkernel --mountboot --install all genkernel --mountboot --install all
 +grub-mkconfig -o /boot/grub/grub.conf
 </code> </code>
 +
 +For the binary kernel instead:
 +<code bash>
 +echo "sys-kernel/installkernel dracut grub" >> /etc/portage/package.use/kernel
 +emerge gentoo-kernel-bin
 +</code>
 +
 +When using the binary kernel, you don't need to run grub-mkconfig.
 +
  
 Then create a user and set root password: Then create a user and set root password:
Line 120: Line 142:
 ln -s /et/init.d/net.lo /etc/init.d/net.xxx ln -s /et/init.d/net.lo /etc/init.d/net.xxx
 rc-update add net.xxx default rc-update add net.xxx default
-</code> 
- 
-Last, setup boot loader (Grub2 here): 
-<code bash> 
-grub-install --target=x86_64-efi --efi-directory=/boot 
 </code> </code>