View previous topic :: View next topic |
Author |
Message |
mdewitt n00b
Joined: 02 Jul 2010 Posts: 6 Location: Purdue University, USA
|
Posted: Sun Jul 04, 2010 8:16 am Post subject: DNS consistently fails to resolve names [solved] |
|
|
I have been following the standard installation guide for the minimal install CD and I have run into trouble as soon as I begin working with portage after chrooting into the build environment. Before the chroot, I was able to use links and access the internet fine and without trouble. I can ping servers by name and by IP while outside the build environment just as easily. Once inside, however, I seem to lose contact with a functioning DNS server; all server names fail to resolve but pinging by IP continues to work fine. Looking around this section of the forums has led me to conclude that the default address (as per the standard minimal install CD instructions) sets the address for any DNS server to be 192.168.0.1. I know that my network's DNS server, however, is at 192.168.1.1.
In my research on these forums and through an hour of googling, I have seen many references to a /etc/resolv.conf and a dhcpcd.conf. I have been unable to find either of these files on my system at its current stage. I tried changing my /etc/conf.d/net from a file with nothing but comments to a file containing comments and a single line of script:
Code: | routes_eth0=("default via 192.168.1.1") |
This seems to have had no effect, however.
All I think I need [/code]to do is tell my system to look at 192.168.1.1 instead of ~.0.1 for a DNS server, but I do not seem to know how. I would really appreciate it if anyone could point me in the right direction.
Last edited by mdewitt on Sun Jul 04, 2010 1:59 pm; edited 1 time in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Jul 04, 2010 8:35 am Post subject: |
|
|
you can set up to make it work by just asking a new route to your dns server by hand
with
Code: | route add default gw 192.168.1.1
|
Quote: | section 2.4 of the handbook: Configure networking the manual way
livecd root # ifconfig eth0 192.168.1.10/24
livecd root # route add default gw 192.168.1.1
livecd root # echo nameserver 192.168.1.1 > /etc/resolv.conf |
And here's why it fail after the chroot: you forgot the cp -L /etc/resolv.conf /mnt/gentoo/etc line, so when you chroot the file /mnt/gentoo/etc/resolv.conf becomes the newly active one in the chroot as /etc/resolv.conf and as you didn't copy the working one over this one, that file remain as default value from the portage.tgz package.
Quote: | section 2.16 of the handbook: Chroot
livecd usr # cd /
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount -o bind /dev /mnt/gentoo/dev
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
|
it looks like at rtfm answer, but that's what you should have done. |
|
Back to top |
|
|
mdewitt n00b
Joined: 02 Jul 2010 Posts: 6 Location: Purdue University, USA
|
Posted: Sun Jul 04, 2010 1:57 pm Post subject: |
|
|
Ah, thanks. I guess that's what I get for assuming that I would know how to configure the network already and just skimming that section. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|