Originally Published: Tuesday, 17 October 2000 Author: Mike Baker
Published to: interact_articles_irc_recap/IRC Recap Page: 1/1 - [Printable]

Best ot IRC for Tuesday, October 17th

It's time once again for another edition of Best of IRC. As always ,we'll be taking an in-depth look at some of the questions asked on #Linuxhelp. If you haven't already been to #Linuxhelp, you'll find instructions on how to get there at the bottom of the Live! page! Feel free to stop by and ask questions!

   Page 1 of 1  

Eeek! /dev/eth0 is missing!
<MaFi0s0> i installed my network card but there is no device for it in /dev , can someone help me?
<Harkonen> MaFi0s0: try running as root "/dev/MAKEDEV eth0"
<MaFi0s0> already tried that
<Harkonen> MaFi0s0: try running as root "/dev/MAKEDEV /dev/eth0" maybe
<MaFi0s0> it says "i dont know how to make eth0"
<Harkonen> MaFi0s0: have you checked your /var/log/dmesg
<MaFi0s0> how would i check?
<MaFi0s0> it says a lot of stuff
<Harkonen> MaFi0s0: you need to edit the file "/var/log/dmesg" .. you got like gnotepad or anything?
<MaFi0s0> yea
<MaFi0s0> ok, it's open in kedit
<Harkonen> MaFi0s0: so look for 'eth' lines...should give info about any network cards it found during bootup
<MaFi0s0> k
<MaFi0s0> nothing there about eth0
<MaFi0s0> i did a search for eth in there, and nothing
<MaFi0s0> Harkonen there was no eth in the dmesg thing
<Harkonen> MaFi0s0: then we can assume Linux has not detected your network card
<MaFi0s0> it's under the supported hardware
<MaFi0s0> and etherdrake detected it
<MaFi0s0> just isn't make the eth0 device
<MaFi0s0> making*
<Harkonen> MaFi0s0: don't you think there's a good reason for no /dev/eth0? I haven't used Mandrake much but the log files say you don't have a detected network card
<MaFi0s0> o
<Harkonen> MaFi0s0: do you have the program "netconfig"?
<MaFi0s0> well i know it's irq and i/o so any1 i can manually install it?
<MaFi0s0> i got netconf
<Harkonen> MaFi0s0: not easily...is this a PCI network card?
<Harkonen> MaFi0s0: as long as your kernel is setup for that card it should be detected automatically...do you have a /etc/sysconfig/network-scripts/ifcfg-eth0 file?
<Harkonen> MaFi0s0: as long as your kernel is setup for that card it should be detected automatically...do you have a /etc/sysconfig/network-scripts/ifcfg-eth0 file?
<Harkonen> MaFi0s0: run the command "ifconfig" and paste the results to this window?
<MaFi0s0> yea
<Harkonen> MaFi0s0: if you have a /etc/sysconfig/network-scripts/ifcfg-eth0 file then please run the command "cat /etc/sysconfig/network-scripts/ifcfg-eth0" and paste the results again
<MaFi0s0> device = "eth0" ipaddress =""
<Harkonen> MaFi0s0: ok...now does your cable modem use DHCP?
<MaFi0s0> yea
<Harkonen> MaFi0s0: let's try this then...
<Harkonen> MaFi0s0: ok, backup your ifcfg-eth0 file and replace the contents of that file with:
<Harkonen> MaFi0s0: DEVICE=eth0
<Harkonen> BOOTPROTO=dhcp
<Harkonen> ONBOOT=no
<Harkonen> MaFi0s0: do you know if you have dhcp installed?
<MaFi0s0> well netconf has an option for it
<Harkonen> MaFi0s0: become root and then run "rpm -qa | grep dhcp" and "rpm -qa | grep pump" and paste the results
<MaFi0s0> rpm -qa | grep dhcp returned a file starting in dhcp and ending in mdk
<MaFi0s0> i dont think xchat has copy and past
<Harkonen> MaFi0s0: ok and pump?
<MaFi0s0> returned nothing
<Harkonen> MaFi0s0: have you edited the ifcfg-eth0 file?
<MaFi0s0> yep
<MaFi0s0> did you try using drakconf and going into hardware settings?
<MaFi0s0> i wouldn't be able to help you that much, i'm still a newbie

Setting up Linux can be tricky for anyone at times. This difficulty can be compounded by making mistakes along the way. Luckily for many newbies out there there are places like #Linuxhelp which offer advice for newbies. It's unfortunate that we can't always be around to help. The above log shows the actual conversation that took place in the channel as recorded by the logs. We're sorry that nobody was around to straighten this out in the first place but that we should at least try to make amends by clearing things up now.

There is no /dev/eth0. The lack of /dev/eth0 is not due to configuration issues or mistakes setting up the system, there just isn't one. About the only way you'll see network devices is via the ifconfig (interface configuration) program. By default ifconfig shows only devices which are both up and have an IP address, so you'll probably end up with output like this:

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16144 Metric:1
RX packets:5115 errors:0 dropped:0 overruns:0 frame:0
TX packets:5115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0

The lo interface is the Loopback interface, the only device you're likely to see on a machine without networking. The sole purpose of  lo is to route 127.0.0.1 back to itself so it's not very interesting as far as networking is concerned. To see all the interfaces that Linux knows about then you'll need to use ifconfig -a which will show the interfaces regardless of configuration state. Please note that ifconfig is only capable of telling you about the interfaces Linux currently knows about, there's a good chance Linux doesn't even know about the Ethernet card.

Support for hardware in Linux is provided through the Linux kernel in one of two ways: either as a module that gets loaded after bootup or built directly into the kernel. Typically with the default installations, everything is done as modules simply because the install program can add and remove them as needed. It won't be until you compile your own kernel that you deal with built-in support. In short, we need to load a module to support the card. The module that has to be loaded will depend a lot on the type and brand of the card but the two more or less generic choices are ne2000 compatible (ne.o and ne2k-pci.o) for 10Mbps Ethernet cards and tulip (tulip.o) for 100Mbps cards.

A typical scenario for getting a card working might go like this:


root@localhost# ifconfig eth0
eth0: error fetching interface information: Device not found
root@localhost# modprobe tulip
root@localhost# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:20:AF:8D:6D:07

BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
Interrupt:10 Base address:0x300

Of course, had ifconfig not worked immediately afterwards you'd have to do some more work, either by running the command dmesg looking for clues or continuing modprobe'ing other modules. Once you've figured out which module you need so Linux can see your Ethernet card, you can continue by editing /etc/modules.conf. The /etc/modules.conf (/etc/conf.modules on some systems) consists of instructions for the kernel autoloader. To get the kernel to automatically load the tulip module whenever eth0 needs to be accessed you'd add the line:

alias eth0=tulip

With Linux recognizing the Ethernet card, you can proceed to configuring it. In many cases, you can configure via dhcp (dynamic host configuration protocol) simply by running dhcpcd eth0. If the remote end doesn't support dhcp, you'll probably have to set the address manually. While you can set the address via commands like ifconfig eth0 192.168.1.1 up the effects only last until the next reboot, so it's preferable to find out how your distribution starts networking and change the settings there. Most distributions have configuration tools for networking such as linuxconf.

This is nowhere near a complete guide on networking or how to get your Linux system online. For that please refer to:

  • Ethernet-HOWTO
  • Networking-Overview-HOWTO




  •    Page 1 of 1