suneet0811
Posts: 16
Joined: Mon Nov 19, 2018 7:34 am

resolv.conf automatically deleted from etc in raspberry pi 3

Mon Apr 22, 2019 7:40 am

resolv.conf automatically deleted from etc in raspberry pi 3

Not able to change date...........
Nothing work appropriately.............
syslog deleted automatically
crontab deleted


Can anyone please help me out to resolv this issue

Ernst
Posts: 1231
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: resolv.conf automatically deleted from etc in raspberry pi 3

Mon Apr 22, 2019 7:52 am

Time to replace the SD card, the current one is most likely EOL or a fake.
The road to insanity is paved with static ip addresses

cpc464
Posts: 209
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: resolv.conf automatically deleted from etc in raspberry pi 3

Tue Apr 23, 2019 11:06 am

Hi OP. What do you mean "automatically deleted" ?
Unix engineer since 1989

suneet0811
Posts: 16
Joined: Mon Nov 19, 2018 7:34 am

Re: resolv.conf automatically deleted from etc in raspberry pi 3

Thu Apr 25, 2019 6:13 am

Automatically delete means: every time i make a resolv.conf manually & then reboot the system. After logging, found that this file was deleted .

tpylkko
Posts: 382
Joined: Tue Oct 14, 2014 5:21 pm

Re: resolv.conf automatically deleted from etc in raspberry pi 3

Thu Apr 25, 2019 6:23 am

on most computers, resolv.conf is a dynamically modified file. this means that other network daemons (network manager, resolvconf, netconfig, rdnssd and so on) create that file on the fly and if you manually modify it, they will overwrite your changes eventually.

however, you say that this is happening to other files on your system... this suggests something really fundamentally wrong, perhaps hardware failure, as suggested. fake cards also have firmware that stores stuff that you put in it in RAM and lies to you that it is on the card in order to hide the fact that there is less space than what was claimed. so that is also possible

Your date is likely automatically provided by a ntp server

and I believe journalctl (in Debian and Raspbian) defaults to not keeping logs past a boot unless you specify so in the conf file

cpc464
Posts: 209
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: resolv.conf automatically deleted from etc in raspberry pi 3

Thu Apr 25, 2019 11:05 am

Hi OP. As mentioned above, resolv.conf is auto-generated every time your system is booted. There are many related threads on the forum, do a search. Eg. viewtopic.php?t=57388

By default, in Raspbian, the file is overwritten on every boot by the "resolvconf" service, which obtains information from other config files and recreated /etc/resolv.conf.

If the file is simply not there, I would look for errors to do with resolv.conf in the first instance. Have you modified other config files, eg those described in the link above ? I wouldn't assume it is a hardware or fake card problem until these other potential causes have been investigated.

You also mention you can't change the date, and that 2 other files are missing and that "nothing work appropriately". I can't really comment helpfully on that without much more detail on each, and without knowing the history of your Pi.
Unix engineer since 1989

achrn
Posts: 373
Joined: Wed Feb 13, 2013 1:22 pm

Re: resolv.conf automatically deleted from etc in raspberry pi 3

Thu Apr 25, 2019 12:39 pm

Files looking OK until the system reboots and then either disappearing or reverting to a previous version is a bad SD card, in my experience. It doesn't have to be fake - genuine but faulty will do it too. I've had this a few times (I had one Pi that was prone to making cards do it, but I've scrapped that particular Pi now).

I assume the 'valid' copy of the file gets lodged in a cache of some sort (whether on card or in teh Pi) and that is what is used untila reboot.

Return to “General discussion”