I have 2 different Linux devices, one's kernel is done using ltib (L from now on), and the other's by buildroot (B from now on).

I manage to add a DNS resolver to B by using:

echo "nameserver" >> /etc/resolv.conf

and then ping google.com works fine.

On the other hand, on L, the same schtik didn't work, and although pinging is ok, pinging google, google.com or www.google.com always fails.

What I want to do is somehow compare the 2 kernels to understand what is it inside B that is missing from L and enables the DNS resolving.

Where and what should I look for?

I've used this guide and from it I understand that since my /etc/nsswitch.conf looks like this:

cat /etc/nsswitch.conf
    passwd:     files  rf
    shadow:     files
    group:      files
    hosts:      files  dns
    services:   files
    networks:   files
    protocols:  files
    rpc:        files
    ethers:     files
    netmasks:   files
    netgroup:   files
    automount:  files
    aliases:    files
    bootparams:  [NOTFOUND=return] files

then the ping command should look at /etc/resolv.conf which includes the line nameserver

cat /etc/resolv.conf

so I really don't see why my ping fails.

I tried editing the /etc/nsswitch.conf to remove the files from the hosts entry (made it look like hosts: dns) but it didn't help.


It is not the Linux kernel that does DNS resolution, but the C library. Which C library is your LTIB system using ? By default, Buildroot is using uClibc, which doesn't have an nssswitch.conf configuration file.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.