From 34e20535e0b390e6101143a4b222621d9f61ecf2 Mon Sep 17 00:00:00 2001 From: Trent Palmer Date: Mon, 19 Jun 2017 17:46:00 -0700 Subject: [PATCH] expand and extend this documentation --- gentoo_nspawn_container_on_Digital_Ocean.md | 28 +++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/gentoo_nspawn_container_on_Digital_Ocean.md b/gentoo_nspawn_container_on_Digital_Ocean.md index 2216b65..8dcc6cf 100644 --- a/gentoo_nspawn_container_on_Digital_Ocean.md +++ b/gentoo_nspawn_container_on_Digital_Ocean.md @@ -1,7 +1,8 @@ ## Install a Gentoo nspawn Container on Ubuntu 17.04 on Digital Ocean. Spin up an Ubuntu 17.04 droplet, because nspawn containers are slightly -more difficult with Ubuntu 16.04. Install systemd-container. +more difficult with Ubuntu 16.04. Install systemd-container. (This will also +work on your local workstation or laptop running Ubuntu 17.04.) ```bash apt install systemd-container @@ -28,7 +29,7 @@ passwd logout ``` -Because of how Digital Ocean sets up networking, if you want to subnet +Because of how Digital Ocean and Ubuntu set up networking, if you want to subnet the container, start systemd-network (systemd-resolved is probably already running). And optionally it's also pretty straightforward to create a /usr/portage directory on the host operating system, and then bind that directory to the container. @@ -54,6 +55,16 @@ from the host, but not locale. And your MAKEOPTS="-j", some things seem to not compile if your MAKEOPTS j number is more than the number of cores on the host. +Testing this on a local machine, the nspawn container does not inherit the +correct time-zone, so from the container's command line + +```bash +timedatectl set-timezone +``` + +[And here is what the Gentoo wiki has to say about setting the locale if you're concerned about that](https://wiki.gentoo.org/wiki/Localization/Guide#Generating_specific_locales), +again from the container's command line. + Your systemd-nspawn command will open up one root console, but if you use a multi-plexer like byobu you can run additional sessions with machinectl commands @@ -66,3 +77,16 @@ bash # to power down the container poweroff ``` + +Before you can install anything, you'll need to update your portage tree, +and `emerge-webrsync` takes care of that easily enough. + +If you want to update everything: `emerge -avDuN @world` + +By default, any overlays will end up in /var/lib/layman. +If you need to build mono, it needs a kernel config. Depending on the host +operating system you might be able to find one at /proc/config.gz, or in the +/boot directory. +If you find yourself fetching git repos repeatedly, +you can add `EVCS_OFFLINE=1` temporarily in make.conf, and any ebuild that +depends on git-r3.eclass will stop fetching from git.