Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use QEMU with namespace backend #260

Open
fsquillace opened this issue Jan 17, 2021 · 1 comment
Open

Use QEMU with namespace backend #260

fsquillace opened this issue Jan 17, 2021 · 1 comment

Comments

@fsquillace
Copy link
Owner

fsquillace commented Jan 17, 2021

If binfmt-user-static is installed in the native OS (say x86_64 arch), it is possible to run JuNest on a different architecture (say ARM) using the namespace more. More information here

To achieve this on a JuNest ARM architecture with x86_64 arch native system:

bwrap <all_common_bwrap_options_to_bind> /tmp/qemu-arm-static /bin/sh

where bwrap and qemu-arm-static are x86_64 compiled binaries. qemu-arm-static must be within the JuNest env in order for this to work.

The biggest challenge is how to set binfmt as unprivileged user. There are attempt to have binfmt for unprivileged containers. Some references here:

Reference about the need to use binfmt for making is working:

@fsquillace
Copy link
Owner Author

Modified the line in namespace.sh in this way:

JUNEST_ENV=1 ~/.junest/usr/bin/bwrap $COMMON_BWRAP_OPTION $backend_args /usr/bin/qemu-arm-static -L ~/.junest-arm ~/.junest-arm/lib/ld-linux-armhf.so.3 "${DEFAULT_SH[@]}" "${args[@]}"

/usr/bin/qemu-arm-static has to be within the junest image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant