box86 icon indicating copy to clipboard operation
box86 copied to clipboard

binfmt configuration not registered on Debian (sid)

Open CalcProgrammer1 opened this issue 4 years ago • 3 comments

I have installed both Box86 and Box64 on my Rock Pi 4B (Armbian Sid) and then used multiarch support to install i386 mesa-utils. The expectation is that glxgears would run without calling 'box86 glxgears'. Instead, I get exec format error.

I fixed it by making the following files:

/usr/share/binfmts/box86.conf:

package box86
interpreter /usr/local/bin/box86
magic \x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff

/usr/share/binfmts/box64.conf:

package box64
interpreter /usr/local/bin/box64
magic \x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff

Seems Debian uses a different format than what box86/64's installer puts in /etc/binfmts.d.

After rebooting, I can open i386 applications without manually invoking box86.

CalcProgrammer1 avatar Jul 20 '21 20:07 CalcProgrammer1

I use the format that seemed official: https://man7.org/linux/man-pages/man5/binfmt.d.5.html

My lsb_release -a gives me "Ubuntu 20.04 focal" That's strange the format just evolved and is not compatible? How should I do to support both?

EDIT This seems to be the update-binfmts format : https://manpages.debian.org/testing/binfmt-support/update-binfmts.8.en.html

Still unsure how to handle both formats.

ptitSeb avatar Jul 20 '21 21:07 ptitSeb

Looks like it might be two different systems then, systemd's binfmt capability and binfmt-support. They appear to have different formats. Perhaps just install both, or maybe test to see which directory exists (/etc/binfmt.d or /usr/share/binfmts).

CalcProgrammer1 avatar Jul 20 '21 21:07 CalcProgrammer1

@CalcProgrammer1 where did that came from? and where/how can we keep that "hack" updated? that helps also to get steam running on arm64 versions of chromiumos.

DarkevilPT avatar Dec 08 '23 00:12 DarkevilPT