RPi-Distro / pi-gen

Tool used to create the official Raspberry Pi OS images
BSD 3-Clause "New" or "Revised" License
2.58k stars 1.61k forks source link

error in docker build #287

Open artynet opened 5 years ago

artynet commented 5 years ago

Hello folks,

I bump into this issue when launching the docker build :

umount: /pi-gen/work/2019-05-24-myimage-name/stage2/rootfs/dev: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

real    35m19.690s
user    0m0.512s
sys     0m0.880s

the fact is that in stage2 I am using a 00-run-chroot.sh command script and I think it's the reason why the build crashes. While running this step, I usually make extensive use of different package managers :

Any pointers to overcome this crash due to the device lock ? thanks in advance.

Regards, Arturo

artynet commented 5 years ago

I've also reworked the Dockerfile with stretch as base layer to include an updated version of qemu-user

FROM debian:stretch

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get -y update && \
    apt-get -y install \
        git vim parted apt-utils \
        quilt coreutils debootstrap zerofree zip dosfstools \
        bsdtar libcap2-bin rsync grep udev xz-utils curl xxd file kmod\
    && rm -rf /var/lib/apt/lists/*

RUN wget http://ftp.de.debian.org/debian/pool/main/q/qemu/qemu-user-static_3.1+dfsg-8~deb10u1_amd64.deb && \
        dpkg -i qemu-user-static_3.1+dfsg-8~deb10u1_amd64.deb

COPY . /pi-gen/

VOLUME [ "/pi-gen/work", "/pi-gen/deploy"]

and the build goes further on obsolete systems as well. Anyway the problem still persists when using one of the given package managers....maybe npm is the culprit...