There is an open bug in systemd [0] that creates a bad experience for LFS users that do not create a static /etc/resolv.conf . This bug prevented me from using “wget” to download many BLFS packages. Here is a proposed workaround for inclusion in the next LFS version.
When following LFS’ network configuration instructions [1], the user leaves a blank /etc/resolv.conf . systemd-resolved later makes this a symlink to a file containing a “nameserver 127.0.0.53” entry, and runs a “stub resolver” service listening at this local address. Programs that resolve their own names (instead of using the getent or systemd-resolve utilities) like “wget” or “dig”, then send requests to this stub nameserver. However the stub server has a bug, where its resolutions do not follow CNAMEs through to A records (oddly “systemd-resolve” does not share this bug). One workaround could be to instruct all LFS users to create a static /etc/resolv.conf, which avoids use of the stub resolver . However then the nameserver list is not automatically updated by DHCP. My suggested workaround for users that want to use DHCP, is a change to the systemd setup instructions [2]. Instead of pointing /etc/resolv.conf at the “../lib/systemd/resolv.conf” file, later after first-boot do: ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf There is more information on this in the “/ETC/RESOLV.CONF” section of “man systemd-resolved.service”. There is one downside I see to this approach from the manpage - “it does not know a concept of per-interface DNS servers and hence only contains system-wide DNS server definitions” (including all those discovered through DHCP). However this seems better for many LFS users than having many of their DNS resolution requests fail. Regards, -Eric S. Stone [0] https://github.com/systemd/systemd/issues/3826 [1] http://linuxfromscratch.org/lfs/view/stable-systemd/chapter07/network.html [2] http://linuxfromscratch.org/lfs/view/stable-systemd/chapter06/systemd.html
-- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
