# Can't configure network (Gentoo 2006 )

## Kasumi_Ninja

I installed Gentoo with the livecd cli installer. When I booted into my new Gentoo install the my internet (dhcp) connection wasn't working. I tried to run the 'net-setup' script however this command was unknown!   :Shocked: . I also tried "dhcpcd eth0" to no avail. I am stuck here  how can I succesfully  configure my network?

----------

## gentoobobby

Hey my friend do a net-setup eth0 

this will go to ur first network card did this help ?

----------

## gentoobobby

also have u tried ifup eth0 ?

----------

## Kasumi_Ninja

Both "net-setup eth0" and "ifup eth0" give me"

bash: command not found

I am puzzeled by this!

----------

## gentoobobby

hmmm so is this a fresh install maybe u didnt tell it to copy over the network settings ?

----------

## Kasumi_Ninja

The installer didn't show any errors so it must ahve copied everything. I think I try a reinstall and see what happens...

----------

## gentoobobby

Hey man well it dosetn reall tell u that u have / havent copied over ur netwrok setting may i add thisis the command u need beofre u chroot into ur new enviroment

cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

all i no is this copys ur networking settings over before u chroot  into ur new enviroment

----------

## Kasumi_Ninja

Thanks for the advice unfortunatly this didnt help   :Sad: 

----------

## gentoobobby

Well im not 100 % sure then my friend i no that is deffiantly the command which copies your network settings across before you chroot into the new enviroment .  

Have u tried to follow the networkless installtion guide ? 

As this does everything you need .

I came across thes same probelm as you , 

 but i just copied the distfiles over and everything worked fine.

 but id just go with the netwrokless instaltion guide

----------

## gentoobobby

Sorry wrong info i have now editied this postLast edited by gentoobobby on Tue Mar 07, 2006 2:13 pm; edited 1 time in total

----------

## gabrieldain

Well, i have the same problem...

In my case, gentoo doesnt detect the eth0 card for some reason. i run ifconfig and only lo comes up.

I'm POSITIVE that I compiled the kernel with the eth0 module... What am i missing? :S

----------

## gentoobobby

try this 

ifup eth0 

now type 

ifconfig 

did ur network card appear this time ?

----------

## gabrieldain

nope...

i tried adding it from /etc/conf.d/net, resolv.conf (though it had nothing to do), etc, and nothing seems to work...

Its like the card isnt even there

----------

## gentoobobby

Ok i am a little confused on where u are 

are u half way thorugh a setup ? 

have u tired 

net-setup eth0 

does this help ?

----------

## gabrieldain

nah, i've finished the installation, flawlesslly, except for that detail; it just wont detect the network card... I'm recompiling the kernel with support for a bunch of network card i *know* i dont need, just in case... PCI too.

Its a very old computer.. With a very old network card, but it worked just fine in the LiveCD  :Confused: 

edit: cant use net-setup outsite liveCD environment. i even had to boot the livecd to run lspci  :Razz: 

----------

## gentoobobby

sorry i cant help u my friend i no on my old laptop i had to use this command 

modprobe command 

which was

modprobe sis900 

the sis900 was my network card so obvisouly this would have not helped you . 

Let me  no how things are work out

----------

## Monkeh

 *gentoobobby wrote:*   

> Well im not 100 % sure then my friend i no that is deffiantly the command which copies your network settings across before you chroot into the new enviroment . 

 

No, it's not. That copies your DNS servers over, nothing more.

Can we have the output of lspci from the CD please?

----------

## gentoobobby

ok i am sorry for the mistake as i said im no expert but thtas what got my network working

----------

## Monkeh

 *gentoobobby wrote:*   

> ok i am sorry for the mistake as i said im no expert but thtas what got my network working

 

It would get your network working if you hadn't copied it over in the firstplace, yes. The handbook does tell you to copy it..

----------

## gentoobobby

Ok sorry i thought he may have forgot to copy them across as when i chrooted into my new enviroment for the first time nothing worked because i did not use that command.

----------

## Monkeh

 *gentoobobby wrote:*   

> Ok sorry i thought he may have forgot to copy them across as when i chrooted into my new enviroment for the first time nothing worked because i did not use that command.

 

That would be because you didn't actually follow the instructions. Anyway, he's using the installer, so that's not a problem.

----------

## gentoobobby

Ok sorry people miss things out sometimes 

chill out

----------

## Ekenstein

Have you tested to do it static?

----------

## hpux

I'll put money down that your problem is the one answered in thread https://forums.gentoo.org/viewtopic-t-413483-highlight-ifconfig+missing.html

The jist is that net-tools wasn't installed, so boot back off the live-cd and emerge net-tools; you should be good to go.

----------

## Kasumi_Ninja

 *hpux wrote:*   

> I'll put money down that your problem is the one answered in thread https://forums.gentoo.org/viewtopic-t-413483-highlight-ifconfig+missing.html
> 
> The jist is that net-tools wasn't installed, so boot back off the live-cd and emerge net-tools; you should be good to go.

 

Can someone tellme how to do this?

----------

## Kasumi_Ninja

When I looked in the start-up messages I get the notification: 

```
netmount was not started
```

My network adaptor is a Marvel Yukon Gigabit Ethernet controller.

So far I tried:

modprobe sk98lin

I added sk98lin to  /etc/modules.autoload.d/kernel-2.6

However I still get the same message. And no internet   :Sad: 

----------

## Kasumi_Ninja

When I try to chroot into /mnt/gentoo  in order to emerge net-tools I get the following message:

```
chroot  /media/hda4

chroot: cannot run command `/bin/bash': Permission denied
```

Edit: I narrowed the problem down to mounting with no exec option (https://forums.gentoo.org/viewtopic-t-314431-highlight-chroot+bin+bash+permission+denied.html).

Solved!  I mounted my gentoo partition with the default option (which includes exec)

```
# mount -t reiserfs -o defaults /dev/hda4 /mnt/hda4/

# chroot /mnt/hda4/
```

----------

## Kasumi_Ninja

Ok I finally chrooted into my gentoo install. Doing a emerge -a net-tools gives me the following:

```
emerge -a net-tools

These are the packages that I would merge, in order: 

Calculating dependencies ...done!

[ebuild   R   ] sys-apps/net-tools-1.60-r11

Do you want me to merge these packages? [Yes/No]

>>> emerge (1 of 1) sys-apps/net-tools-1.60-r11 to /

>>> Downloading http://distfiles.gentoo.org/distfiles/net-tools-1.60-patches-1.1.tar.bz2

--16:05:37--  http://distfiles.gentoo.org/distfiles/net-tools-1.60-patches-1.1.tar.bz2

           => `/usr/portage/distfiles/net-tools-1.60-patches-1.1.tar.bz2'

Resolving distfiles.gentoo.org... failed: Temporary failure in name resolution.

```

Solved this by copying my /etc/resolv.conf from the livecd to  /mnt/hda4/etc/resolv.conf (source: https://forums.gentoo.org/viewtopic-t-423883-highlight-temperary+temporary+failure+resolution.html)

----------

## Kasumi_Ninja

This didn't help anything. I get the same error message and still no internet

----------

## Minthos

I've also done a fresh install of the 2006.0 release (amd64), and I have no net-setup either. I configured my network 'manually' by running dhcpcd -G <gateway address> (looked at the computer next to me on the LAN to get the gateway address). I have net-tools installed, I even re-emerged it just to make sure.

I have ifconfig, I have internet, I have everything except the net-setup script.

----------

## Kasumi_Ninja

 *Minthos wrote:*   

> I've also done a fresh install of the 2006.0 release (amd64), and I have no net-setup either. I configured my network 'manually' by running dhcpcd -G <gateway address> (looked at the computer next to me on the LAN to get the gateway address). I have net-tools installed, I even re-emerged it just to make sure.
> 
> I have ifconfig, I have internet, I have everything except the net-setup script.

 

Hey Minthos thank for your suggestion! I am afraid though that this has something to do with my Marvell Yukon ethernet card. Somehow this card isn't recognized and a "modprobe sk98lin" won't work either.

I found several solutions here: http://gentoo-wiki.com/HARDWARE_sk98lin I hope this helps other people!

----------

