Closed jano42 closed 6 years ago
I don't use docker so I'm a bit in the dark here, but to me it seems like qemu-static is missing. The error is saying that /bin/bash in the roots dir is the wrong format so it can't exec it.
in the log that is 32bit aka armhf, so you need to make sure you have qemu-arm-static avail in the builder (docker?) so that it can get copied into rootfs, it then gets removed once we are done with it.
I'll add a check for QEMU with a proper error, maybe that will help.
there try that
did you get this working? Is this ticket still an issue?
I am having what looks like a similar problem:
Processing plugins/stretch/extrapackages...
- found packages ... adding
Processing plugins/stretch/noPersistentNetGen...
- found files ... adding
Processing plugins/stretch/oldNetNaming...
- found files ... adding
Processing plugins/alsa...
- found packages ... adding
- found postinst ... adding
Processing plugins/common...
- found files ... adding
- found packages ... adding
- found postinst ... adding
Processing plugins/dbreconfig...
- found files ... adding
- found packages ... adding
- found postinst ... adding
Processing plugins/disableroot...
- found postinst ... adding
Processing plugins/extrapackages...
- found packages ... adding
Processing plugins/fake-hwclock...
- found packages ... adding
- found postinst ... adding
Processing plugins/fsckboot...
- found packages ... adding
- found postinst ... adding
Processing plugins/hostname...
- found files ... adding
- found packages ... adding
- found postinst ... adding
Processing plugins/resizefs...
- found files ... adding
- found packages ... adding
- found postinst ... adding
Processing plugins/sshkeys...
- found files ... adding
- found postinst ... adding
Processing plugins/swap...
- found packages ... adding
- found postinst ... adding
Processing plugins/tmpfs...
- found packages ... adding
- found postinst ... adding
mount: permission denied
rootfs.mak:112: recipe for target '/opt/rpi-img-builder/rootfs' failed
make: *** [/opt/rpi-img-builder/rootfs] Error 32
Section in rootfs.mak in the version that I have is:
111 $(ROOTFS_DIR): $(ROOTFS_DIR).base
112 rsync --quiet --archive --devices --specials --hard-links --acls --xattrs --sparse $(ROOTFS_DIR).base/* $@
This looks to be after the QEMU check that you added.
For me, the problem was solved by running the container with --privileged
. It seems strange that it is necessary though.
sadly I know very little about docker, that being said it does run apt-get which required root proves to run. You might be able to solve this by giving the required perms to the run you want to run as?
The docker container running rpi-img-builder needs the privileged permission to perform the mount, so I guess it is understandable.
My contribution to this issue is not helpful - probably different to the problem @jano42 was having.
@TheSin- Sorry for answer delay; but issue is still opened. With the qemu check, it does not change (path is found)
I finally manage to make qemu works. This was a problem with the Docker container and its entrypoint.
My tests are still in progress (I still have other errors which I try to solve one by one).
When all will be ok; I'll publish my docker file and my entrypoint (so you could reuse it)
success ! I'm able to build a raspberrypi image inside docker container.
To do that, you must have a specific Docker file, using an entrypoint which is making the good commands.
See attached files Dockerfile+entrypoint.zip
I've created a fresh new docker container.
https://hub.docker.com/r/yadoms/ubuntu_rpi_image/
It is based on Ubuntu 17.04, and prerequisites are installed.
When running "make" I've got an error.
The command
The error
The log
rpi_image_builder.log
I've tested with explicit 32 or 64 bits, but I still have the same errors.
Is there something missing ?