aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Tygier <[email protected]>2019-02-16 17:06:13 +0000
committerXECDesign <[email protected]>2019-02-18 09:45:10 +0000
commita8eb03a5e4f29ac48bf3fe427c2179f862e0a053 (patch)
treee49cc4584577cac895bb9804dbd1e006032c568c
parentc147df99bcc3190a31c90faeab858b2e5e0c14e2 (diff)
Check binfmt_misc module is loaded
Give a friendly error message early.
-rw-r--r--Dockerfile2
-rw-r--r--depends1
-rw-r--r--scripts/dependencies_check9
3 files changed, 11 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index 22797d5..a3f53ec 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,7 +6,7 @@ RUN apt-get -y update && \
apt-get -y install \
git vim parted \
quilt realpath qemu-user-static debootstrap zerofree pxz zip dosfstools \
- bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file \
+ bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\
&& rm -rf /var/lib/apt/lists/*
COPY . /pi-gen/
diff --git a/depends b/depends
index c5308d5..349118e 100644
--- a/depends
+++ b/depends
@@ -15,3 +15,4 @@ curl
xxd
file
git
+lsmod:kmod
diff --git a/scripts/dependencies_check b/scripts/dependencies_check
index 1b92a9c..9b7725e 100644
--- a/scripts/dependencies_check
+++ b/scripts/dependencies_check
@@ -27,4 +27,13 @@ dependencies_check()
echo "$missing"
false
fi
+
+
+ if ! lsmod | grep binfmt_misc >/dev/null
+ then
+ echo "Module binfmt_misc not loaded in host"
+ echo "Please run:"
+ echo " sudo modprobe binfmt_misc"
+ exit 1
+ fi
}