Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS Resolution from within a Chroot? #4092

Closed
dtischler opened this issue Jun 8, 2019 · 2 comments
Closed

DNS Resolution from within a Chroot? #4092

dtischler opened this issue Jun 8, 2019 · 2 comments
Labels

Comments

@dtischler
Copy link

dtischler commented Jun 8, 2019

Unknown if Question or Bug, and sorry if this is not the proper location for documenting this behavior...

Please fill out the below information:

  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.17763.529]

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

Special Note, this is a Lenovo Yoga C630 device with a 64-bit Qualcomm Snapdragon Arm processor, not an x86 machine.......However, inside of WSL Ubuntu 18.04, DNS resolution works properly and an "apt-get update" will resolve the Ubuntu repo's normally. However, I need to do some work on a 32-bit Arm filesystem that will eventually live on a Raspberry Pi, so, I have installed Qemu and can Chroot into the 32-bit Arm rootfs. Once inside of that chroot, name resolution does not work, and "apt-get update" results in a failure to resolve ports.ubuntu.com to read the package lists.

The resolv.conf file within the 32-bit filesystem just uses the 8.8.8.8 and 8.8.4.4 nameservers, so there should not be an issue, but something else must be impacting the system.

Here is the complete log, noting the first set of commands are in WSL Ubuntu 18.04, then the chroot occurs, switching the filesystem:

david@DESKTOP-B007DR3:~/python/rootfs$ cat /etc/resolv.conf
This file was automatically generated by WSL. To stop automatic generation of this file, remove this line.
nameserver 172.20.136.1

david@DESKTOP-B007DR3:~/python/rootfs$ sudo apt-get update
[sudo] password for david:
Hit:1 https://download.docker.com/linux/ubuntu bionic InRelease
Hit:2 http://ppa.launchpad.net/projectatomic/ppa/ubuntu bionic InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Get:4 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease [88.7 kB]
Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Get:7 http://ports.ubuntu.com/ubuntu-ports bionic-updates/main arm64 Packages [509 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports bionic-updates/universe arm64 Packages [850 kB]
Fetched 1448 kB in 5s (276 kB/s)
Reading package lists... Done

david@DESKTOP-B007DR3:~/python/rootfs$ sudo chroot /home/david/python/rootfs

root@DESKTOP-B007DR3:/# uname -a
Linux DESKTOP-B007DR3 4.4.0-17763-Microsoft #475-Microsoft Wed Apr 10 17:37:00 PST 2019 armv7l armv7l armv7l GNU/Linux

root@DESKTOP-B007DR3:/# cat /etc/resolv.conf
nameserver 8.8.4.4
nameserver 8.8.8.8

root@DESKTOP-B007DR3:/# apt-get update
Err:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
Temporary failure resolving 'ports.ubuntu.com'
Err:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Temporary failure resolving 'ports.ubuntu.com'
Err:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Temporary failure resolving 'ports.ubuntu.com'
Err:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Temporary failure resolving 'ports.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease Temporary failure resolving 'ports.ubuntu.com'
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease Temporary failure resolving 'ports.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
root@DESKTOP-B007DR3:/#

  • What's wrong / what should be happening instead:
    DNS should resolve.

  • Strace of the failing command, if applicable: (If some_command is failing, then run strace -o some_command.strace -f some_command some_args, and link the contents of some_command.strace in a gist here).

@Empyreal96
Copy link

Empyreal96 commented Sep 20, 2020

Bumping an old issue I know, but I am having the same issue, Windows 10 ARM64 build 20215.. I setup a qemu chroot into x86_64 from Ubuntu 18.04 but when I try to apt update and ping anything I get the same error resolving address..

Tried the same edits to 'resolv.conf' but no joy..

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants