diff options
author | Sam Tygier <[email protected]> | 2019-02-16 17:06:13 +0000 |
---|---|---|
committer | XECDesign <[email protected]> | 2019-02-18 09:45:10 +0000 |
commit | a8eb03a5e4f29ac48bf3fe427c2179f862e0a053 (patch) | |
tree | e49cc4584577cac895bb9804dbd1e006032c568c | |
parent | c147df99bcc3190a31c90faeab858b2e5e0c14e2 (diff) |
Check binfmt_misc module is loaded
Give a friendly error message early.
-rw-r--r-- | Dockerfile | 2 | ||||
-rw-r--r-- | depends | 1 | ||||
-rw-r--r-- | scripts/dependencies_check | 9 |
3 files changed, 11 insertions, 1 deletions
@@ -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/ @@ -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 } |