DNS lookup does not work in chroot environment for Ubuntu 17.10 Beta

Bug #1723568 reported by Cubic PPA
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Invalid
Undecided
Cubic PPA

Bug Description

DNS lookup does not work in chroot environment for Ubuntu 17.10 Beta.

During apt install, the error "Name or service not known" is displayed on the console in the chroot environment.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

DNS lookup does not work in chroot environment for Ubuntu 17.10 Beta (ubuntu-17.10-beta2-desktop-amd64.iso).

In /etc, the link resolv.conf points to ../run/systemd/resolve/stub-resolv.conf.
But stub-resolv.conf does not exist.
The link /etc/resolv.conf should point to /run/resolvconf/resolv.conf.

One solution is to fix the link.
In the chroot environment in cubic, type:

$ ln -sfn ../run/resolvconf/resolv.conf /etc/resolv.conf

Cubic PPA (cubic-wizard)
Changed in cubic:
status: New → Triaged
status: Triaged → Invalid
assignee: nobody → Cubic PPA (cubic-wizard)
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

*** USE THIS SOLUTION INSTEAD OF ABOVE ***

The link /etc/resolv.conf points to /run/systemd/resolve/stub-resolv.conf.
But stub-resolv.conf does not exist.

Outside the chroot environment, do the following...
$ sudo ln -sr /run/systemd/resolve/resolv.conf /run/systemd/resolve/stub-resolv.conf

To verify, inside the chroot environment, do the following...
$ cat /etc/resolv.conf
$ ping google.com

Revision history for this message
Niccola (meetnick) wrote :

@Cubic PPA, please confirm if this can work:

ln -sr /run/systemd/resolve/resolv.conf /etc/resolv.conf

this is because I am on host current OS 18.04, and I am trying to customize 16.04; Thus, the link seems broken on chroot:

/etc/resolv.conf is linked to /run/resolvconf/resolv.conf, which does not exist.

I had to remove link /etc/resolv.conf and recreate as:

ln -sr /run/systemd/resolve/resolv.conf /etc/resolv.conf

It is correct? Its working now.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.