# DHCP -- failed to bring up eth0 -- make menuconfig dead

## atreyu

i just finished installing 1.4 and tried to install KDE using "emerge KDE" and found that i could not get to the DNS ... because the eth0 is not getting an IP from the DHCP.

i used the dmesg and don't see my card (how do you scrole back up when the list exceeds the screen height by the way?)

i ran "/etc/init.d/net.eth0 start" and got ... "trying to bring eth0 up, failed."

i went into /etc/conf.d/net and made certain that iface_eth0="dhcp" is UNcommented .. 

i have tried both commenting and uncommenting "dhcpcd_eth0="-h name"

i used "cat /proc/pci" and saw that the NIC is 3c905c-TX/TX-M[Tornado] .. so, i went into the Kernel configuration and made certain that the corresponding driver was installed as part of the kernel.

i've typed "rc-update add net.eth0 default" it's there.

"lspci -v" showed me nothing ('command not found')

now, in addition to not being able to get the eth0 up and grabbing and IP, i typed "make menuconfig" and it now says

"make: *** No rule to make targe 'menuconfig'. Stop."

i have tried to read through as many posts as i could find that already address these issues, but am still having no luck. should i rebuild? (ug)

thanks for your patience and help.

----------

## fyerk

Are you sure you have the kernel sources installed? Try this.

```

# emerge sync

# emerge gentoo-sources

# cd /usr/src/linux

# make menuconfig

```

----------

## atreyu

i tried what you suggested ...

```
emerge sync
```

 didn't work because i can't get an IP ... but i had done that earlier today so it just used the cache ...

the rest of what you said got the

```
make menuconfig
```

back, which is good   :Surprised:   thanks! 

now ... back to the ever annoying Failed to bring up eth0 problem. thanks again for your quick post, now i can keep looking into the Kernel configurations ... 

i wanted to post more info here about the NIC .... in the kernel config. i've checked off 

"3c590/3c900 series (592/595/597)" 

because the help specifically mentioned the 3c905c.

----------

## rac

Silly question time: does /sbin/dhcpcd exist?  Does running it manually work?

----------

## fyerk

Did you compile your card as a module or directly into the kernel? If you did it as a module, first see if it's in the kernel with:

```

# lsmod

```

If it doesn't show up, try:

```

# modprobe 3c95x

```

If it does show up, see if you can assign an IP manually. (your NETMASK is usually 255.255.255.0 but double check with your ISP.)

```

# ifconfig eth0 IP_ADDRESS netmask NETMASK

```

----------

## atreyu

 *Quote:*   

> Silly question time: does /sbin/dhcpcd exist? Does running it manually work?

 

maybe. when i type that i can't tell if anything happens, it just goes to the prompt again (no errors though)

 *Quote:*   

> Did you compile your card as a module or directly into the kernel?

 

as i said ealier  *Quote:*   

> so, i went into the Kernel configuration and made certain that the corresponding driver was installed as part of the kernel. 

 

no, it is compiled as part of the kernel, i hear NICs don't like to be modularized. 

let me ask ya'll this, how do i install a new kernel? i'm not certain i'm doing that correctly. i tried the line that is in the install directions ..

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

mv /boot/bzImage /boot/bzImage.orig

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

but when i do

```
dmesg
```

i'm still not seeing it listed in the hardware .. which seems to be to be the driver isn't installed, but the kernel configuration i've been working on seems to show that it ought to be installed. thus, perhaps the new kernel hasn't actually been installed. how's that sound?

----------

## pjp

If /boot is on a seperate partition, you will probably need to mount it before copying the bzImage over.  However, the command to move the current bzImage to .orig should have failed.  What does ls /boot output?

----------

## atreyu

 *Quote:*   

> What does ls /boot output?

 

8 files : 

system.map

system.map-2.4.19-gentoo-r9

bzImage

bzImage.orig

config

config-2.4.19-gentoo-r9

vmlinuz

vmlinuz-2.4.19-gentoo-r9

yeah, the command to move it didn't fail. i don't know why. btw, how would i mount the /boot ?

----------

## rac

 *atreyu wrote:*   

> btw, how would i mount the /boot ?

 

Assuming /etc/fstab is set up correctly, 

```
# mount /boot
```

...calling "mount" with no arguments will tell you what filesystems are mounted.

----------

## fyerk

To check if boot is already mounted use this command.

```

# mount | grep boot

```

To boot it (assuming it's on the first partition) use this.

```

# mount /dev/hda1 /boot

```

----------

## atreyu

so, mounting the boot is necessary to move the new kernel image into the boot folder? so that grub can load the new kernel? is that right?

would you be willing to condescend to give some step by steps? after i configure the kernel i .... what? ...

```
make dep

make clean bzImage

modules

modules_install

#IS THIS CORRECT?

mount /boot

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

```

is that about the idea?

----------

## rac

Yes, that's about the idea.  You're missing "make" before modules and modules_install, but I'll assume that's shorthand/typo.

----------

## fyerk

 *atreyu wrote:*   

> so, mounting the boot is necessary to move the new kernel image into the boot folder? so that grub can load the new kernel? is that right?
> 
> 

 

Yes that's right

 *Quote:*   

> 
> 
> would you be willing to condescend to give some step by steps? after i configure the kernel i .... what? ...
> 
> 

 

```

(Configuring the kernel)

# cd /usr/src/linux

# make dep && make clean bzImage modules modules_install

(Mounting boot)

# mount /boot

(Copying the new kernel image)

# mv /boot/bzImage /boot/bzImage.orig

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

(Reboot)

# shutdown -r now

(Check to see if the kernel loaded the NIC)

# dmesg | grep 3c[59]

```

----------

## atreyu

hmm. here's what i got when i typed

```
mount

/dev/ROOT on / type xfs (r w, noatime)

proc on /proc type proc (rw)

none on /dev type devfs (rw)

tmpfs on /mnt/init.d type tmpfs (rw.mode=8644.size=1024k)
```

what the heck is this?!   :Question: 

----------

## rac

 *atreyu wrote:*   

> what the heck is this?!  

 

Looks like the result of an /etc/fstab that still has the bogus BOOT and ROOT entries, that have not been changed to actual disk partition names.

----------

## fyerk

 *atreyu wrote:*   

> hmm. here's what i got when i typed
> 
> ```
> mount
> 
> ...

 

It looks like your /etc/fstab file is not set up correctly. You should replace ROOT and BOOT with the actual partitions they correspond to. For example, if hda1 is your boot partition, and hda3 is your root partition, then your fstab file should look something like this

```

/dev/hda1     /boot      ext2      noauto,noatime    1 2

/dev/hda3     /          xfs       noatime           0 1

/dev/hda2     none       swap      sw                0 0

```

Note that I've only included the relevant entries - you should already have lines for the cdrom and proc etc.

----------

## atreyu

you guys are great !   :Very Happy:   ... the machine is still churning on

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

after that i'll check the /etc/fstab and make certain that it's correct, as you both pointed out. if it isnt' then i'll fix it up and move on with the

```
(Mounting boot)

# mount /boot

(Copying the new kernel image)

# mv /boot/bzImage /boot/bzImage.orig

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

(Reboot)

# shutdown -r now

(Check to see if the kernel loaded the NIC)

# dmesg | grep 3c[59] 
```

----------

## atreyu

on boot up i saw that yes indeed ... 

```
Bringing eth0 up
```

/sbini/ifconfig shows the DHCP has leased me an IP!

ahh  ...  now i can rest ... and tackle X on monday. goodnight gentlemen.  :Very Happy: 

i give props to:

edge

kanuslupus

and our gracious moderator ... rac

good work!  :Very Happy: 

----------

