Downloading the Stage Tarball:
mkdir /var/lib/machines/gentoo-stage3-amd64 && cd /var/lib/machines/gentoo-stage3-amd64
wget https://gentoo.osuosl.org/releases/amd64/autobuilds/current-stage3-amd64-systemd/stage3-amd64-systemd-*.tar.xz
tar xpvf stage3-*.tar.xz --xattrs-include='*.*' --numeric-owner
Config file: gentoo-stage3-amd64.nspawn
[Exec]
Boot=1
PrivateUsers=off
[Files]
BindReadOnly=/var/db/repos
BindReadOnly=/usr/src
Bind=/var/cache/distfiles
Bind=/var/cache/binpkgs
Bind=/var/tmp/portage
Set password:
systemd-nspawn --settings=no -D /var/lib/machines/gentoo-stage3-amd64
passwd
exit
Boot and update:
systemd-nspawn --machine=gentoo-stage3-amd64
emerge --metadata
emerge --deep --newuse --update --ask --jobs 4 @system
emerge bash-completition
systemctl poweroff
chroot
mount --types proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
to install/update grub: mount /boot in chroot!
flushing the environment during chroot
env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash