Failed to generate LoRa Sever image for Raspberry Pi 3


#1

Hi, there.

I had tried to generate a Raspbian based LoRa Server image for the Raspberry Pi on my Raspberry Pi 3 model B.
But I could not generate it because system error occurred.

In advance, I write down what I did in order.

  1. Install docker

  2. Install dependencies image generator:

 sudo apt installquilt parted realpath qemu-user-static debootstrap zerofree pxz zip dosfstools bsdtar libcap2 bin grep rsync
  1. git clone the repository
git clone https://github.com/brocaar/loraserver-pi-gen
  1. modify two files for my region

    • stage3/02-packet-forwarder/files/global_conf.json
    • stage3/04-loraserver/files/loraserver.toml
  2. try to genarate image

sudo ./build-docker.sh

But I had done 5(sudo ./build-docker.sh), then It desplayed Error message as follows:

Sending build context to Docker daemon  839.7kB
Step 1/5 : FROM debian:stretch
 ---> cada78b802e5
Step 2/5 : ENV DEBIAN_FRONTEND noninteractive
 ---> Using cache
 ---> 5a5aa0567ef5
Step 3/5 : 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     && rm -rf /var/lib/apt/lists/*
 ---> Running in c64c392a70c1
standard_init_linux.go:190: exec user process caused "no such file or directory"
The command '/bin/sh -c 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     && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1

I think this error occurred by rm -rf /var/lib/apt/lists/* because rm command is file operation.
However there is indeed /var/lib/apt/list/*.

~/loraserver-pi-gen $ sudo ls -a /var/lib/apt/lists/*
/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_stretch_InRelease
/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_stretch_main_binary-armhf_Packages
/var/lib/apt/lists/archive.raspberrypi.org_debian_dists_stretch_ui_binary-armhf_Packages
/var/lib/apt/lists/lock
/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_InRelease
/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_contrib_binary-armhf_Packages
/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_main_binary-armhf_Packages
/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_non-free_binary-armhf_Packages
/var/lib/apt/lists/raspbian.raspberrypi.org_raspbian_dists_stretch_rpi_binary-armhf_Packages

/var/lib/apt/lists/partial:
.  ..

Please teach me to solve this problem.
And sorry for my poor English.
Thanks.


#2

I’m not sure what the issue is, but I’m happy to share that the past weeks I’ve been working on a better image generator for Raspberry Pi targets :slight_smile: I expect to announce / open-source this within the next week(s) or even days if all goes well!