0

On an amd64 machine running Manjaro Linux, I'd like to be able to resolve names inside an arm chroot, which is Arch Linux ARM. Unfortunately, it's not working. I suspect it might have something to do with different glibc versions or so, but have no idea how to overcome the problem. The problem exists with both the pre-compiled qemu-static-arm and the self-compiled qemu-user-static packages from AUR.

Here's what I've done to get inside the guest system as well as what's been done thus far once inside, including the error message:

[t440s ~]# ping -c 1 unix.stackexchange.com
PING unix.stackexchange.com (151.101.65.69) 56(84) bytes of data.
64 bytes from 151.101.65.69 (151.101.65.69): icmp_seq=1 ttl=60 time=22.5 ms

--- unix.stackexchange.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 22.549/22.549/22.549/0.000 ms
[t440s ~]# mount /dev/mmcblk0p1 root/
[t440s ~]# mount --bind /dev/ root/dev/
[t440s ~]# mount --bind /proc/ root/proc/
[t440s ~]# mount --bind /dev/pts/ root/dev/pts/
[t440s ~]# mount --bind /run/ root/run/
[t440s ~]# cp /usr/bin/qemu-arm-static root/usr/bin/
[t440s ~]# chroot root/ qemu-arm-static /bin/bash
[root@t440s /]# cat etc/resolv.conf 
nameserver 141.1.1.1
[root@t440s /]# ping unix.stackexchange.com
/usr/bin/ping: unix.stackexchange.com: Temporary failure in name resolution
[root@t440s /]# ls -ltr /etc/resolv.conf 
lrwxrwxrwx 1 root root 32 Aug  9 03:54 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
[root@t440s /]# ls -ltr /run/systemd/resolve/resolv.conf
-rw-r--r-- 1 root root 21 Jan 17 18:42 /run/systemd/resolve/resolv.conf
[root@t440s /]# rm /etc/resolv.conf 
[root@t440s /]# cp /run/systemd/resolve/resolv.conf /etc/
[root@t440s /]# ping unix.stackexchange.com
/usr/bin/ping: unix.stackexchange.com: Temporary failure in name resolution

How can one make name resolution work with this technique?

4
  • Could you show us the content of : ls -ltr /etc/resolv.conf out of the chroot
    – Reda Salih
    Jan 17 at 18:51
  • Certainly! I've updated the question.
    – Sixtyfive
    Jan 17 at 20:32
  • I see, have your tried to : systemctl restart systemd-resolved.service
    – Reda Salih
    Jan 17 at 20:42
  • Doing that outside the chroot changes nothing. Doing it inside only yields "Running in chroot, ignoring command 'restart'"...
    – Sixtyfive
    Jan 17 at 20:53
0

Maybe install also binfmt-qemu-static from AUR?

1
  • It's been a while and I can't remember anymore if that was one of the things I already tried. Will give it a go on the weekend, thank you for the suggestion!
    – Sixtyfive
    Feb 4 at 16:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.