What I did
Install qemu, qemu-arch-extra, qemu-user-static (AUR) in ArchLinux X86_64.
systemd takes care of the binfmt, verified from
Download ArchLinux ARM tarball from its website. The direct link is this
Extract it in a folder with
sudo bsdtar -xpf command. Copy the
/usr/bin/qemu-aarch64-static file into that folder. Chroot with
sudo pacman -S qemu qemu-arch-extra
sudo yay -S qemu-user-static
sudo bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C folder
sudo cp /usr/bin/qemu-aarch64-static folder/usr/bin
sudo arch-chroot folder
In the chrooted environment, I can ping any IP address but can not ping any
remote host (e.g.
example.com) i.e. name resolution does not work.
/etc/resolv.conf file is populated.
ip shows correct configs of NICs.
So, how can I enable name resolution in chrooted ArchLinux ARM? I have tried
the same procedure in Ubuntu X86_64 with chrooted into Ubuntu AARCH64. It works.