Giter Site home page Giter Site logo

Comments (8)

alejandro-perez avatar alejandro-perez commented on July 23, 2024 10

Appears to be solved with docker run --rm --privileged multiarch/qemu-user-static:register --reset --credential yes

from qemu-user-static.

junaruga avatar junaruga commented on July 23, 2024 2

Now better alternative. The binfmt_misc files are updated as flags: OCF.

$ uname -m
x86_64

$ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes --credential yes

$ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
enabled
interpreter /usr/bin/qemu-aarch64-static
flags: OCF
offset 0
magic 7f454c460201010000000000000000000200b700
mask ffffffffffffff00fffffffffffffffffeffffff

Then run a Debian aarch64 container arm64v8/debian for testing.

$ docker run --rm -it arm64v8/debian bash

Then below commands work in the container. Though I do not know the warning "/bin/ls: /etc/sudoers: Function not implemented".

# apt-get -y update
# apt-get -y install sudo
# echo "test_user ALL = NOPASSWD: ALL" >> /etc/sudoers
# useradd -m test_user
# su - test_user
$ sudo ls -l /etc/sudoers 
/bin/ls: /etc/sudoers: Function not implemented
-r--r----- 1 root root 699 Aug  6 13:01 /etc/sudoers

I close this ticket. But feel free to reopen if you need something.
Thanks.

from qemu-user-static.

hurricanehrndz avatar hurricanehrndz commented on July 23, 2024

The problem is with the registration strings, it is missing the correct flags (POC, needs to be added as suffix) just as @amon-ra mentions. I have verified that if you use the upstream binfmt configuration script that sudo works on emulated CPUs.

from qemu-user-static.

moul avatar moul commented on July 23, 2024

I just opened a PR (#23) which uses the official script to configure binfmt

from qemu-user-static.

greyltc avatar greyltc commented on July 23, 2024

I'm getting this today on version 2.12

from qemu-user-static.

greyltc avatar greyltc commented on July 23, 2024

Should this bug be fixed in 2.12?

from qemu-user-static.

alejandro-perez avatar alejandro-perez commented on July 23, 2024

I also have this problem. Is there any way we can solve this?

from qemu-user-static.

junaruga avatar junaruga commented on July 23, 2024

@amon-ra Could you solve this issue? are you fine to close this ticket?

from qemu-user-static.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.