-- psrtition the drive -- fdisk /dev/sda pvcreate /dev/sda2 vgcreate gentoo /dev/sda2 lvcreate -L 1G -n tmp gentoo lvcreate -L 4G -n swap gentoo lvcreate -L 4G -n var_log gentoo lvcreate -l100%FREE -n root gentoo -- setup file systems -- mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/gentoo/root mkfs.ext4 /dev/gentoo/var_log mkfs.ext4 /dev/gentoo/tmp mkswap /dev/gentoo/swap swapon /dev/gentoo/swap -- mount partitions -- mount /dev/gentoo/root /mnt/gentoo cd /mnt/gentoo mkdir -p boot tmp var/log mount /dev/sda1 /mnt/gentoo/boot mount /dev/gentoo/var_log /mnt/gentoo/var/log mount /dev/gentoo/tmp /mnt/gentoo/tmp chmod 1777 /mnt/gentoo/tmp -- install systemd stage3 -- cd /root wget http://spout.ussg.indiana.edu/linux/gentoo/releases/amd64/autobuilds/20180308/systemd/stage3-amd64-systemd-20180308.tar.bz2 wget http://spout.ussg.indiana.edu/linux/gentoo/releases/amd64/autobuilds/20180308/systemd/stage3-amd64-systemd-20180308.tar.bz2.DIGESTS cat stage3-amd64-systemd-20180308.tar.bz2.DIGESTS openssl dgst -r -sha512 stage3-amd64-systemd-20180308.tar.bz2 cd /mnt/gentoo tar xpf /root/stage3-amd64-systemd-20180308.tar.bz2 --xattrs-include='*.*' --numeric-owner cp --dereference /etc/resolv.conf /mnt/gentoo/etc/ mkdir --parents /mnt/gentoo/etc/portage/repos.conf cp /mnt/gentoo/usr/share/portage/config/repos.conf /mnt/gentoo/etc/portage/repos.conf/gentoo.conf -- mount additional filesystems -- mount -t proc none /mnt/gentoo/proc mount --rbind /dev /mnt/gentoo/dev mount --rbind /sys /mnt/gentoo/sys -- enter chroot -- chroot /mnt/gentoo /bin/bash source /etc/profile export PS1="(chroot) $PS1" -- setup portage -- emerge-webrsync -- ensure mtab is symlink -- ln -sf /proc/self/mounts /etc/mtab -- configure basic system properties -- nano /etc/hostname (no domain name) nano /etc/hosts (domain name here) nano /etc/fstab nano /etc/systemd/network/50-dhcp_enp0s3.network [Match] Name=enp0s3 [Network] DHCP=yes nano /etc/portage/make.conf add device-mapper to USE variable add -march=native to CFLAGS ensure CXXFLAGS is the same as CFLAGS passwd -- install kernel and system tools -- emerge -av gentoo-sources lvm2 linux-firmware genkernel-next cronie mlocate dhcpcd rsyslog grub nano /etc/genkernel.conf (lvm udev -> YES) nano /etc/grub/default (dolvm and systemd in CMDLINE_LINUX) -- compile the kernel using genkernel -- genkernel --menuconfig --all select systemd from gentoo specific init systems -- install grub to mbr -- mkdir /boot/grub grub-mkconfig -o /boot/grub/grub.cfg grub-install /dev/sda exit reboot -- setup systemd services -- systemd-machine-id-setup localectl set-locale LANG=en_US.utf8 systemctl enable systemd-networkd.service systemctl enable rsyslog systemctl enable cronie -- add normal user account -- useradd -m -G users,wheel,systemd-journal -s /bin/bash syseng passwd syseng reboot