when you install gentoo using http://www.gentoo.org/doc/en/handbook/handbook-x86.xml there is mention in section 6a of copying across resolv.conf to keep your nameserver settings. Later when you get to section 8 and are installing a server with a fixed ip address there is an instruction in section 8 code listing 9 on 'Manually setting IP information for eth0' which has no hint that your ip will now be overwritten at every reboot. A line added at this point (section 8 code listinG 9) that says something like 'you may need to add a line setting nameservers such as dns_servers="123.123.123.123 123.123.123.124" here to prevent the nameserver lines in /etc/resolv.conf being erased on startup' This added linewould save several people quite a bit of time and research. It's true that if you know where to look this information is presented elsewhere such as buried deep inside /etc/conf.d/net.example under wireless options that you aren't usually using on a server, under using more than one mac address, also n/a for me, under DHCP, also n/a for me, under system where it says 'It's rare that you'd need to do this' and in this same file it gives a quick start that tells you that for a static address to jump to the section labelled Interface Handlers, which section also gives no clue that your dns settings will be overwritten on restart. In short it is not obvious. I have read bug 91241 where a similar thing was asked for and it was marked as invalid for some unstated reason. AKAIK the docs are still lacking in this regard. Neither of the 2 links given in that bug give the slightest hint that on reboot your dns will be overwritten even though you are not using DHCP. Please add a line to the docs and/or to /etc/conf.d/net.example under Interface Handlers. Thanks for otherwise superlative documentation. Reproducible: Always Steps to Reproduce: 1.install gentoo as a server with no DHCP and fixed ip address following the install handbook setting dns per section 6. 2.reboot server Actual Results: nameservers are deleted from /etc/resolv.conf Expected Results: nameservers stay in /etc/resolv.conf This doc bug can be fixed by a one line addition in section 8 by code listing 9
We already tell the user to read /etc/conf.d/net.example many, many times (not even in the wireless part, either), as well as mention that you should emerge resolvconf-gentoo to work with your nameservers and other DNS/NIS stuff. resolvconf-gentoo is almost certainly what you need, as it deals with the whole resolv.conf being overwritten issue.
(In reply to comment #1) > We already tell the user to read /etc/conf.d/net.example many, many times (not > even in the wireless part, either), as well as mention that you should emerge > resolvconf-gentoo to work with your nameservers and other DNS/NIS stuff. > > resolvconf-gentoo is almost certainly what you need, as it deals with the whole > resolv.conf being overwritten issue. > It is completely pointless to tell the user to read a document that does not contain the fix in the relevant sections. As I said, mentions of adding 'dns-servers=' is conspicuously absent from the recommended section dealing with fixed ip 'Interface Handlers' As for addng resolvconf-gentoo, that is complete overkill, when all that is needed is an extra line 'dns-servers=' in /ect/conf.d/net Oh well, I can only hope that others that have this problem may find this closed bug. Thanks anyway.
I agree partly with the reporter. Why make users read the whole net.example when all you need is two lines in /etc/conf.d/net? $ cat /etc/conf.d/net routes_eth0=( "default gw 10.0.0.1" ) config_eth0=( "10.0.0.7/24" ) You don't need any dns_whatever variable or resolvconf-gentoo, you don't even want baselayout to touch your /etc/resolv.conf in the first place.
(In reply to comment #3) hehe it seems i made several typos in my initial assertion, meant to write that the nameservers were overwritten not the ip. duh. So having only 2 lines routes_eth0=( "default gw 10.0.0.1" ) config_eth0=( "10.0.0.7/24" ) works as you say,i.e., doesn't overwrite /etc/resolv.conf However, if you follow the install instructions (as people do for some odd reason) you end up adding dns_domain_lo which breaks everything.... It turns out that the real doc bug is a missing entry in section 8 b of the install docs: there needs to be a warning that _if_ you set dns_domain_lo (as recommended "if you have a DNS server but not a DHCP server") then you need to add back the nameservers with a dns-servers= line to prevent them being overwritten.