/etc/resolv.conf is empty after a system reboot.

Bug #31057 reported by Fabio Massimo Di Nitto on 2006-02-10
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dhcp3 (Ubuntu)
High
Scott James Remnant (Canonical)

Bug Description

as in topic. running ifdown/ifup eth0 after the full boot process is completed works fine.

Something is clearly wrong at boot.

Dapper as of 10/02/2006.

Changed in dhcp3:
assignee: nobody → keybuk
status: Unconfirmed → Confirmed

A little more information would be nice, please, Fabio.

This works for me.

Changed in dhcp3:
status: Confirmed → Needs Info

As discussed on IRC, you have resolvconf installed -- please purge that and your DNS should work again

Changed in dhcp3:
status: Needs Info → Rejected
Tarax (j-tarot) wrote :

Actually, I can't even tell if it's empty or not 'cause even root doesn't have access to the file !!

#ls -ln /etc|grep resolv
?--------- ? ? ? ? ? /etc/resolv.conf
-rw-r--r-- 1 root root 45 2006-03-08 /etc/resolv.conf.bak
...

resolvconf is _not_ installed

Akkana Peck (akkzilla) wrote :

I just hit this. I have a machine with static IP and static DNS info in /etc/resolv.conf. I've been running fine on Dapper for months, but in the last update, my /etc/resolv.conf got wiped.

My attempted solution for this is:
edit /etc/resolv.conf to put the nameservers back, then
aptitude purge ppp pppconfig pppoeconf ubuntu-standard wvdial resolvconf
hoping that one of those packages is the one responsible and will keep it from happening again.

I don't even have a modem installed; I shouldn't need any of those package. But since they're a standard part of an Ubuntu install, I wonder what normal users who need static IP are going to do if they hit this? And I'm curious why it happened.

resolvconf is not part of a standard Ubuntu install, and is not supported.

Daniel Eckl (daniel-eckl) wrote :

I don't want to reopen this bug, but I had the same problem because of installed resolvconf.

But the problem is: I didn't install this manually. So probably some package falsely required resolvconf. But I could purge it without problems, so the triggering package obviously has dropped this requirement in the meanwhile.

@Scott: Perhaps you should think of that if more bugreports are coming for that.

Thanks!

Best regards,
Daniel

Daniel Eckl (daniel-eckl) wrote :

I think I found it. resolvconf has been automatically installed as I installed the package "mysql-server" through aptitude. Here is my excerpt from /var/log/aptitude:

Aptitude 0.4.0: Protokoll
Fr, Mai 26 2006 10:07:49 +0200

WICHTIG: Dieses Protokoll zeigt nur geplante Aktionen an. Aktionen, die wegen
dpkg-Problemen fehlschlagen sind vielleicht nicht abgeschlossen.

Werde 12 Pakete installieren und 0 Pakete entfernen.
68,7MB werden auf der Festplatte belegt werden
===============================================================================
[INSTALLIEREN, ABHÄNGIGKEITEN] libdbd-mysql-perl
[INSTALLIEREN, ABHÄNGIGKEITEN] libdbi-perl
[INSTALLIEREN, ABHÄNGIGKEITEN] liblockfile1
[INSTALLIEREN, ABHÄNGIGKEITEN] libnet-daemon-perl
[INSTALLIEREN, ABHÄNGIGKEITEN] libplrpc-perl
[INSTALLIEREN, ABHÄNGIGKEITEN] mailx
[INSTALLIEREN, ABHÄNGIGKEITEN] mysql-client-5.0
[INSTALLIEREN, ABHÄNGIGKEITEN] mysql-server-5.0
[INSTALLIEREN, ABHÄNGIGKEITEN] postfix
[INSTALLIEREN, ABHÄNGIGKEITEN] resolvconf
[INSTALLIEREN, ABHÄNGIGKEITEN] ssl-cert
[INSTALLIEREN] mysql-server
===============================================================================

Protokoll abgeschlossen.

saw this one too. Installed mysql-server for Joomla! and shortly thereafter lost /etc/resolv.conf

purging resolvconf and cycling eth0 fixed.

Daniel Eckl (daniel-eckl) wrote :

Scott: Please reopen this bug. If you think that's the wrong way, I can open a new bug, too.
Please advise.
Thanks,
Daniel

darren (darrenm) wrote :

Hello, I'm having the same problem here. Dapper fresh install, all updates done as of 3rd July 2006, change from DHCP to static and /etc/named.conf is empty.

Removing resolvconf (part of the default install) un-symlinks /etc/resolv.conf so doesnt get overwritten each boot.

Gustav H Meyer (inetpro) wrote :

Thanks guys. I also had the same problem. With the help from this thread I determined that resolvconf was installed together with mailx.

Removing resolvconf did the trick. One thing however, you also need to remove all the configuration files that go with it otherwise the system will come up with an error message when booting up. Which you can safely ignore, I guess. Error caused by /etc/init.d/resolvconf.

To remove the configuration files use:
aptitude remove resolvconf_

Robin Sheat (eythian) wrote :

Seen here too, on a fairly new install of dapper. This is quite a problem. Either resolvconf should be fixed, or it shouldn't be a dependancy of things.

I don't know how it worked on dapper, but here on a gutsy resolv.conf is managed by network-admin, that's probably why it's cleared every time: you have to put your dns there

Glendon Gross (gross-clones) wrote :

I just ran into this problem while configuring Ubuntu 14.04 to forward WIFI packets through an ethernet interface with NAT masquerading in order to give access to another machine that has no WiFi Interface. I manually set an ip address of 10.1.1.1 for eth0 and everything was working fine, until the connection stalled due to resolvconf meddling with the static IP address and removing it. Finally I removed the resolvconf package as editing the configuration file did not stop the problem from happening.

Don't know if this bug should be re-opened or not, but it is very counter-intuitive to have a daemon rewrite a standard configuration file such as /etc/resolv.conf. If it is supposed to enhance security by obscurity it is a complete failure, in my opinion. After I removed the package the system is now working as it should (2007 iMac running native Ubuntu 14.04.)

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

Other bug subscribers