What I did
Install qemu, qemu-arch-extra, qemu-user-static (AUR) in ArchLinux X86_64.
systemd takes care of the binfmt, verified from /proc/sys/fs/binfmt_misc/
.
Download ArchLinux ARM tarball from its website. The direct link is this
http://os.archlinuxarm.org/os/ArchLinuxARM-aarch64-latest.tar.gz
.
Extract it in a folder with sudo bsdtar -xpf
command. Copy the
/usr/bin/qemu-aarch64-static
file into that folder. Chroot with arch-chroot
.
In commandline:
sudo pacman -S qemu qemu-arch-extra
sudo yay -S qemu-user-static
sudo bsdtar -xpf ArchLinuxARM-aarch64-latest.tar.gz -C folder
ls /proc/sys/fs/binfmt_misc/
sudo cp /usr/bin/qemu-aarch64-static folder/usr/bin
sudo arch-chroot folder
Result
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.
/etc/resolv.conf
?nameserver 1.1.1.1
, same for x86_64 and aarch64, not symlinked, actual file 0644.nameserver 8.8.8.8
andnameserver 8.8.4.4
(Google DNS server)ping example.com
? What is the output ofgetent ahosts example.com
? What is the output ofdig example.com
?