diff --git a/gentoostrap.sh b/gentoostrap.sh index 47fe4df..9a8ed5d 100755 --- a/gentoostrap.sh +++ b/gentoostrap.sh @@ -192,16 +192,18 @@ build-gentoo() { "${EDITOR:-vim}" "$_optdest/etc/fstab" # Now we need to pivot into a chroot and finish configuration natively - popd + popd > /dev/null 2>&1 log "Pivoting to container for more setup" cp "$0" "$_optdest/gentoostrap.sh" if ! grep -qs "$_optdest/proc " /proc/mounts; then + log "Mounting proc" mount --types proc /proc "$_optdest/proc" fi for dir in sys dev; do - if ! grep -qs "$_optdest/$mount " /proc/mounts; then - mount --rbind /$mount "$_optdest/$mount" - mount --make-rslave "$_optdest/$mount" + log "Mounting $dir" + if ! grep -qs "$_optdest/$dir " /proc/mounts; then + mount --rbind /$dir "$_optdest/$dir" + mount --make-rslave "$_optdest/$dir" fi done chroot "$_optdest" /gentoostrap.sh -c