summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmkinitcpio4
1 files changed, 4 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 72e7ec8..d8ea31f 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -156,6 +156,10 @@ if [[ -t 2 ]] && (( COLOR )); then
fi
readonly NC BOLD BLUE GREEN RED YELLOW
+# insist that /proc and /dev be mounted (important for chroots)
+mountpoint -q /proc || die "/proc must be mounted!"
+mountpoint -q /dev || die "/dev must be mounted!"
+
if [[ $BASEDIR ]]; then
# resolve the path. it might be a relative path and/or contain symlinks
if ! pushd "$BASEDIR" &>/dev/null; then