# it worked during install, and doesn't now...

## slpz

i ran the install paying very very very close attention to the install guide, because i'm a complete linux newbie.

i really wanted to make sure i got everything right.

i love the whole emerge thing, and happily watched everything download and install.

here's the problem. now that it's all installed and i've booted, eth0 doesn't work. i tried nano -w /etc/conf.d/net and decided (since my router does it) to use dhcp. so i uncommented that line. i have no special options, so it should work...

but it doesn't. in fact, it doesn't even recognize that there is an eth0

also i don't know how to get a gui, but i guess i can deal with that later

----------

## slpz

when it's booting up it says

* Bringing eth0 up...

* Failed to bring eth0 up                                          [ !! ]

* ERROR: Problem starting needed services.

*             "netmount" was not started.

does this mean anything?

and if i have dhcp, what's the best way to configure the /etc/conf.d/net ?

i don't have any special options.

----------

## magic

I would run the command

```
#ifconfig eth0
```

You should get some out put that lists the IP address of your network card.

If you get some thing like

```
#SIOCSIFADDR: No such device

eth0: unknown interface: No such device
```

You should start by looking at the device drivers in the kernel.

If this doesn't help let me know 

magic  :Very Happy: 

----------

## magic

That sounds like you dont have the proper driver loaded.

What kind of network card are you using?

----------

## slpz

when i do #ifconfig eth0 i get information

eth 0

link encap:ethernet..

... BUT there's no ip address

and no rx bytes or tx bytes

and eth0 doesn't even show up when i type #ifconfig by itself

and i'm really a complete linux noob how do i look through the kernel to look for it?

maybe dchp isn't started right?

if it isn't, how do i fix it?

----------

## slpz

well i have an nforce2 motherboard with onboard lan, and yesterday when i tried to install, it worked fine then, but after install, same problem, it wouldn't work, so i added another pci card. this one is the realtek rtl8139 i believe. there was an option for it in the kernel make thing, so i added it. and it's been working thru the install, just stops working after  :Sad: 

----------

## magic

The way to add your card to your kernel is to 

```
#cd /usr/src/linux

#make menuconfig

```

Then look for a line called Network device support and hit enter,

Then make sure there is a * in front of Network device support (you can turn it on or off with the space bar)

Then go down to Ethernet (10 or 100 Mbit) and hit enter,

Make sure EISA, VLB, PCI and on board controllers has a * in front of it.

Then you will need to find your network card and enable (* in front) it. 

If your having a hard time finding your card let me know what it is.... I've dealt with alot of them.

magic

----------

## magic

Ok just got your last post  :Laughing: 

Try this 

```
#ifconfig eth0 192.168.1.1
```

Do you know what your router uses for IP addresses normally?

----------

## slpz

my usual ip address i set as a static

192.168.2.17

the gateway is 192.168.2.1

i've never seen broadcast before this, so i don't really know about that, so i thought i would let dhcp use it

when i was doing the menu for the kernel in the beginning, i added the realtek, since it was listed, but i don't think it's having any effect.

----------

## magic

The best way to check if the card is working is to set it with a static IP 

```
ifconfig eth0 192.168.2.17
```

If it works you will get no errors or anything else.

This will just get you on the local network,

You should be able to ping the gateway like this

```
ping 192.168.2.1
```

You should see 

```
64 octets from 192.168.2.1: icmp_seq=0 ttl=64 time=0.3 ms

64 octets from 192.168.2.1: icmp_seq=1 ttl=64 time=0.1 ms

64 octets from 192.168.2.1: icmp_seq=2 ttl=64 time=0.1 ms

```

or something close,

Hit ctrl and "c" to exit ping.

if this is working then all we need to do is edit your /etc/conf.d/net

----------

## slpz

that's not working

i typed the command, and checked

the ip address is listed as i want it, but still pinging doesn't work.

does it have anything to do with the broadcast or whatever?

and when i boot it still doesn't "bring eth0 up..."

something about netmount...

could that be why it doesn't work?

----------

## magic

hummmm.....

the broadcast default should be fine. 

The netmount has to do with mounting networked drives and fails because eth0 isnt up.

I'm sure we can get this. 

I think you should go in and verify your kernel configuration and see if your card is added with (*) or (M)

----------

## slpz

i just went and checked the kernel

the card i put in the pci slot is a realtek rtl8139

it's *'d.

does it hurt to have more than one checked off?

and i do have onboard lan, but it doesn't recognize it at all. or at least, it doesn't recognize one of them...

i thought maybe it would detect one of them and so i plugged both into the hub.

is that bad?

the onboard lan is also realtek but it's not listed, and i don't care all that much if it works, but the pci one should work, since it worked in installation, and i just used dhcp for that.

----------

## slpz

i just edited the /etc/conf.d/net file again

and made it do a static ip

now when i boot it brings up eth0... which is good, but still the rx/tx say nothing and ping doesn't work

----------

## magic

It doesn't hurt to have more than one checked   :Smile: 

Good idea pluging they both in for now.

Try editing your /etc/conf.d/net

It should look like this

```
# /etc/conf.d/net:

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/conf.d/net,v 1.7 2002/11/18 19:39:22 azarah Exp $

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface

#

#iface_eth0="192.168.1.246 broadcast 192.168.1.255 netmask 255.255.255.0"

#iface_eth1="207.170.82.202 broadcast 207.0.255.255 netmask 255.255.0.0"

# For DHCP set iface_eth? to "dhcp"

# For passing options to dhcpcd use dhcpcd_eth?

#

iface_eth0="dhcp"

#dhcpcd_eth0="..."

# For adding aliases to a interface

#

#alias_eth0="192.168.0.3 192.168.0.4"

# NB:  The next is only used for aliases.

#

# To add a custom netmask/broadcast address to created aliases,

# uncomment and change accordingly.  Leave commented to assign

# defaults for that interface.

#

#broadcast_eth0="192.168.0.255 192.168.0.255"

#netmask_eth0="255.255.255.0 255.255.255.0"

# For setting the default gateway

#

#gateway="eth0/192.168.1.1"
```

The important thing is that you have everything commented out with # at the beginning of every line except 

iface_eth0="dhcp"

once you've done that try

```
#/etc/init.d/net.eth0 start
```

and see if you have any errors

----------

## magic

If you want to do static you will need to uncomment the last line and have it say

gateway="eth0/192.168.2.1"

----------

## slpz

ok i edited it like that again...

when i tell it to /etc/init.d/net.eth0 start it tells me that's it's already started

and pinging still doesn't work

should i not use static ip? (even though that's also not working right now)

.............

edit>>> when i have it as static (yes with gateway line uncommented) it successfully brings eth0 up, for whatever that's worth

Maybe my dhcp isn't working

----------

## magic

Static is fine but dhcp sets you  up better...

oops change that to 

```
#/etc/init.d/net.eth0 restart
```

  :Smile: 

----------

## magic

is ping working now?

----------

## slpz

the static ip i chose should work, it's been my ip on windows for a while (maybe that doesn't matter)

when i change it to dhcp it won't restart (start, whatever) eth0

it works perfectly when i have it on static though

>>> NO ping still isn't working  :Sad: 

----------

## magic

Well, were moving right along!

Now you can figure out which network card is being used by pinging the gateway and watchnig the activity lights.

Also check if you are able to ping the internet with something like 

ping yahoo.com

----------

## slpz

btw, thanks a ton for helping me

i'm a complete newbie at linux, been using windows since i was like... 4? (i'm 17). i'm trying to make switch to linux as primary os, and it's great to have someone helping as much as you are. (when i get this taken care of i'll still have to figure out how to get a desktop (i may want linux but i can't live without graphics  :Smile:  ).

----------

## slpz

no ping still isn't working

----------

## magic

Arrggggg.....

It sounds like the kernel doesnt have the right driver in it.

or were missing something else.....

thinking.........

----------

## magic

No problem.... I know how hard it can be at first but its very rewarding once you get it going  :)

----------

## magic

Ok, I got an idea,

Check in your kernel config and see if you have under 

Networking Options

<*> Packet socket                                                    

  │ │                       [ ]   Packet socket: mmapped IO                                             

  │ │                       < > Netlink device emulation                                                   │ │

  │ │                       [ ] Network packet filtering (replaces ipchains)                               │ │

  │ │                       [ ] Socket Filtering                                                           │ │

  │ │                       <*> Unix domain sockets                                                        │ │

  │ │                       [*] TCP/IP networking                                                          │ │

  │ │                       [*]   IP: multicasting                                                         │ │

  │ │                       [ ]   IP: advanced router                                                      │ │

  │ │                       [ ]   IP: kernel level autoconfiguration                                       │ │

  │ │                       < >   IP: tunneling                                                            │ │

  │ │                       < >   IP: GRE tunnels over IP

See if you have those selected

----------

## slpz

funny how it works... harder it is the more rewarding it is

so i know the card is a realtek 8139 and i know i have that option enabled in kernel

and i made the kernel again right after i put the option in (make dep)

so it should have the driver

----------

## slpz

i have those

and then a little further down i have all of these ipsec things

like ipsec: ip iin ip encapsulation, and blah blah blah (all the ipsec options)

are those important? or bad? wrong? lol

but yes up top i have just those.

there's also ip: kernel level autoconfiguration

  is that useful

  just wondering

----------

## magic

Should be fine.

I though of even a better idea   :Smile: 

try this 

```
#dmesg | less 
```

some where in the output of that you should see something like this

```
8139too Fast Ethernet driver 0.9.26

PCI: Found IRQ 11 for device 00:0d.0

PCI: Sharing IRQ 11 with 01:00.0

eth0: RealTek RTL8139 Fast Ethernet at 0xe4819000, 00:50:fc:3d:dc:1d, IRQ 11

eth0:  Identified 8139 chip type 'RTL-8139C'

```

That command in the middle is called "pipe" and is right above the \  on my keyboard

----------

## magic

BTW you probably should get rid of  ip: kernel level autoconfiguration

according to the help file:

This enables automatic configuration of IP addresses of devices and                                      

of the routing table during kernel boot, based on either information     

supplied on the kernel command line or by BOOTP or RARP protocols.                                       

You need to say Y only for diskless machines requiring network            

access to boot (in which case you want to say Y to "Root file system                                       on NFS" as well), because all other machines configure the network                                       

in their startup scripts.

----------

## slpz

cool i did that

and i got something very similar:

```
8139too Fast Ethernet drvier 0.9.26

eth0: RealTek RTL8139 Fast Ethernet at 0xe081b000, 00:48:54:85:36:6e, IRQ 19

eth0:  Indentified 8139 chip type 'RTL-8139B'
```

so it's the same except for the chip type B, not C.

which means it's working...? but not really?

----------

## magic

Well that means your kernel is seeing the network card. The "b" is because you have a slightly different card than I do  :Smile: 

I would try recompliling the kernel without the ip: kernel level autoconfiguration 

and trying again

when you do the kernel be sure to use this command

```
#make dep && make clean bzImage modules modules_install
```

Last edited by magic on Tue May 13, 2003 10:56 pm; edited 1 time in total

----------

## slpz

i didn't actually * the autoconfiguration thing

later in that command (that dmesg | less) it has more info about eth0:

```
eth0: Setting half-duplex based on auto-negotiated partner ability 0000.

NETDEV WATCHDOG: eth0: transmit timed out

eth0: Tx queue start entry 4  dirty entry 0.

eth0:  Tx descriptor 0 is 00002000. (queue head)

eth0:  Tx descriptor 1 is 00002000.

eth0:  Tx descriptor 2 is 00002000.

eth0:  Tx descriptor 3 is 00002000.
```

...and then it repeats that about a hundred times and ends (yikes)

----------

## magic

I found this with Google:

Summary

-------

Activating the option 'Local APIC support on uniprocessors' prevents

the network device '8139too' from transmitting any packet.

Full description

----------------

In a kernel 2.4.20 compiled with the option 'Local APIC support on

uniprocessors' I can successfully load the module '8139too' but the

network device doesn't work at all, I can't even do a single ping.

I also see numerous times messages like :

NETDEV WATCHDOG: eth0: transmit timed out

eth0: Setting 100mbps full-duplex based on auto-negotiated partner ability 45e1.

The workaround is to boot the kernel with the option 'noapic' or

recompile it without the option 'Local APIC', and then the network

device works perfectly.

Give that a try  :Smile: 

Its under Processor type and features

----------

## slpz

wow that's the exact problem... but where is that option?

----------

## magic

Its under Processor type and features

----------

## slpz

really?

i don't see anything like apic there

----------

## magic

Look for:

Local APIC support on uniprocessors

----------

## slpz

i'm looking all thru the kernel and i can't find it  :Sad: 

is it in the default gentoo-sources kernel?

----------

## magic

your right.... hummm

----------

## magic

Ok I found it :

Under 

Processor type and features  --->

disable 

Symmetric multi-processing support

This causes 

Local APIC support on uniprocessors

to be enabled by default

Local APIC support on uniprocessors

will show up after you turn off SymmetricLast edited by magic on Tue May 13, 2003 11:25 pm; edited 1 time in total

----------

## slpz

they mentioned in that article you found about passing it to kernel at boot or something?

is that something i could do by adding it to the grub config?

like after the root=(hd0,0)/blah/blah adding something along the lines of option=noapic ? or just plain "noapic"?

>>>haha i just started recompiling again since i realized my kernel thought i had some random p3 chip (it's athlon xp) i'll redo it again as soon as it's done

----------

## magic

btw if you want to stop the kernel compile you can just ctrl and c 

it wont mess it up

 :Smile: 

----------

## slpz

recompiling...

...and hoping oh so much it works

...after it finishes and works (cuz it will!/better!) i need to add dns servers (i know them just don't know how to add them)

----------

## magic

if dhcp works you shouldn't have to but if its not adding them its a piece of cake

----------

## slpz

it doesn't seem to like that option...

when i make it

```
make[2]: *** [ksysm.o] Error 1

make[2]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r5/kernel'

make[1]: *** [first_rule] Error 2

make[1]: Leaving directory '/usr/src/linux-2.4.20-gentoo-r5/kernel'

make: *** [_dir_kernel] Error 2
```

omg what did i do??

>>>it means it didn't work and so it didn't take the apic away  :Sad: 

----------

## magic

Try this 

```
cd /usr/src/linux

make mrproper 

make menuconfig

make dep && make clean bzImage modules modules_install

 
```

the command make mrproper will erase your kernel config so you will need to go through and change the settings again

it probably happened when you changed the processor type

----------

## slpz

well it worked when i changed the processor type (i let it build completely) but then when i changed the other option for no apic it didn't work

...rebuilding

----------

## slpz

well it finished...

and still it doesn't work

>>> i get the same problem as before

when #dmesg | less

i get that looping thing

----------

## magic

did you move the kernel to your boot partition?

mount /boot

cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage

----------

## slpz

i did that as part of the installationg

doing the partitioning and then setting it up

if i didn't, wouldn't it tell me i had no kernel?

when i started up?

----------

## magic

When you recompile the kernel the new one ends up at:

/usr/src/linux/arch/i386/boot/bzImage

the bzImage is the kernel

so if you want to use your new one you will need to move it to your  /boot partition

 :Very Happy: 

the old one is still stored on the /boot partition until your either overwrite it or move it to something like bzImage.old

----------

## slpz

```
cp /usr/src/linux/arch/i386/boot/bzImage /boot
```

this is what i did during the installation so i just did it again

moving it onto the boot partition will make it start up with the kernel, so that apic is disabled?

hopefully!

----------

## slpz

hmmm that still doesn't work

----------

## magic

make sure you mount your  /boot partition

if you followed the install guide you will have 3 partitions /boot / and swap

the /boot partition isnt mounted by default 

you will need to mount it before you copy the file there

you can mount it with:

#mount /boot

----------

## slpz

BLING BLING!!!!

```
PING 192.168.2.1 (192.168.2.1): 56 octets data

64 octets from 192.168.2.1: icmp_seq=0 ttl=64 time=5.5 ms

...

--- 192.168.2.1 ping statistics ---

3 packets transmitted, 3 packets received, 0% packet loss

round-trip min/avg/max = 3.5/4.1/5.5 ms
```

HOORAY!

but one more thing... apparently i forgot to add in devfs support. i think i remember where that was so i'm going to try to find it and compile it in, and then... i mount /boot and copy the .../bzImage thing to /boot

reboot, and kaching! i hope, let's try

----------

## magic

Sweet! .... 

That was a harder problem that I first though!

I think you probably have kernel compiling down to a science now  :Very Happy: 

Now you get to do the long and boring part .... adding  X and KDE or Gnome.

Its going to take a long time to compile but when its done you will have the most up-to-date machine!

I think (since you made it through this problem) you will enjoy gentoo linux.

I've been using it for over a year now and don't plan on switching to anything else.

----------

## slpz

hmmm 

newbie me  :Smile: 

where is devfs?

i can't find that either

----------

## magic

file systems

----------

## slpz

yeah that's where i found it before but it's not there

is it important? because otherwise i just wanna disable it or something

----------

## magic

sorry first you need to go to 

Code maturity level options  --->

enable that 

then 

file systems

yea its best to have that on for gentoo

----------

## magic

btw this is from the install doc's 

Code maturity level options --->

  [*] Prompt for development and/or incomplete code/drivers"

(You need this to enable some of the options below.)

     ...

File systems --->

  <*> Reiserfs support

(Only needed if you are using reiserfs.)

       ... 

  <*> Ext3 journalling file system support

(Only needed if you are using ext3.)

       ...

  [*] Virtual memory file system support (former shm fs)

(Required for Gentoo Linux.)

       ...

  <*> JFS filesystem support

(Only needed if you are using JFS.)

       ...

  [*] /proc file system support

(Required for Gentoo Linux.)

  [*] /dev file system support (EXPERIMENTAL)

  [*]   Automatically mount at boot          

(Required for Gentoo Linux.)

  [ ] /dev/pts file system for Unix98 PTYs

(Uncheck this, it is NOT needed.)

       ...

  <*> Second extended fs support

(Only needed if you are using ext2.)

       ...

  <*> XFS filesystem support

(Only needed if you are using XFS.)

you might need some of that if you used ext2 or ext3

----------

## slpz

cool found it compiling

----------

## slpz

how do i add dns servers?

i have the ips

----------

## magic

edit your /etc/resolv.conf

so it has

nameserver 192.168.1.1

nameserver 192.168.1.1

and replace 192.168.1.1 with your DNS

OR

enable dhcp 

which should add them automatically *i think   :Very Happy: 

----------

## slpz

oh cool i think they're already there... dhcp from a while ago?

w/e it works i can ping yahoo

so now i just need to do lots of emerging  :Wink: 

----------

## magic

alright that will be $200 .... 

just kidding   :Laughing: 

have fun!

magic

----------

## thanatopsizer

I've been having a similar problem with getting my eth0 card to work.  I have an onboard realtek nic, and I have already gone into the kernel and checked off everything you specified as well as copy the re-compiled kernel to the boot directory.  When I run ifconfig eth0 I get 

```
eth0: error fetching interface information: Device not found
```

While reading the general installation guide it said that I need to add my ethernet card module to my modules.autoload file, but then I check /lib/modules/`uname -r`/kernel/drivers/net for my card all I see is something called dummy.o   Any help would be greatly appreciated.

----------

## magic

The best way to know which kernel driver you will need is to take a look at the manual or netcard chip and get its chip number. If its on the motherboard its usually located near the network connection. Once you get this, you will need to add it to the kernel and then save it and reboot. What kind of motherboard do you have?

----------

## thanatopsizer

abit It7 max2

it has a on board RTL8100B 10/100M PCI Fast Ethernet Controller, I will try and find it in the kernel... 

BTW, thanks for helping me...

----------

## thanatopsizer

I figured out what the problem was... in the kernel config I selected to include the realtek drivers rather than make a module of them.  I corrected this and added it to the modules.autoload file and everything works.

----------

## PartyCharly

magic << I love u.

i worked nearlya day with sveral friends on the new linux machine of my brother ...

but fucked network wont work.

so we installed win -> get knoppix --> burned it --> retryed to install gentoo with and without apic ...

damn we need only seconds to install gentoo now (we think so)

now we tryed your tip and its working ...

yeahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

THANK A LOT an big hughs 4 u

----------

