- Install qemu-user-static (
yay -S qemu-user-static
).- This might need you to install
pcre-static
and update PGP keys (follow the tips in the comments here).
- This might need you to install
- If not already present, install
systemd-binfmt
, the revamped version ofbinfmt-support
tools- Your system has to support transparent Qemu user emulation, but fortunately, that is mostly enabled once the steps here have been followed.
- Check the status of the
systemd-binfmt
unit (systemctl status systemd-binfmt
) and (re)start if needed (sudo systemctl restart systemd-binfmt
)- This unit has ARM support by default, but check the current documentation to make install it if needed
- Mount the root partition of the ARM system into a folder (for e.g.,
sudo mount /dev/sdb2 arm_mountpoint
) - Copy the QEMU ARM static binary (
/usr/bin/qemu-arm-static
on my distro) to the mounted root directory'susr/bin
(for e.g.,HOME/arm_mountpoint/$> sudo cp /usr/bin/qemu-arm-static usr/bin/
) - That's it! Now we can chroot successfully into ARM root directory, and Qemu will transparently emulate this for us.
That is, run
HOME/arm_mountpoint/$> sudo chroot . bin/bash
.
Last active
November 28, 2024 23:10
-
-
Save gokart23/8ade2d431ead2de47340160301837cab to your computer and use it in GitHub Desktop.
Run ARM chroot on x86 machine (both ArchLinux)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment