mlinux resolv.conf issue

Home Forums Conduit: mLinux Model mlinux resolv.conf issue

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #9852
    James Coleman
    Participant

    We found out that the resolv.conf file loses the nameserver 8.8.8.8 setting when the Conduit is powered down. This is why we were getting the ENOUTFOUND error after I provided my setup to a customer.

    Do you know why this happens? Is there a way to set that nameserver 8.8.8.8 value in the resolv.conf file so it is not lost when the Conduit is powered off or is there a way to set this value when the Conduit is powered on?

    Thanks,

    James

    #9868
    Brandon Gooch
    Participant

    Here’s what I did to obtain a persistent DNS config on my Conduit:

    1. Remove the /etc/volatile.cache file from the filesytem.
    2. Comment out the following entries from /etc/default/volatiles/00_core:

    l root root 0644 /etc/resolv.conf /var/run/resolv.conf
    f root root 0644 /var/run/resolv.conf none

    3. Remove the /etc/resolv.conf symlink.
    4. Create your new /etc/resolv.conf

    After a reboot, my DNS settings survived.

    There is probably a better way to do this, so I hope someone from MultiTech can chime in with some guidance.

    • This reply was modified 9 years ago by Brandon Gooch. Reason: Try to fix the code markup conversion
    #9873
    James Coleman
    Participant

    Brandon,

    Thanks for your post. The problem is when power is removed from the Conduit.
    I made the revisions you reference above but the setting still goes away when power is removed from the Conduit.

    Thanks,

    James

    #9878
    Jesse Gilles
    Blocked

    As Brandon pointed out, /etc/resolv.conf is configured by default as a “volatile” file and this scheme works well when using DHCP or when using PPP (cellular). A simple workaround for static configuration is to put something like the following in your /etc/network/interfaces file for eth0.

    post-up echo “nameserver 8.8.8.8” > /etc/resolv.conf

    Jesse

    #9887
    James Coleman
    Participant

    Jesse,

    Thanks for the information. I will try this and see if this works for us.

    James

    #10419
    Bas van der Pol
    Participant

    I can confirm that Jesse Gilles his provided solution did the work for us!

    Thanks!

    Bas

    #11453
    Jeff Clemmer
    Participant

    Thanks! This worked for me as well.

    #13620

    Dear all,

    My existing resolv.conf symlink into /var/run/resolv.conf
    ls -la resolv.conf
    lrwxrwxrwx 1 admin root 20 Jun 1 21:39 resolv.conf -> /var/run/resolv.conf

    Instruction number 4: create new symlink, the question is: where is the new symlink target?

    Thank you very much.

    Warmest Regards,
    Suryadi

    #13623
    Bryan Tran
    Moderator

    Hi Suryadi,

    You only need to modify your /etc/network/interfaces file by adding the following line:

    #Wired interface
    auto eth0
    ….
    ipaddress 192.168.2.1
    netmask 255.255.255.0
    gateway 192.168.2.254
    post-up echo “nameserver 8.8.8.8” > /etc/resolv.conf <– Add this line – Setup to obtain a persistent DNS config on the Conduit.

    Thanks,

    BT

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.