From 5bedbeec628162d54ec8106bf955372034352843 Mon Sep 17 00:00:00 2001 From: Salt Date: Fri, 4 Dec 2020 02:36:06 -0600 Subject: [PATCH] Unmount directories before spawning systemd-nspawn --- gentoostrap.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gentoostrap.sh b/gentoostrap.sh index 957a5cb..dd2fb0c 100755 --- a/gentoostrap.sh +++ b/gentoostrap.sh @@ -197,6 +197,9 @@ build-gentoo() { popd log "Pivoting to container for more setup" cp "$0" "$_optdest/gentoostrap.sh" + for dir in proc sys dev; do + umount "$_optdest/$dir" || : + done sudo systemd-nspawn --directory="$_optdest" /gentoostrap.sh -c # The nspawn container sadly cannot manipulate the environment entirely, so we need to now do an ACTUAL chroot to install GRUB