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

update-binfmts does not persist when WSL2 restarted #4520

Closed
danwalmsley opened this issue Sep 18, 2019 · 4 comments
Closed

update-binfmts does not persist when WSL2 restarted #4520

danwalmsley opened this issue Sep 18, 2019 · 4 comments

Comments

@danwalmsley
Copy link

Please use the following bug reporting template to help produce issues which are actionable and reproducible, including all command-line steps necessary to induce the failure condition. Please fill out all the fields! Issues with missing or incomplete issue templates will be closed.

If you have a feature request, please post to the UserVoice.

If this is a console issue (a problem with layout, rendering, colors, etc.), please post to the console issue tracker.

Important: Do not open GitHub issues for Windows crashes (BSODs) or security issues. Please direct all Windows crashes and security issues to secure@microsoft.com. Ideally, please configure your machine to capture minidumps, repro the issue, and send the minidump from "C:\Windows\minidump".

Please fill out the below information:

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    10.0.18980.1

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)
    im installing qemu, inside ubuntu (WSL2 enabled)

then doing... sudo update-binfmts --enable qemu-aarch64

then im using code that runs aarch64 binaries, all is well.

  • What's wrong / what should be happening instead:

after restarting wsl2 then I have to run this command again, its not persisted. In other environments this would normally persist.

  • Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).

  • For WSL launch issues, please collect detailed logs.

See our contributing instructions for assistance.

@therealkenc
Copy link
Collaborator

No systemd so no systemd-binfmt.service. Landing zone is #994.

@danwalmsley
Copy link
Author

@therealkenc thats fine, but there may be a workaround to my issue? Like a config file you can specify commands that get run as root, whenever the vm fires up? or before ubuntu console is opened?

@therealkenc
Copy link
Collaborator

The go-to solution for all things missing from /init is to put the program in /etc/sudoers with NOPASSWD and launch it in .bashrc. There's a few other ways you can go.

Mine personally is using the shell history......

@danwalmsley
Copy link
Author

@therealkenc sorry for delay in response, thank you very much exactly what I needed.

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

2 participants