You are not logged in.
Pages: 1
Topic closed
-R option here is not working. What should i do?
Also i want to learn more about the Linux. The wiki's are good to make one thing,but they are not getting to details much. I want something deeper. I want every detail,mentioning even the smallest thing. So what can you suggest?
And i've always wondered why Windows booting faster than GNU/Linux systems?In 20-25 seconds the desktop gets
ready.
Last edited by Paingiver (2008-03-13 10:57:15)
Offline
One quick and dirty way to work around DHCP resetting your DNS is to just reset your resolv.conf using /etc/rc.local
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
# set first nameserver
echo "nameserver 0.0.0.0" > /etc/resolv.conf
# set second nameserver
echo "nameserver 0.0.0.0" >> /etc/resolv.conf
Obviously replace the 0.0.0.0 with the appropriate IP addresses for your nameservers.
No book suggestions I'm afraid. But I'm pretty sure about how Windows appears to boot so fast: it cheats. Windows essentially throws you onto the desktop before it's finished loading everything. That's why it's always slow starting any application clicked the first 30 seconds or so after it's "finished" booting.
Edit: fixed a spelling error
Last edited by Jarsto (2008-03-13 10:40:28)
Jarsto
Offline
Have alook at O"Reilly books,they sometimes even have free PDF"s.
Offline
Thanks for the quick replies!
echo "nameserver 0.0.0.0" > /etc/resolv.conf
# set second nameserver
echo "nameserver 0.0.0.0" >> /etc/resolv.conf
So, Jarsto it will be ">" or ">>" ? Or the way you right is correct?
Last edited by Paingiver (2008-03-13 11:30:04)
Offline
Thanks for the quick replies!
echo "nameserver 0.0.0.0" > /etc/resolv.conf # set second nameserver echo "nameserver 0.0.0.0" >> /etc/resolv.conf
So, Jarsto it will be ">" or ">>" ? Or the way you right is correct?
You use > for the first one, because > makes it overwrite what's in the file before then (the automatic stuff). Then you use >> to add more lines to the bottom if you want to list several nameservers.
Jarsto
Offline
Unfortunately it doesn't work for me. Do you have another solution?
Offline
Unfortunately it doesn't work for me. Do you have another solution?
That depends on how it doesn't work.
If you restart the computer, or simply run /etc/rc.local as root, what's in your /etc/resolv.conf afterwards?
Jarsto
Offline
I am on the edge. I've been working on this wireless to get work for 1 week. And i am getting frustrated. I have Ralink with rt2500 chipset. For now i am trying the netcfg2. Though the result is same in network-manager.I can connect to wireless network but after 30 seconds i cannot browse any site.It is still seen as connected though.
My rc.conf:
eth0="dhcp"
wlan0="dhcp"
INTERFACES=(lo eth0 wlan0)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
# - prefix an entry in ROUTES with a ! to disable it
#
#gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
#
# Enable these network profiles at boot-up. These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
# - set to 'menu' to present a menu during boot-up (dialog package required)
# - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network-profiles
#
#NET_PROFILES=()
#
# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
# - prefix a daemon with a ! to disable it
# - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng !netfs crond alsa hal fam network)
My iwconfig:
lo no wireless extensions.
eth0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2346 B
Encryption key:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
iwlist scan works. And whenever i boot or restart the network i get this:
err, wlan0: timed out
err, wlan0: lease expired 20153 seconds ago
warn, wlan0: using IPV4LL address 169.254.51.42
Offline
Paingiver wrote:Unfortunately it doesn't work for me. Do you have another solution?
That depends on how it doesn't work.
If you restart the computer, or simply run /etc/rc.local as root, what's in your /etc/resolv.conf afterwards?
There's no problem when i connect with cable.But when i connect with wireless,here is the result of resolve.conf:
# Generated by dhcpcd for interface wlan0
nameserver 192.168.1.1
Offline
iwlist scan works. And whenever i boot or restart the network i get this:
err, wlan0: timed out err, wlan0: lease expired 20153 seconds ago warn, wlan0: using IPV4LL address 169.254.51.42
This definitely looks like a problem with the wireless. A 169.254.*.* IP is usually an IP address a computer takes when it isn't given one through DHCP. Unfortunately I don't know a lot about wireless setup, but maybe someone else will know what the problem could be.
There's no problem when i connect with cable.But when i connect with wireless,here is the result of resolve.conf:
# Generated by dhcpcd for interface wlan0 nameserver 192.168.1.1
This seems to indicate the wireless DHCP is the last thing that touches /etc/resolv.conf. One way around that is to add a sleep command to /etc/rc.local to make it wait until DHCP for wireless has finished running. Just add "sleep 30" before the resolv.conf update to make it wait 30 seconds.
Unfornately the wireless problem above means that while waiting may correct resolv.conf, the connection probably won't work. Also chances are that without the errors things won't take as long, so you won't need to make rc.local wait, or at least won't need to make it wait as long (another option to help with this is put network earlier in your /etc/rc.local daemons array, right now it's the last thing running before rc.local).
Jarsto
Offline
I have the same problem. Adding those lines to rc.local and rebooting, doesn't prevent Networkmanager from editing /etc/resolv.conf at the end. Is there any other suggestion?
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Offline
No, that only applies to dhcpcd, Networkmanager doesn't rely on that, apparently.
I have found a solution on some forum though. Put a script like this in /etc/Networkmanager/dispatcher.d/ and don't forget to make it executable:
#!/bin/bash
#
# Override /etc/resolv.conf and tell
# NetworkManagerDispatcher to go pluck itself.
#
# scripts in the /etc/NetworkManager/dispatcher.d/ directory
# are called alphabetically and are passed two parameters:
# $1 is the interface name, and $2 is "up" or "down" as the
# case may be.
# Here, no matter what interface or state, override the
# created resolver config with my config.
cp -f /etc/resolv.conf.myDNSoverride /etc/resolv.conf
Then create a file with the nameservers (in my case opendns ones), according to what you specified on the script (in my case /etc/resolv.conf.myDNSoverride):
nameserver 208.67.222.222
nameserver 208.67.220.220
Of course you'll have to start the daemon networkmanager-dispatcher.
Have you Syued today?
Free music for free people! | Earthlings
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- A. de Saint-Exupery
Offline
Thanks a lot for that solution. It works great!!! Why not put it in the wiki?
Offline
Thanks a lot for that solution. It works great!!! Why not put it in the wiki?
go ahead, put it on the wiki
< Daenyth> and he works prolifically
4 8 15 16 23 42
Offline
I think changing the /etc/resolv.conf permission to read only may also help.
Offline
(First of all, sorry for bumping an old thread. The problem persist for me, so its still a problem for some people out there.)
@kgas: changing the permission to 444 (sudo chmod 444 /etc/resolv.conf) did not prevent the file from being overwritten.
Offline
What I do in Network Manager is to edit my connection, under 'IPv4 Settings' tab I chose the method 'Automatic (DHCP) addresses only' and manually specify my preferred DNS servers (separated by comma). Network Manager will always override my /etc/resolv.conf, but with the same DNS servers. And I find this method is simpler than the above.
It's just personal preference though.
Offline
changing the permission to 444 (sudo chmod 444 /etc/resolv.conf) did not prevent the file from being overwritten
chattr +i /etc/resolv.conf does prevent it from being changed, but it may not be a particular subtile way to do this.
edit: whoo, this thread was well aged indeed.
Last edited by hokasch (2009-12-02 16:34:36)
Offline
tinhtruong, thanks! That's much better than such hacks.
I accidentally didn't noticed that option.
Offline
If not using any GUI method, then you need to edit the file which contains the properties about the connection.
To get a list of the saved connections:
$ ls -l /etc/NetworkManager/system-connections/
Edit the desired file, find the ipv4 section you might find something like:
[ipv4]
method=auto
Make it look like this (If you want to use OpenDNS):
[ipv4]
method=auto
dns=208.67.222.222;208.67.220.220;
ignore-auto-dns=true
I also turned off ipv6 by now.
[ipv6]
method=ignore
Offline
nrq,
First of, Welcome to Arch Linux
Be aware, this thread is a bit long-in-the-tooth. I have not seen a couple of these members in years
Generally we discourage reviving old posts, as thing in Linux change so fast. As far as I can tell, your posts are still relevant, so I am going to not close this thread; just to expect a response to a three and a half year old thread.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
If you use DHCP and you do not want your DNS servers automatically assigned every time you start your network, be sure to add the following to the last section of /etc/dhcpcd.conf:
nohook resolv.conf
Taken from:
https://wiki.archlinux.org/index.php/Dh … CP_at_boot
Everyday iBiker
Offline
If you use DHCP and you do not want your DNS servers automatically assigned every time you start your network, be sure to add the following to the last section of /etc/dhcpcd.conf:
nohook resolv.conf
...
Network manager takes output from dhclient or dhcpcd and then writes that to /etc/resolv.conf. That nohook only prevents dhcpcd from writing to /etc/resolv.conf.
This worked for me: append to /etc/dhcpcd.conf:
nohook resolv.conf
static domain_search=your.domain.example.org
static domain_name_servers=8.8.8.8 4.4.4.4
Edit: added this to wiki
Last edited by limyreth (2014-04-05 10:21:26)
Offline
This thread has run its course...
Closing...
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Pages: 1
Topic closed