Help! Linux noob can't set up network drivers correctly

Brian23

Banned
Dec 28, 1999
1,655
1
0
I decided to try out linux the other day...
I installed Gentoo Linux from a live cd and I can boot into the bash shell, but it won't autodetect my network card. When I type 'ifconfig' it only lists lo (127.0.0.1) as my network interface. I've tried recompiling the kernel several times, and I can't get it to show eth0. I have a Netgear FA310TX network card. How do I make it see it?
 

dafuzion

Junior Member
Dec 16, 2004
5
0
0
try dmesg|grep eth0
or just post your dmesg here by typing dmesg
that will show us if your card is even being detected
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
to see all your interfaces you have to go:
ifconfig -a

ifconfig alone only shows active interfaces.

to configure it manually you go like
dhclient eth0
or
dhcpcd eth0
or to do it very manually you go:
ifconfig eth0 x.x.x.x
(were x.x.x.x equals your ip address)
route add default gw y.y.y.y
(were y.y.y.y is your gateway address)
echo "nameserver z.z.z.z" >> /etc/resolv.conf
(were z.z.z.z is your dns server)

 

Brian23

Banned
Dec 28, 1999
1,655
1
0
I tried 'dmesg|grep eth0' and it didn't display anything. So then I tried 'dmesg|less' and it showed a bunch of information, most of which didn't relate to networking. The only networking related part was where it loaded IPv6 and NET4. So it looks like my card isn't being detected.

Next I tried 'ifconfig -a' and it showed 2 interfaces:
lo (local loopback)
sit0 (IPv6 in IPv4) (did not have a IP address)

Gentoo linux is supposed to use dhcpcd, but I don't think I'm at the point where that software will help yet. It looks like my hardware isn't even recognized by the kernel.
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
2 suggestions:

1. Post in forums.gentoo.org, or better yet just do a search there. 99% chance you'll find an answer there.
2. Know what kind of module your card uses. What is your card? Seeing as how you got gentoo installed I assume you had network from the livecd? If so:

i. Boot from the livecd
ii. lsmod

Now go into your kernel config and make sure the appropriate network driver is compiled as a module (3c59x for example on 3com cards).

iii. make modules_install
iv. reboot to hard disk

if hotplug doesn't autodetect your card (do an lsmod to see if the module is loaded) then load it manually with

v. modprobe <module name here>
vi. ifconfig eth0

You should have it working then. If this works fine for you, then make sure you set the module to be loaded automatically on boot by:

vii. nano -w /etc/modules.autoload.d/kernel-2.6

(assuming you're using a 2.6.x kernel) and add the module to the list in the file. Save, close, reboot to try it out.
 

Brian23

Banned
Dec 28, 1999
1,655
1
0
Thank you everyone for your help! I finally got it working. I was installing the wrong drivers into the kernel and that's why it wasn't working.
 

jterrell

Senior member
Nov 18, 2004
559
0
76
Originally posted by: Brian23
Thank you everyone for your help! I finally got it working. I was installing the wrong drivers into the kernel and that's why it wasn't working.

Gratz!! Gentoo is pretty wieldy for a "noob". Great Job!!!