# No network after install [solved]

## h2sammo

Live CD 2008 picks up my NICs eth0 and eth1 just fine but after i finish the installation 

```
# /sbin/ifconfig 
```

only sees lo.

Could you please direct me or run me through configuring the network AFTER install?

i tried the steps described in the handbook and net-setup seems to be a liveCD only tool (not available after install).

i also tried the manual configurations steps but i get stuck at 

```

# ls /lib/modules/`uname -r`/kernel/drivers/net
```

 it cannot find that folder.

is there a way to reload the proper driver or something similar?Last edited by h2sammo on Tue Mar 17, 2009 2:10 pm; edited 2 times in total

----------

## disi

Hi, this depends on a lot of info...

If you just want to configure a static IP for your NIC try:

```
ifconfig eth0 up 192.168.1.1/24

route add default gw 192.168.1.254

echo "nameserver 192.168.1.254" >> /etc/resolv.conf
```

192.168.1.1 is the IP on the NIC (assuming 192.168.1.0 is your network with 255.255.255.0 subnet mask)

192.168.1.254 is your router

If you get an error with ifconfig eth0 up then you do not have the module compiled in the kernel. You need to enable your NIC in the kernel and reboot to get this device.

all configuration needs to be done in /etc/conf.d/net

The bootscript will automatically start all net.eth0 devices by default (which are configured in /etc/conf.d/net)

----------

## h2sammo

yeah, i need to set it up as DHCP, i forgot to mention in the main post.  if someone would be kind enough to show code for DHCP setup

also, my guess is that the module is not compiled in the kernel, hence i get that error in the 'uname -r' command code i mentioned in the OP.  could you please run me through how i compile the module in the kernel? i am confused on how i can select a module (and how do i know which module works with my NIC), where i can select it from, and how do i compile it.

there are basic questions since i am a noob.  please keep that in mind when trying to help me.  Source code along with explanation of what needs to be done will help me more than just an explanation of what needs to be done.

----------

## TheAbu

A few questions for you  :Smile: 

Can you run "lspci -v" and post the output here or a least the part relevant to the ethernet card (it will allow us to know the module you need and if it's already present or not.

Something you might try doing :

# su --

(here you enter your password when requested)

# cd /etc/init.d

# ln -s net.lo net.eth0

(if you get an error message, it means your net.eth0 link already existed)

# /etc/init.d/net.eth0 start

(here, if you get an error message can you post it here)

if you don't get any error message and if you installed dhcpd you can try

# dhcpcd eth0

Oh, and btw, did you build your kernel with "make menuconfig" or did you use genkernel ?

/me too a n00b but I hope I can help  :Smile: 

----------

## h2sammo

results for 

```
# lspci -v
```

 pertaining to the 2 NICs integrated in my NF590-M2R/G board:

```

00:10.0 Bridge: nVidia Corporation MCP55 Ethernet (rev a2)

            Subsystem: nVidia Corporation Uknown device cb84

            Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 7

            Memory at fe02a000 (32-bit, non-prefetchable) [size=4K]

            I/O ports at b400 [size=8]

            Memory at fe029000 (32-bit, non-prefetchable) [size=256]

            Memory at fe028000 (32-bit, non-prefetchable) [size=16]

            Capabilities: [44] Power Management version 2

            Capabilities: [70] MSI-X: Enable- Mask- TabSize=8

            Capabilities: [50] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/3

Enable-

            Capabilities: [6c] Hypertransport: MSI Mapping Enable- Fixed+

00:11.0 Bridge: nVidia Corporation MCP55 Ethernet (rev a2)

            Subsystem: nVidia Corporation Uknown device cb84

            Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 5

            Memory at fe027000 (32-bit, non-prefetchable) [size=4K]

            I/O ports at b000 [size=8]

            Memory at fe026000 (32-bit, non-prefetchable) [size=256]

            Memory at fe025000 (32-bit, non-prefetchable) [size=16]

            Capabilities: [44] Power Management version 2

            Capabilities: [70] MSI-X: Enable- Mask- TabSize=8

            Capabilities: [50] Message Signalled Interrupts: Mask+ 64bit+ Queue=0/3

Enable-

            Capabilities: [6c] Hypertransport: MSI Mapping Enable- Fixed+

```

im trying to rest of your advice next (i had to type all of that message in)

----------

## h2sammo

ok, i typed here what i see in the terminal when i write the code suggested.  it seems to me i dont have the module (driver) installed.  is that correct? if so, how do i go about installing it.  please remember, im a noob.

```

# su -- 

PASSWORD

# cd /etc/init.d 

# ln -s net.lo net.eth0 

ln: creating symbolic link 'net.eth0': File exists

# /etc/init.d/net.eth0 start 

* Starting eth0

*    Bringing up eth0

*       dhcp

*           network interface eth0 does not exist

*           Please verify hardware or kernel module (driver)

# dhcpcd eth0 

Error, eth0: ioctl SIOCGIFHWADDR: No such device

```

----------

## disi

OK, skip that  :Smile: 

Right, the module is missing, you probably want to use genkernel to build the kernel.

----------

## h2sammo

i cant 

```
# emerge genkernel
```

 as i have to network.

there is an official instructional http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?part=1&chap=3 on how to manually configure the network.  it has a step entitled "Searching for provided modules".  I am supposed to pick one from that list.  The command gives me an error, as displayed below

```
# ls /lib/modules/'uname -r'/kernel/drivers/net

ls: cannot access /lib/modules/uname -r/kernel/drivers/net: No such file or directory
```

any ideas?

----------

## TheAbu

No need to do a genkernel  :Smile: 

# cd /usr/src/linux

# make menuconfig

go to Device Drivers

Network device support

Ethernet 10 or 100 mbit

and build nForce Ethernet support as a module (it will build the module forcedeth)

it should solve your problem  :Smile: 

after that (I think it's not even mandatory since the kernel should be able to do that alone)

# modprobe forcedeth

# /etc/init.d/net.eth0 start

# dhcpcd eth0

and you should have a network

you might have to create 

# cd /etc/init.d/

# ln -s net.lo net.eth1

for your second interface

if you want them to start automatically at boot you can follow the handbook

# rc-update add net.eth0 default

# rc-update add net.eth1 default

for your /etc/conf.d/net

config_eth0="(dhcp)" should be enough (not sure about that I use hard coded adresses  :Smile: 

----------

## h2sammo

all i have is access to a terminal, i hope all those options would be available from the terminal.

i typed that command in, but look:

```
# cd /usr/src/linux 

bash: cd: /usr/src/linux: No such file or directory
```

i think i have to mention linux-(some specific gentoo kernel).  what command gives me the exact name of my gentoo kernel?Last edited by h2sammo on Wed Mar 11, 2009 11:21 pm; edited 1 time in total

----------

## TheAbu

Hum, this is really weird (at least for me  :Smile:  ) I do think, /usr/src/linux is standard for all gentoo  :Sad: 

and yes, you should have access to this from a terminal, I usually install using ssh from another box

Maybe you don't have a symbolic link to your kernel source. Could you try following the path step by 

step ?

# cd /usr

# cd src/

here you should have linux xxxxxxxx

----------

## h2sammo

```
# cd /usr/src

# ls
```

nothing...no listing seems i have nothing inside src...

----------

## TheAbu

Hum, I started using linux not long ago and I'm really not that knowledgeable so I could very well be wrong, but I do think, you should have this "/usr/src" folder unless you chose a different partitioning scheme and this partition isn't mounted.

here is a sample of what you should have 

in your root folder:

bin   dev  home  lost+found  mnt  proc  sbin  tmp  var

boot  etc  lib   media       opt  root  sys   usr

then in usr

X11R6  i686-pc-linux-gnu  lib      local    sbin   src

bin    include            libexec  portage  share  tmp

then in src

linux  linux-2.6.27-gentoo-r8

there can be some variation (no X11R6 maybe and a different xxxx-pc-linux-gnu) but overall it should be the same (at least to the best of my knowledge). If not, it means, either something went wrong when untaring your stage file, or part of your file system isn't mounted 

Don't panic yet, I might be totally wrong, but I must admit here I'm a bit lost  :Smile: 

Edit : an idea I just had, since you have no network connection I guess you didn't do "emerge gentoo-sources" So, maybe that's why you have nothing there  :Sad:  But, forcedeth (the module you need for your network interface is very common so I'm pretty sure it's part of the kernel installed by the live CD. What happen if you type

# modprobe forcedeth ?

----------

## h2sammo

Abu

you are the GOD of linux, and there is nothing you can say about it, SHHH

i did

```
# modprobe forcedeth
```

 nothing happened, 

```
localhost ~ #
```

 showed up underneath in a second or two.

then i did 

```
# emerge gentoo-sources
```

 and it went through, it connected to the emerge server and i got the updates, it compiled, and now when i do

```
# cd /usr/src

# ls 
```

i finally get 

```
linux  linux-2.6.24-gentoo-r7
```

also,

```
# ifconfig -a 
```

shows eth0 and eth1 configured properly, i assume as dhcp

so the way i interpret this is that forcedeth driver was not installed and i had to modprobe it.  only THEN i was able to emerge anything.  also, it is very intimidating to noobs like me that you have to 

# emerge gentoo-sources

in order to have gentoo compiled in src... even when installing FROM LiveCD.  i would expect this to be already there from a LiveCD  installation.

now i will have to emerge some graphical interface since all i have is a terminal

----------

## minor_prophets

You'll need to install X first, so Gentoo X Server Configuration Guide

and then decide which desktop environment you'd like and use the corresponding link found at the Gentoo Documentation Resources page

----------

## TheAbu

Sorry, I had to go to bed since it was pretty late here in Fance, but this is really good news  :Smile: 

To get a graphic interface you'll have to follow minor_prophets advice, but you'll see, even if Gentoo is initmidating at first, once you get the used to it, it's also something really enjoyable  :Smile: 

The emerge-source part, downloaded the sources on your computer but you still use the kernel you got from the live cd unless you also went through either a manual configuration or a genkernel buildding. There is absolutely nothing wrong with that, you can take some days to get used to your gentoo system before you start dwelling in that  :Smile: 

The only thing that might make it necessary for you to actually compile the source you just downloaded is, if they are different than the ones of the kernel you run now. Some programs (and some drivers, an example of that would be the nvidia driver if you have a nvidia graphic card) need to be compiled against the source of the kernel you run. So, if the kernel number from the Live CD and the kernel source you downloaded is different, you'll have to compile a new kernel. You can use either the genkernel or manual way (when beginning the genkernel way is of course a lot easier). If you decide to go the manual way, you will probably need to ask for help, nothing wrong with that, compiling a kernel is easy, going through the list of options isn't  :Smile: 

 And, when you'll have some difficulties again (you will,we all do  :Smile:  ) don't hesitate asking questions here  :Smile: 

----------

