User Tools

This is an old revision of the document!


Quick & Dirty Gentoo Installation

For reference, always follow: Gentoo Handbook.

Why Gentoo Linux? Because its lightweight, gives you full control on your server and can be much more secure than others bloated Linux distributions.

Installing Gentoo Linux is less difficult than you might think. The great Gentoo Handbook is very well written and also fairly easy to follow if you don't rush it. I assume you are capable of following it up until you can boot a text-only system.

A few notes to follow:

  • don't bother with setting up the external data disks, you will do it later
  • don't install any graphical user interface, you will not need it
  • don't install SystemD as all commands are not for SystemD (or install it and adapt the commands)

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

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:

 > groupadd media

this will create a new group called media. You will need it later.

There are also a few specific tools we need to install for what comes ahead, let's do it:

 > emerge -v sys-fs/mdadm

mdadm are the software RAID tools.

Once you have Gentoo installed on your hardware, keep reading.

Boot on Linux

Access the PC in any (Linux) way, like:

Once inside, you will need to be root for all the subsequent steps.

Create a folder /mnt/gentoo:

 > mkdir /mnt/gentoo

Download Gentoo Stage 3 tarball from same link as installation ISO, then decompress it:

  • From Gentoo boot ISO, you can use <b>links</b> from text mode.
  • You will need to setup network, if not available. See the handbook above.
 > cd /mnt/gentoo
 >
 > tar xvfp stage3.blah-blah.tar.zy <-- note that the "p" is VERY important!

Prepare the chroot environment:

 > cp /etc/resolv.conf /mnt/gentoo/etc
 > modprobe efivarfs
 > for i in dev dev/pts sys run proc sys/firmware/efi/efivars; do mount /$i /mnt/gentoo/$i -o bind; done
 > chroot /mnt/gentoo /bin/bash
 > mkdir /boot 
 > mount /dev/sda1 /boot

Accept licenses, put this into <b>/etc/portage/make.conf</b>:

ACCEPT_LICENSE="-* @FREE @BINARY-REDISTRIBUTABLE @EULA"

echo “Europe/Brussels” > /etc/timezone emerge –config sys-libs/timezone-data /etc/locale.gen locale-gen

emerge –sync

eselect profile list

emerge -uv –deep –newuse @world

emerge -vp vim tmux cronie cpuid2cpuflags syslog-ng bash-completion chrony dosfstools io-scheduler-udev-rules intel-microcode emerge -vp genkernel gentoo-sources pci-utils usbutils mdadm

eselect kernel set 1

genkernel –mountboot –install all

passwd useradd user passwd user

edit /etC/conf/net rc-update add sshd default ln -s /etC/init.d/net.lo /etc/init.d/net.xxx rc-update add net.xxx default

Docker

Refer to: Gentoo Docker

emerge –ask –verbose app-containers/docker app-containers/docker-cli docker-compose

rc-update add docker default rc-service docker start

user $sudo sysctl net.ipv4.ip_forward=1

A more permanent change can be made with: FILE /etc/sysctl.d/local.confEnable ip forwarding persistently

net.ipv4.ip_forward=1

docker run –rm hello-world

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information