Thanks to visit codestin.com
Credit goes to github.com

Skip to content

binfmt_misc

Jonathan edited this page Jun 18, 2025 · 4 revisions

binfmt_misc is a Linux kernel feature to register "runners" for certain types of binaries.

To automatically run Hermit images using a cargo installed Uhyve directly by running the following:

sudo sh -c "echo :hermit:M:7:\\xff::$HOME/.cargo/bin/uhyve: > /proc/sys/fs/binfmt_misc/register'

Afterwards, you can invoke kernels such as ./data/x86_64/rusty_demo directly.

Screenshot of rusty_demo kernel running by simply entering ./data/x86_64/rusty_demo in the kernel

It is possible to use both environment variables and Uhyve's CLI parameters.

Attempting to run ./data/x86_64/hello_world with the environment variable HERMIT_GDB_PORT, which works, and then trying again together with the CLI parameter --cpu-count 4, which returns an error. gdbstub is only supported with one CPU. This shows that Uhyve parses both environment variables and CLI parameters

Clone this wiki locally