Closed Risca closed 3 years ago
I had a strange issue with the pi-gen scripts:
[13:39:02] Begin /pi-gen/export-image
[13:39:02] Begin /pi-gen/export-image/prerun.sh
losetup: /pi-gen/work/2021-08-18-znail/export-image/2021-08-18-znail-lite.img: failed to set up loop device: No such file or directory
The issue magically disappeared when I added
set -x
to pi-gen/export-image/prerun.sh :man_shrugging:
That's unrelated to this pull request anyway
Nice!
I havent had time to test but my gut feeling is that the loopback issue happens when there are no unused loopback devices available. losetup
will then create a new one, that does not immediately become visible inside the Docker container where the build happens. Notably the new loopback device sticks around, so the next time the build runs a free device is available and it can proceed.
Assuming this is the case: I think the solution is to make sure there is a free loopback device available before starting the RPi build, or have Docker mount the hosts /dev
filesystem into the container. The later is a little bit dangerous :)
Also move the image files to dist/image/