Table of Content
I decided to move my Server from Strato to netcup. Therefore, I have to setup a fresh Gentoo as Root-Server.
I will note some points and give hints to some interesting articles and manuals.
Requirements
We will use a single drive called
/dev/sda
Goal
Server:
- Root-Filesystem ZFS
Partitioning
sda1 grub
sda2 boot
sda3 rootfs – ZFS
NAME | MOUNTPOINT |
---|---|
rpool | none |
rpool/GENTOO | none |
rpool/GENTOO/build-dir | /var/tmp/portage |
rpool/GENTOO/distfiles | /usr/portage/distfiles |
rpool/GENTOO/packages | /usr/portage/packages |
rpool/GENTOO/portage | /usr/portage |
rpool/HOME | /home |
rpool/HOME/root | /root |
rpool/ROOT | none |
rpool/ROOT/gentoo | / |
rpool/swap | - |
Initramfs
To enable gentoo to load ZFS during boot we need to add some modules (server is virtualized) to our Initramfs. Therefore, we have to edit
/opt/bliss-initramfs/pkg/hooks/Addon.py
:
ZFS Snapshots
We use zfs-auto-snapshot
from portage to create automated snapshots.
To enable automated snapshots you have to set an auto-snapshot parameter as stated in the installation output:
This will create snapshots every hour, day and week (depends on your setting). Here you can see an example output:
For Security Improvements
- portsentry
- chkrootkit
- fail2ban
- and many more
Links
Fearedbliss: Installing Gentoo Linux On ZFS (wiki)
Fearedbliss: Github-Page