[Bug 1473727] Re: No DNS servers after netboot

Thomas Hood 1473727 at bugs.launchpad.net
Mon Jul 13 19:34:21 UTC 2015


Here is a rough draft, untested, of a script that would be run once in
the main boot sequence in order to bring the resolvconf database up to
date. The main difference from your script is that it sends the info to
resolvconf instead of writing directly to resolv.conf. (I am assuming
that /etc/resolv.conf is a symbolic link to
/run/resolvconf/resolv.conf.) Can you please test this (or some improved
variant of it)?

#!/bin/sh

for F in /run/net-*.conf ; do
        . $F
        IFACE="${F%.conf}"
        IFACE="${IFACE#/run/net-}"
        S=""
        if [ "$IPV4DNS0" != "0.0.0.0" ] ; then
                S="${S}nameserver $IPV4DNS0
"
        fi
        if [ "$IPV4DNS1" != "0.0.0.0" ] ; then
                S="${S}nameserver $IPV4DNS1
"
        fi
        if [ "$DOMAINSEARCH" ] ; then
                S="${S}search $DOMAINSEARCH
"
        fi
        If [ "$S" ] ; then
                echo "$S" | resolvconf -a "${IFACE}.initramfs"
        fi
done

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to resolvconf in Ubuntu.
https://bugs.launchpad.net/bugs/1473727

Title:
  No DNS servers after netboot

Status in resolvconf package in Ubuntu:
  Incomplete

Bug description:
  Ubuntu 14.04 / resolvconf 1.69ubuntu1.1

  When netbooting a xen VM, I see the following output:

   address: 192.168.1.180    broadcast: 192.168.1.255    netmask:
  255.255.255.0

   gateway: 192.168.1.1      dns0     : 192.168.1.1      dns1   :
  0.0.0.0

  So I know DHCP is working.

  However, resolv.conf doesn't get updated - the interface is set to
  manual as DHCP was handled at the initrd level.

  Please let me know how I can help get this fixed.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1473727/+subscriptions



More information about the foundations-bugs mailing list