# First boot after install: eth0 fails to go up

## r8dhex

my net adapter doesn't start properly, although the card itself is recognized (pcnet32). 

I have a working dhcp server on the network, and i want gentoo to use the dhcp server. I'm thinking maybe I left out some setting in the kernel, or maybe in the /etc/conf.d/net file.

The installation is done under vmware 3.1 in windows.

Any help on this would be ... um ... helpful. 

--- the error message ---

bringing eth0 up...

modprobe: modprobe: Can't locate module...

dhcpcd[1968]: dhcpStart: ioctl SIOCGIFHWADDR: No such device

Failed to bring eth0 up

ERROR: Problem starting needed services.

	"netmount" was not started.

---

----------

## BonezTheGoon

When you compiled your kernel what kind of support did you provide for your specific card?  Did you compile module support <M> or did you compile the support directly into the kernel <*>?  Also if you lsmod what modules are loaded?  You should be sure to check your /etc/conf.d/net file to be sure that dhcpcd is specified for your eth0.  But I don't think that is the problem given your eth0 is reported as not coming up properly.  If you compiled module support for your card be sure to add the module into the /etc/modules.autoload.  If you compiled support directly into your kernel you shouldn't have to tell it anything anywhere to have your card start up.  A good thing to try to see what the status of your card is, try 

```
/sbin/ifconfig -a
```

 and see if you can spot your MAC address.  If you see your MAC address your network card is started, then look for UP and RUNNING.  If you do not see up and running you need to check /etc/conf.d/net to see if your dhcpcd is setup properly.

Hope that provides some good info, and leads you to the answer!  Good luck!

Regards,

BonezTheGoon

----------

## r8dhex

Thanks for replying...

the driver is loaded as a module, and lsmod shows pcnet32, although i remember there being a mii when i lsmod'ed just after i booted from the cd, mii is gone now.

ifconfig -a shows eth0's MAC address but isn't up and running.

----------

## BonezTheGoon

OK Sounds like you are in pretty good shape.  I don't know what module 'mii' is.  A quick search on Google found this which indicates that mii is related to some NIC.  You might try to modprobe mii (although that does require that you compiled the support for the module into your kernel--but it won't hurt to try!)  Seems to me that the mii might be required for your card to start properly (may need to be started first.)  This is totally new to me, and I am just trying to make-out the information that Google brought up.  I am also trying to figure out what you would need to enable in your kernel to build this module.  In the mean time try modprobe(ing) the mii module just to see if you are lucky enough to already have it!

Regards,

BonezTheGoon

----------

## BonezTheGoon

OK I think I REALLY found something now, check this out . . . . .

http://216.239.51.100/search?q=cache:rFXpiFU-WQwJ:lhd.datapower.com/db/dispnewsitem.cgi%3FDISP%3F1409+linux+kernel+module+pcnet32+mii&hl=en&ie=UTF-8

This indicates that mii.c relates to the ethtool (as indicated in pre4)

But then we see (in rc3) that pcnet32 was having issues relating to the ethtool which says that it caused the driver not to work.

Check it out and you tell me whats going on.  Sounds very strange to me though.

Regards,

BonezTheGoon

----------

## r8dhex

in /etc/conf.d/net, i tried commenting out the lines which relate to dhcp, then uncommenting out the ifconfig lines and set it to a static ip address, gateway, etc.

reboot and it works...

leading me to think that my problem is with dhcpcd. I used to have the dhcpcd_eth0 set to "..." which caused it to not work. i set the variable to "-t 30" and it times out. I tried "dhcpcd eth0" on the command line and it stops awhile and drops me back to the prompt, then still nothing.

i know the dhcp server is good, other clients on the network work fine

this is the dhcp part of my /etc/conf.d/net

```

iface_eth0="dhcp"

dhcpcd_eth0="-t 30"

```

thanks in advance

----------

## BonezTheGoon

If you type 

```
dhcpcd eth0
```

 from command line does it work?  I was having some strange dhcpcd related issues at one point in time.  I just did dhcpcd eth0 about five times in a row and finally it got an IP lease (which on the cable/DSL router that was the DHCP server it's an infinite lease) once it had the lease I was able to reboot and the /etc/conf.d/net configuration was fine (without any arguments.)  I have no idea what was going wrong with mine, but its something else you could try at least.

Regards,

BonezTheGoon

----------

## BonezTheGoon

Wait a second!!!  In your post above you say that your /etc/conf.d/net says:

```
iface_eth0="dhcp" 

dhcpcd_eth0="-t 30" 
```

if thats what it really says there is your problem!!  You need it to say this . . . 

```
iface_eth0="dhcpcd" 
```

(atleast if my memory serves me well this morning, which it might not be)

Regards,

BonezTheGoon

----------

## r8dhex

I have solved the dhcp problem!!  :Smile: 

apparently the dhcp server isn't accepting the request from linux because i didn't give a hostname. so what i did was to add a "-h hostname" parameter to the dhcpcd_eth0 line.

the only lines i now have UNcommented in my /etc/conf.d/net are:

```

iface_eth0="dhcp"

dhcpcd_eth0="-h hostname"

```

replace hostname with the desired name for your system, like mygentoo or something...

woohoo

----------

## djrobx

I'm having the exact same error as the one above, on two separate and completely different machines.

In both cases I used a stage 3 tarball.  I didn't have this problem when I used a stage 2.  

On one machine I compiled the network driver directly into the kernel.  On the other, I installed it as a module (thinking that having it compiled in was causing the problem on the first machine) . 

Both machines fail to bring up eth0, but in both cases I can just type

"dhcpcd"

And the network works!  So why is the net.eth0 script having issues?

Is there somewhere that you're supposed assign "eth0" to a specific module?   I can't see anywhere in conf.d/net or init.d/net.eth0 where you would identify which module is related to eth0.

UPDATE: Ahh, nevermind.  After re-reading this thread a few times I saw the answer:

"I used to have the dhcpcd_eth0 set to "..." which caused it to not work."

D'oh!

-- Rob

----------

