# dhcpcd and ifconfig problems [SOLVED]

## starky

Hi guys, I'm new to gentoo and I have a msg on boot which causing me a problem.

Bringing eth0 up via DHCP 

ERROR: Problem starting needed services "netmount" was not started. 

I've emerge dhcp and emerge dhcpcd and still the problem is still occuring which SHOULD of fixed the problem.

I've also executed this command "rc-update add dhcp default" and still have the problem. I then tried rc-update add dhcp boot and still the problem occurs

I do rc-update -s and i didn't see dhcpcd in there. 

When i typed in rc-update add dhcpcd default it says it could not find dhcpcd (which is obvious). 

Why isn't dhcpcd listed?

ALSO when i type in "ifconfig" my eth0 stats don't even show! im not so sure if my card is even detected. 

I've run "genkernel --udev all" and it should of detected all my hardware as it did when i booted with my universal installation cd.  Why isn't my "ifconfig" showing any stats? I mean nothing show for eth0 but only "lo" stats.

I've also set in /etc/conf.d/net iface_eth0="dhcp"

I am running a cable connection straight to my computer and its not running through any router, or such, so I'm expecting a public ip address, not a 192.x.x.x ip.

Oh, another thing I've read about 7 posts regarding SIMILAR matters on the gentoo forums and with no luck.

Any help appreciated. Thanks!!Last edited by starky on Thu May 19, 2005 11:50 pm; edited 1 time in total

----------

## Sloden

try "rc-update add netmount boot". That might du the trick.

----------

## starky

yeah did that already, and with no luck.

----------

## griffinme

Are you running a via chipset?

Last time I checked (-r7), genkernel was not installing the via velocity ethernet drivers. 

```
 cd /usr/src/linux

genkernel --menuconfig all
```

Find your drivers under device drivers/networking and make sure they are checked.

Also try lsmod with the live cd and your install and compare them to see what is missing. Note that anything compiled directly into the kernel will not show in this since this shows only the modules that are running. 

If you do need to re-do the kernel and you have an ATI video card you might want to look at the ATI howto and you might as well look at the sound howto. I know I ended up redoing the kernel for at least one of those. :Wink: 

----------

## starky

Yes im running via a chipset as my network card is onboard.

You want me to try lsmod on livecd and compare with my install. See whats missing and then if I have missed anything (in this case, network card drivers), then I would go into genkernel --menuconfig all

I'll see what type of network card is mine and then go

cd /usr/src/linux 

genkernel --menuconfig all

Then go to drivers under device drivers/networking and make sure that the right support driver is checked.

I've also read another forum and it says to type modprobe -l to see what modules are configured and if your ethernet card is in there then losmod to see if its currently in use, if not then insmod it.

----------

## Sloden

You'll not see you device ethX under ifconfig unless it's started and working. When I disable my connection, all I see is "lo". dhcpcd shouldn't be added to any runlevel, as it's not a runlevel script. Try restarting your connection (as root) with: /etc/init.d/net.eth0 restart. What does it say?

----------

## starky

oh ok so dhcpcd is not a runlevel script. ok good.

I am not on my box as I am work but i will try /etc/init.d/net.eth0 restart and if that dosen't work then try my last post.

Well i think, that its my network card not detected and drivers need to be added, but what i don't understand is genkernel --udev all compiles pretty much similar kernel to livecd.

Extraction from documentation.

"genkernel works by configuring a kernel nearly identically to the way our Installation CD kernel is configured".

why hasn't my network card been configured? none the less it needs to be configured.

----------

## griffinme

https://bugs.gentoo.org/show_bug.cgi?id=87058

----------

## Sloden

 *Griffinme wrote:*   

> Are you running a via chipset? 

 

 *starky wrote:*   

> Yes im running via a chipset as my network card is onboard. 

 

I think you guys talk past each other. What griffinme asked was whether or not you ran a specific type of card "VIA", which doesn't get included when using the latest genkernel. You might be using something else, from what I understand. 

I think it would be smart to post your lshw output (not everything, just the stuff related to your network card. If you don't have lshw, emerge it  :Smile:  ) In addition I think comparing your lsmod running the livecd with your current lsmod is a great idea. What you search for might not be there, though, as it might be included in the kernel and not added as a module. Lshw will give you a clue as to what kind of hardware you need drivers for.

----------

## starky

Hi guys,

After last night of trying every troubleshoot I have read and can think of, I still have no Internet.

I will advise of my WHOLE situation.

Firstly,

I've emerge dhcpcd,

I've set iface_eth0="dhcp" in /etc/conf.d/net and 

Then entered "rc-update add net.eth0 default"

Restarted and entered "ifconfig" and no eth0 stats displayed.

(I also tried "dhcpcd eth0" and then did ifconfig and nothing.Then I entered /etc/init.d/net.eth0 start but go this 

message "Bringing up DHCP via eth0          [!!]" and sometimes i get under that message netmount service was not started. So i rc-update -s and find netmount is set as default and I even put netmount as boot and nothing works.

So knowing there is no eth0 stats in ifconfig, I knew my ethernet card might not be installed or detected, so i went to 

check. I booted into livecd installation so I could compare my livecd kernel compilation with my kernel.

I entered the command lspci at root, and found out my card is using "intel corporation 82810DB pro/100". I did lsmod 

and found loadable module for my ethernet card was "e100". Knowing that my ethernet card is intel pro/100 and 

module is  e100 i wrote down this information and then booted into my own kernel i compiled (genkernel). I did cd/usr/src/linux and typed as root genkernel --menuconfig --udev all and went to Device Drivers option, then 

Networking and in there I looked at all the drivers. I came across "Intel PRO/100" and it was already set as "M". 

Do i set the device driver into my kernel or as a module? I know (or think) my network driver Intel PRO/100 should be 

set as a module and i left it as is. I then rebuilt the kernel and logged back in as root....crossed my fingers, and typed 

ifconfig and i got no eth0 stats....back to square 1. I'm really getting frustrated here, can someone help!! What can I do? or what am I doing wrong.

Another note, i did everything people have advised for this post.

----------

## Master Shake

how about rc-update add dhcpcd default and just use that?

----------

## starky

how about rc-update add dhcpcd default and just use that? -> I was told that dhcpcd shouldn't be added to any run level as it's not part of the runlevel script. is that right? or it has to be added? if so, how?[/quote]

----------

## starky

any suggestions?

----------

## Master Shake

I use dhcpcd and it works fine.  I never heard anything about that.

----------

## Sloden

Very important: Modules aren't run by themselves. First; edit your /etc/modules.autoload.d/kernel-2.6 and include "e100", and it will be loaded at boot. To get it running without restarting do a modprobe e100. If you included it into your kernel (not as a module) this would be automatic.

Very informative post, btw, Starky. Great! I've never heard of dhcpcd being used in this manner (as a runlevel-script) , but then again I might be wrong about this.

----------

## shaumux

I was having the same kinda problem

Ur main problem is ur NIC is not getting detected u need to either build in the driver into the kernel while compiling which will automatically detect the NIC at boot or u have to use alias command.

----------

## -Craig-

Uhm...maybe...did you do this? Sorry if I missed it...

```
rc-update add net.eth0 default
```

----------

## shaumux

I think he already did that otherwise he wouldnt get that error

i have dealt with such a thing myself its his NIC its not getting detected.

----------

## starky

Hi guys!

Problem solved yesterday, thanks for all your help.

I rebuilt the kernel with my "Intel PRO/100" drivers" as '*' and not as 'm'.

I know NOW that using 'm' will not load my modules on startup, as mentioned in the gentoo documentation and by Sloden's post -> Very important: Modules aren't run by themselves. Edit etc/modules.autoload.d/kernel-2.6 and include "e100", and it will be loaded at boot.

```
I hope this post will help all users who are having this problem.
```

----------

