[Buildroot] DNS resolv issue with localhost

Lionel Orry lionel.orry at gmail.com
Fri Sep 21 08:38:36 UTC 2012


Thomas Petazzoni <thomas.petazzoni at ...> writes:

> 
> Le Tue, 05 Jul 2011 14:28:03 +0200,
> Jigar SOLANKI <jigar.solanki <at> labri.fr> a écrit :
> 
> > Problem SOLVED :
> > I was missing the nsswitch.conf file in /etc, so the resolv order was
> > wrong (nslookup localhost was requesting the dns server in
> > /etc/resolv.conf whereas it should have beeb /etc/hosts)
> > I just added a nsswitch.conf from an another correctly running linux.
> 
> So you're using a glibc-based system, right ? If so, maybe we should
> add this nsswitch.conf file to the default Buildroot and make sure it
> gets installed when a glibc toolchain is used.
> 
> Thomas

I just ran into the exact same problem, and here is a links to a LFS manual
stating the problem as well :
http://archive.linuxfromscratch.org/lfs-museum/4.1/LFS-BOOK-4.1-HTML/chapter06/glibc.html#AEN2505

So yes I think that should be good to ship nsswitch.conf.

For information, I used the nsswitch.conf file found in my external toolchain
sysroot that was re-created under buildroot, in my case it was at

<buildroot_path>/output/host/usr/sh4-unknown-linux-gnu/sysroot/etc/nsswitch.conf

Kind regards,
Lionel



More information about the buildroot mailing list