Unmount directories before spawning systemd-nspawn

This commit is contained in:
Salt 2020-12-04 02:36:06 -06:00
parent c134eb0e99
commit 5bedbeec62

View File

@ -197,6 +197,9 @@ build-gentoo() {
popd popd
log "Pivoting to container for more setup" log "Pivoting to container for more setup"
cp "$0" "$_optdest/gentoostrap.sh" cp "$0" "$_optdest/gentoostrap.sh"
for dir in proc sys dev; do
umount "$_optdest/$dir" || :
done
sudo systemd-nspawn --directory="$_optdest" /gentoostrap.sh -c 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 # The nspawn container sadly cannot manipulate the environment entirely, so we need to now do an ACTUAL chroot to install GRUB