Hello Everyone, I am having trouble setting up the config file for systemd-binfmt on my Arch Linux ARM device. I made a post about it on Reddit, but I thought I should ask for help here since you all probably have a better understanding of how Arch Linux works.
To summarize, the systemd-binfmt service fails to load whenever I add a config file. It complains about the file or directory not existing, despite terminal being able to run the application when I paste the location.
Since then, I make a few changes from my original Reddit post. I used the qemu-binfmt-conf.sh script to generate the config file, but I still got the same error (I did change the file location, but terminal is able to run the application just fine).
If anyone has any idea of what I should do, I greatly appreciate it.
Thomas A.
Here is some additional information (for the changes I made):
I have two config files located in /etc/binfmt.d (qemu-static-i386.conf and qemu-static-x86_64.conf). Here are the contents of the files:
$this->bbcode_second_pass_code('', '[root@alarm binfmt.d]# /usr/lib/systemd/systemd-binfmt --cat-config
# /etc/binfmt.d/qemu-static-i386.conf
:qemu-i386:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-i386-static:
# /etc/binfmt.d/qemu-static-x86_64.conf
:qemu-x86_64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x3e\x00:\xff\xff\xff\xff\xff\xfe\xfe\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/local/bin/qemu-x86_64-static:
')
Checking the status now shows this:
$this->bbcode_second_pass_code('', '[root@alarm binfmt.d]# systemctl status systemd-binfmt
● systemd-binfmt.service - Set Up Additional Binary Formats
Loaded: loaded (/usr/lib/systemd/system/systemd-binfmt.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-08-01 21:28:32 EDT; 46min ago
Docs: man:systemd-binfmt.service(8)
man:binfmt.d(5)
https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.html
https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
Process: 2592 ExecStart=/usr/lib/systemd/systemd-binfmt (code=exited, status=1/FAILURE)
Main PID: 2592 (code=exited, status=1/FAILURE)
Aug 01 21:28:32 alarm systemd[1]: Starting Set Up Additional Binary Formats...
Aug 01 21:28:32 alarm systemd-binfmt[2592]: Failed to add binary format: No such file or directory
Aug 01 21:28:32 alarm systemd-binfmt[2592]: Failed to add binary format: No such file or directory
Aug 01 21:28:32 alarm systemd[1]: systemd-binfmt.service: Main process exited, code=exited, status=1/FAILURE
Aug 01 21:28:32 alarm systemd[1]: systemd-binfmt.service: Failed with result 'exit-code'.
Aug 01 21:28:32 alarm systemd[1]: Failed to start Set Up Additional Binary Formats.
')