View previous topic :: View next topic |
Author |
Message |
Progman3K l33t
Joined: 03 Jan 2004 Posts: 787
|
Posted: Fri Apr 02, 2004 4:23 pm Post subject: ran emerge --update, now my netcard doesn't work |
|
|
By mistake I used the command
emerge --update xmame
thinking it would update the already-installed xmame on my system.
At the end, it prompted me to run etc-update, which I did, and many files got modified.
After restarting, my Gnome Display Manager had been replaced by the X Display Manager, my fstab had been overwritten, and my network card, although it still comes up at boot, doesn't let me connect to anywhere.
I was able to fix the fstab and display manager problems, but I don't know how to fix the network card problems.
My resolv.conf has the proper nameservers listed in it.
But any host I try to connect to give "network unreachable"
Is there any way to get my network card working again?
The eth0 module gets loaded at boot like I mentioned, but it just doesn't seem to be routing itself properly, so it must be a pretty trivial setting in one of the config files in /etc
but which one, and what setting?
Thanks in advance.
Last edited by Progman3K on Fri Apr 02, 2004 10:51 pm; edited 1 time in total |
|
Back to top |
|
|
buser Tux's lil' helper
Joined: 02 Feb 2004 Posts: 92 Location: right here
|
Posted: Fri Apr 02, 2004 7:03 pm Post subject: |
|
|
you need to tell us more specific information like if you are using a static ip or DHCP. It is probably very simple and is covered in the gentoo handbook located here http://www.gentoo.org/doc/en/handbook/index.xml
If you are using dhcp you can type manually to see if that is the problem. i am guessing that you overwrote your network script that configured your address located at /etc/conf.d/net |
|
Back to top |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 787
|
Posted: Fri Apr 02, 2004 7:18 pm Post subject: |
|
|
You are correct, buser!
It indeed was the /etc/conf.d/net file that had been changed.
It had set my IP address back to 192.168.0.2, which I *think* is some kind of non-dhcp auto-discovery protocol that no one seems to use...
Anyhow, I set the entry to
iface_eth0="dhcp"
And my network card works again!
Thank you for taking the time to help.
Oh, one more thing:
I ran locate to find the net-setup script, and it's not on my system! Is that normal? |
|
Back to top |
|
|
buser Tux's lil' helper
Joined: 02 Feb 2004 Posts: 92 Location: right here
|
Posted: Fri Apr 02, 2004 9:08 pm Post subject: |
|
|
I believe that it is normal not ot have net-setup on your system. I think it is just included on the live cd. I'm not exactly sure though because I have never used it. As you have learned, you want to be real careful about overwriting important configuration files in /etc. A better option is to merge them as needed. I am usually lazy and I never overwrite anything important like fstab, conf.d, or other files i recognize as having edited before. I usually go ahead and replace files that I recognize are scripts for programs. The 192.168..... address you saw was for internal networking with a static IP. It is usually used behind routers or in small business network. Glad you got it figured out |
|
Back to top |
|
|
rodericj Tux's lil' helper
Joined: 08 Mar 2004 Posts: 97 Location: Rockville, MD
|
Posted: Thu May 20, 2004 7:27 am Post subject: |
|
|
Very similar situation.
Emerge world %Note I didn't use -U, big mistake.
messed up my whole /etc directory.
Like before, my network card comes up at boot. Problem is that I can't connect to anything.
I did the command
and said
Code: |
**** dhcpcd: already running
**** dhcpcd: if not then delete /var/run/dhcpcd-eth0.pid file
|
It is running so I didn't delete the file...Or at least...ps says it is running
As for the resolv.conf How do you know if it has the correct addresses?
Thanks |
|
Back to top |
|
|
infinyt9 n00b
Joined: 18 Nov 2003 Posts: 26
|
Posted: Thu May 20, 2004 2:52 pm Post subject: |
|
|
emerge --update is all good and all, but be VERY careful when running etc-update after that, take the time you saved with emerge and analyze very CAREFULLY the modified conf files. It is very easy to fudge up EVERYTHING you worked hard to build...
It is worth it to take 20 minutes to look at the files, and save 2 hours in searching What-The-Hell-Just-Happenned crap.
Been there, done that, swore till tomorrow....
for you X thing, look in rc.conf _________________ To understand recursion, you must first... understand recursion. |
|
Back to top |
|
|
n3mo l33t
Joined: 28 Mar 2004 Posts: 657 Location: In a Cruel World
|
Posted: Thu May 20, 2004 3:24 pm Post subject: |
|
|
Quote: | As for the resolv.conf How do you know if it has the correct addresses? |
ifconfig show all the information you need, ip, netmask, broadcast, about your network interface; route show up the routing table; cat /etc/resolv.conf show your dns. |
|
Back to top |
|
|
rodericj Tux's lil' helper
Joined: 08 Mar 2004 Posts: 97 Location: Rockville, MD
|
Posted: Thu May 20, 2004 9:18 pm Post subject: |
|
|
First of all. I will never do an emerge world again....
Second.
I undertand that the resolv.conf has my dns lookup addresses. The problem is that I had 2 of them. One of them was auto-created by some program. They were different. Niether gives the results I am looking for. So the question remains, how do you know if the addresses are correct?
Third,
IFConfig shows me nothing of any value(based on what I know). What am I supposed to be gaining from this with respect to resolv.conf? WTR anything?
Fourth,
rc.conf deals mainly with Window Managers of which I have none. The closest thing I saw to usefull was the network protocols (obviously) which are fine. I use the default settings for that.
It was suggested by a peer that it could be a problem with my router. double checking all that shows that I was forwarding BOTH ports 80 and 22 to the appropriate machine.
The recap...
I can not ssh into my machine from outside of the network.
I can ssh into the machine from within the network.
I can not connect to the HTTP server from outside.
I can from inside the network.
So I am not really sure what steps I can take at this point.
Tips? |
|
Back to top |
|
|
buser Tux's lil' helper
Joined: 02 Feb 2004 Posts: 92 Location: right here
|
Posted: Thu May 20, 2004 9:30 pm Post subject: |
|
|
i do emerge -uDp world and emerge -uD world on a regular basis no problems. It does nothing but fix bugs and update my packages. I did do etc-update once and overwrote the files as you have done. I learned my lesson and learned it well. If you have important files like /etc/fstab that want to be overwritten just say no. you can merge them if you see that anything new is being added but otherwise just say no. if it is trivial files like /etc/init.d/acpid or something like that it is a good idea to replace those. since you can get onto the computer from inside your network but not outside, it looks like your router has assigned the computer a new ip address. you should see what ip that is with ifconfig. eth0 should have inet addr: 192.168.0.X or something close to that. then you need to make sure your router has the same ip with the ports that are forwarded to the machine. you may also be able to reserve that ip for the machine so that it will always get that ip when it turns on depending on what type of router you have. resolve.conf should show you at least 2 lines if your computer is grabbing the dhcp ip correctly. another thing to check is your /etc/hosts file. best of luck. _________________ g3nt00 is |337 |
|
Back to top |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 787
|
Posted: Fri May 21, 2004 3:33 am Post subject: |
|
|
rodricj,
Are you certain that your ssh daemon is actually listening for a connection?
Have you started it? For example, with
/etc/init.d/sshd start
? |
|
Back to top |
|
|
buser Tux's lil' helper
Joined: 02 Feb 2004 Posts: 92 Location: right here
|
Posted: Fri May 21, 2004 3:35 am Post subject: |
|
|
Progman3K wrote: | rodricj,
Are you certain that your ssh daemon is actually listening for a connection?
Have you started it? For example, with
/etc/init.d/sshd start
? |
It has to be running if it accepts connections from inside his network _________________ g3nt00 is |337 |
|
Back to top |
|
|
infinyt9 n00b
Joined: 18 Nov 2003 Posts: 26
|
Posted: Fri May 21, 2004 2:27 pm Post subject: |
|
|
Check in your router if you forward the ports to the addy inside the lan.
I have a dlink router, and to set up the connections, theres a page where you specify the in out ports.
ie: wan 22 LAN 192.168.0.2:22
essencially saying when someone tries to connect from the outside world to port 22, redirect it to 192.168.0.2 port 22. THIS AS TO BE DONE
same thing for the www.
As fo0r rc.conf, you were saying so didnt want xdm... this is where you change it
and finnaly, emerge world is good, etc-update -5 is bad...
hope this helps my friend..
oh oh, as for resolv.conf, enter the following line (if your behind a router that NATs your internet conneciton)
nameserver ip_of_your_router _________________ To understand recursion, you must first... understand recursion. |
|
Back to top |
|
|
rodericj Tux's lil' helper
Joined: 08 Mar 2004 Posts: 97 Location: Rockville, MD
|
Posted: Tue May 25, 2004 9:08 pm Post subject: |
|
|
For the record. What exactly happens when you do an emerge world vs an emerge world -u?
And env-update. I have been blindly doing that since it said to in the installation guide. What exactly is that doing? How does it update? People talk about how it will ask if I want to replace or merge the newest etc files. I have never seen this option. Am I missing something?
Perhaps I will just do a man on both to figure it out. But I don't have access to the gentoo machine right now. Sucks...
I will let you guys know what happens with my stuff as soon as I resolve it.
Thanks again for your time guys.
Roderic |
|
Back to top |
|
|
rodericj Tux's lil' helper
Joined: 08 Mar 2004 Posts: 97 Location: Rockville, MD
|
Posted: Wed May 26, 2004 4:26 am Post subject: |
|
|
A HAAA
Ok...one of the problems I had is that my /etc/conf.d/net had my gateway set to
The problem is that this needs to be set to
I am able to do all my network connection stuff(At least I think I can [http|ssh].
I will play with this a bit more tomorrow. For now I am spent.
Thanks guys for all of your help. |
|
Back to top |
|
|
|