Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

revolve.conf issue??

Here you can discuss every aspect of Debian. Note: not for support requests!
Post Reply
Message
Author
Munty Scruntfundle
Posts: 54
Joined: 2018-11-27 16:53

revolve.conf issue??

#1 Post by Munty Scruntfundle »

I'm trying to find a solution to a DNS problem, my Banana pi running debian can't see the outside world. This is a stretch version, 9 something I think.

I am root.
I CAN nano /etc/resolve.conf, but I can't save, No such file or directory.
I can ls the file, but can't cat it, No such file or directory.
I can't touch the file, No such file or directory.
I can't chmod the file.
I can't chown the file.

lrwxrwxrwx 1 root root 35 Jun 11 2018 resolv.conf -> /var/run/NetworkManager/resolv.conf

Exactly the same outcome trying to use /var/run/NetworkManager/resolv.conf.

I have tried adding the dns-nameserver under the eth0 details in /etc/network/interfaces but this doesn't appear to do anything.

Could someone please suggest a couple of ideas? I can't even update the bloomin thing!

I'm running headless with SSH so the local network settings are fine. I can't get to the desktop.

Many thanks.

User avatar
roseway
Posts: 1528
Joined: 2007-12-31 22:50
Location: Kent, UK
Has thanked: 3 times
Been thanked: 4 times

Re: revolve.conf issue??

#2 Post by roseway »

The file is called resolv.conf, not resolve.conf. In order to edit it you need to have root privilege.

When you say that you CAN nano /etc/resolve.conf, all that means is that nano will open a new editing session for that non-existent file. You won't be able to save it unless you have root privilege.
Eric

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: revolve.conf issue??

#3 Post by Head_on_a_Stick »

Munty Scruntfundle wrote:lrwxrwxrwx 1 root root 35 Jun 11 2018 resolv.conf -> /var/run/NetworkManager/resolv.conf
Try:

Code: Select all

file /etc/resolv.conf
The file is a symlink and NetworkManager is controlling the content so to change it alter the settings in that program.

If you want to use /etc/network/interfaces instead then delete the symlink and let ifupdown create a new one for you.
deadbang

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: revolve.conf issue??

#4 Post by p.H »

Munty Scruntfundle wrote:I have tried adding the dns-nameserver under the eth0 details in /etc/network/interfaces but this doesn't appear to do anything.
Of course not. dns-nameserver(s) options have an effet only if resolvconf is installed and manages resolv.conf. But it does not, as can be seen in the symlink target /var/run/NetworkManager/resolv.conf. If you are using several DNS sources (NetworkManager, /etc/network/interfaces...) I recommend that you install resolvconf.

Note : On a modern Debian system /var/run is also a symlink pointing to /run, and /run is mounted as a tmpfs (memory-based temporary filesystem) which is volatile. If NetworkManager is not running, /run/NetworkManager/ does not exist so /run/NetworkManager/resolv.conf cannot be created.

Munty Scruntfundle
Posts: 54
Joined: 2018-11-27 16:53

Re: revolve.conf issue??

#5 Post by Munty Scruntfundle »

After A LOT of messing around with all sorts of guff, here's what finally worked.

Disable NetworkManager. Henceforth known as NetowkBallsupManager.
Stop the service
Disable Systems.resolve. See above for similar renaming convention.
Stop the service.

Delete /etc/resolv.conf
Create /etc/resolv.conf however you want, add the first line nameserver=x.x.x.x #Repalce xxxx as needed.

www ping perfect.

Why are these 2 additions to debian installed when they both obviously conflict with each other and prohibit you making manual changes on a system that may very well be run headless? At the very least turn the damn things off as default? No? Just me?

I hope someone else finds this helpful.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

Re: revolve.conf issue??

#6 Post by Head_on_a_Stick »

Munty Scruntfundle wrote:Disable systemd-resolved [corrected]
^ No need to do this, systemd-resolved will *not* modify /etc/resolv.conf unless it is symlinked to one of systemd's provided resolver files, otherwise it merely accepts whatever nameservers are listed in /etc/resolv.conf and continues to provide the resolvectl(1) utility.
Munty Scruntfundle wrote:Why are these 2 additions to debian installed when they both obviously conflict with each other and prohibit you making manual changes on a system that may very well be run headless?
They don't conflict, the behaviour is determined by the presence (or not) of symlinks and their origin.

For the record, NetworkManager can be controlled from the command line and so is suitable for use in headless systems, see nmcli(1) for instructions.
deadbang

tynman
Posts: 132
Joined: 2016-05-03 19:48
Location: British Columbia, Canada
Been thanked: 2 times

Re: revolve.conf issue??

#7 Post by tynman »

Why are these 2 additions to debian installed when they both obviously conflict with each other and prohibit you making manual changes on a system that may very well be run headless? At the very least turn the damn things off as default? No? Just me?
I assume this refers to the resolve service and to Network-Manager. I think it is worth noting that neither package is installed in Debian by default. If not installed, they don't need to be turned off.

Post Reply