# eth0 assistance

## AzazeL

I run my adsl connection via a ethernet card connected to a router using dhcpcd and during my initial install I wasnt entirely sure if I had configured it correctly. Im not sure what type of ethernet card is installed in the computer either. When i booted for the first time the eth0 had an error saying 'netmount' wasnt booted or something along those lines. Any ideas which of the many conf files I need to look at?

----------

## pilla

First of all, you'll need to find out what card you have there. lspci (with -v option) may help you in this task

Then, you have to compile a kernel with support (either as a module or inside the kernel) for this card.

After that, the basic network configuration is in /etc/conf.d/net

The service you will need to start, basically, is /etc/init.d/net.eth0  

```

/etc/init.d/net.eth0 start

```

Don't forget also to RTFM  :Cool: 

 *AzazeL wrote:*   

> I run my adsl connection via a ethernet card connected to a router using dhcpcd and during my initial install I wasnt entirely sure if I had configured it correctly. Im not sure what type of ethernet card is installed in the computer either. When i booted for the first time the eth0 had an error saying 'netmount' wasnt booted or something along those lines. Any ideas which of the many conf files I need to look at?

 

----------

## AzazeL

Yeah i tried lspci -v but ahh... no command found apparently. Suggestions? Also during the init.d/net.eth0 start command is there any option to debug it? so i can see where ive gone wrong?

----------

## pjp

Does your NIC show up in the output of cat /proc/pci?  If not, I'd take a look at it physically... most have the necessary info printed on them.

----------

## AzazeL

Um... an ethernet controller appears in the list, is that what im looking for?

----------

## pjp

Should be... is there an identifiable make/model?

----------

## AzazeL

AMD PCnet LANCE. So i re-compiled my kernel to add AMD PCnet support and still... errors whenever I boot. Could it be a problem with my /etc/conf.d/net file? because Im confused when it comes to that.

----------

## pjp

Did you compile it into the kernel, or as a module?  Is it the same error?  What do you have in your conf.d/net file?

----------

## AzazeL

I compiled it into the kernel. But I'm thinking I may need to compile it as a module and then get the module to load on boot. And yes its the same error as before. As for my conf.d/net I've just altered it for my details. I've changed the first iface_eth0 line so it has the right IPs. I've uncommented iface_eth0="dhcp" as thats what im wanting to use and I've uncommented and changed my default gateway to 192.168.1.254

----------

## rac

 *AzazeL wrote:*   

> I compiled it into the kernel. But I'm thinking I may need to compile it as a module and then get the module to load on boot.

 

No, I recommend staying with it in the kernel - one less variable.

 *Quote:*   

> I've changed the first iface_eth0 line so it has the right IPs. I've uncommented iface_eth0="dhcp" as thats what im wanting to use

 

Aren't these two things mutually exclusive?

----------

## pjp

Hrm... for dhcp, all you should need in the net file is 

```
iface_eth0="dhcp"
```

You should be able to comment everything else.

----------

## AzazeL

Commented everything but

   iface_eth0="dhcp"

But still error remains.

I have a feeling I am gonna need to rip this ethernet card out and put in the type i have used in the past.

----------

## pjp

The netmount problem isn't uncommon.  Here are some links found with a search:  One, two, three, and four.

There are more, but I'm heading off to bed.  Good luck, I'll check back in the morning.

----------

## AzazeL

I changed iface_eth0="dhcpcd" and that seems to have helped a little. Now the only issue confronting me is that dhcpcd fails everytime it does a hostname look up on my computer. Hopefully this is a simple problem that anybody knows how to fix.

----------

## rac

 *AzazeL wrote:*   

> I changed iface_eth0="dhcpcd" and that seems to have helped a little.

 

Really?  First I've heard of this.  Wonder why that works.

 *Quote:*   

> Now the only issue confronting me is that dhcpcd fails everytime it does a hostname look up on my computer.

 

Might dhcpcd's -D and -H options help?

----------

## AzazeL

the dhcpcd idea was suggested in one of those links given to me. Im not actually too sure if its assisted in any way. Even with both -D and -h i cant get the hostname lookup to work. What should i have my hostname as? I mean theres any number of possibilities and in the past the dhcp my router has configged hasnt required a hostname.

----------

## rac

 *AzazeL wrote:*   

> -h i cant get the hostname lookup to work. What should i have my hostname as? I mean theres any number of possibilities and in the past the dhcp my router has configged hasnt required a hostname.

 

It's -H, not -h, and that option should take this decision out of your hands.   *dhcpcd man page wrote:*   

> -H     Forces  dhcpcd  to set hostname of the host to the hostname option supplied by DHCP server.  By default dhcpcd will NOT set hostname of the host to the hostname option received from DHCP server.

 

----------

## AzazeL

No change.

----------

## AzazeL

I found the solution to my problem. I compiled my ethernet drivers as a module and yeah got the module to load on boot and its worked fine since then.

I really want to thank rac and kanuslupus for all your help. You guys are awesome   :Surprised: 

----------

## pjp

Glad it is working.  One last question.  Did you leave iface_eth0="dhcpcd" or change it back to just "dhcp"?

----------

## rac

 *kanuslupus wrote:*   

> Did you leave iface_eth0="dhcpcd" or change it back to just "dhcp"?

 

A good question.  I just checked /etc/init.d/net.eth0, and both places it checks it looks like it explicitly checks against "dhcp", so I would be surprised if "dhcpcd" would work.  I think BonezTheGoon posted before morning coffee, and the tone of the post (from your link one) was not very certain.  I thought for a moment that it might regex dhcp against it, so either would work, but it doesn't.

----------

## AzazeL

I did try leaving it as dhcpcd but that was just adding one further complication, the hostname look up. So i commented everything but the iface_eth0 line and changed it back to dhcp and that seems to have made it work fine.

----------

