Check binfmt_misc module is loaded

Give a friendly error message early.
This commit is contained in:
Sam Tygier 2019-02-16 17:06:13 +00:00 committed by XECDesign
parent c147df99bc
commit a8eb03a5e4
3 changed files with 11 additions and 1 deletions

View file

@ -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/

View file

@ -15,3 +15,4 @@ curl
xxd
file
git
lsmod:kmod

View file

@ -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
}