Gentoo Archives: gentoo-user

From: Grand Duet <grand.duet@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] resolv.conf is different after every reboot
Date: Sun, 27 Jul 2014 11:30:58
Message-Id: CACE6sHnsd6Y+WMkGf=Jh=0VHsGK9J8CvV3uFZe8+EOvM=dE=oA@mail.gmail.com
In Reply to: Re: [gentoo-user] resolv.conf is different after every reboot by Walter Dnes
1 2014-07-27 13:39 GMT+03:00 Walter Dnes <waltdnes@××××××××.org>:
2 > On Sun, Jul 27, 2014 at 12:21:23PM +0300, Grand Duet wrote
3 >> This is a continuation of the thread:
4 >> "Something went wrong with DNS, plz help!"
5 >>
6 >> Now, the issue became clearer, so I decided to start
7 >> a new thread with more descriptive Subject.
8 >>
9 >> In short: the contents of the file /etc/resolv.conf
10 >> is unpredictably different from one reboot to another.
11 >> It is either
12 >> # Generated by net-scripts for interface lo
13 >> domain mynetwork
14 >> or
15 >> # Generated by net-scripts for interface "eth0"
16 >> nameserver My.First.DNS-Server.IP
17 >> nameserver My.Second.DNS-Server.IP
18 >> nameserver 8.8.8.8
19 >>
20 >> I tried to chmod this file to be unwrittable even for root
21 >> but after a reboot it have been overwritten anyway.
22 >>
23 > A similar problem was noted at...
24 > https://forums.gentoo.org/viewtopic-t-816332-start-0.html
25
26 Like in the thread above, I also have a line
27 dns_domain_lo="mynetwork"
28 in my /etc/conf.d/net file. It says nothing to me
29 and I do not remember how it got there.
30
31 But somewhere on Gentoo forum I have found the following
32 explanation: "If you only specify dns_domain_lo="foo" and
33 restart the lo interface it will put "domain foo" in /etc/resolv.conf
34 and remove everything else."
35
36 So, I guess I should try to remove that line from my /etc/conf.d/net file.
37
38 But why the system worked fine for about a year *with* this line then?
39
40 > Can you post the contents of your /etc/conf.d/net
41
42 hostname="myhostname"
43 dns_domain_lo="mynetwork"
44
45 config_eth0="My.Local.IP netmask My.Net.Mask broadcast
46 Broadcast.IPof.My.LocalNetwork"
47 routes_eth0="default via Local.IPof.My.Gateway"
48
49 dns_servers_eth0="My.First.DNS.IP My.Second.DNS.IP 8.8.8.8"
50
51 mtu_eth0="1500" # if needed
52
53 # The network scripts are now part of net-misc/netifrc
54 # In order to avoid sys-apps/openrc-0.12.4 from removing this file,
55 this comment was
56 # added; you can safely remove this comment. Please see
57 # /usr/share/doc/netifrc*/README* for more information.
58
59 > and also the output of the "rc-update show" command?
60
61 # rc-update show
62 alsasound | boot
63 bootmisc | boot
64 dbus | default
65 devfs | sysinit
66 dmesg | sysinit
67 fsck | boot
68 hostname | boot
69 hwclock | boot
70 keymaps | boot
71 killprocs | shutdown
72 kmod-static-nodes | sysinit
73 local | default
74 localmount | boot
75 loopback | boot
76 metalog | default
77 modules | boot
78 mount-ro | shutdown
79 mtab | boot
80 net.eth0 | default
81 net.lo | boot
82 netmount | default
83 privoxy | default
84 procfs | boot
85 root | boot
86 savecache | shutdown
87 swap | boot
88 swapfiles | boot
89 sysctl | boot
90 sysfs | sysinit
91 termencoding | boot
92 tmpfiles.dev | sysinit
93 tmpfiles.setup | boot
94 udev | sysinit
95 udev-mount | sysinit
96 urandom | boot
97
98 Everywhere above eth0 has been put instead of its udev "predictable" name.
99
100 Do you think that I need
101 carrier_timeout_eth0=20
102 somewhere in /etc/conf.d/net ?
103
104 Thank you.
105
106 > That should help narrow down the potential sources of your problem.

Replies

Subject Author
Re: [gentoo-user] resolv.conf is different after every reboot Daniel Frey <djqfrey@×××××.com>
[gentoo-user] Re: resolv.conf is different after every reboot James <wireless@×××××××××××.com>
Re: [gentoo-user] resolv.conf is different after every reboot Kerin Millar <kerframil@×××××××××××.uk>