LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   eth0: ERROR while getting interface flags: No such device (https://www.linuxquestions.org/questions/linux-networking-3/eth0-error-while-getting-interface-flags-no-such-device-589899/)

ncsuapex 10-06-2007 11:57 AM

eth0: ERROR while getting interface flags: No such device
 
I just purchased a new barebones PC and took the HD out of my old PC and put it in this new barebones one. I am having problems getting the network working. Below are commands with responses that Ive tried for trouble shooting.

I am running Slackware with the 2.6.13 kernel
I had to disable acpi (acpi=off) for it to bootup, it was hanging on IRQ#9 disabling. I am using lilo.



PC is this one: http://www.tigerdirect.com/applicati...33209&CatId=31



I'm not so sure that some of the results are "new" results, or left over from the previous PC. Any way I can force linux to recheck for hardware to see if that is the right chipset for the network card?


I ran netconfig and entered all the information and got no errors.




dmesg | grep -i net
NET: Registered protocol family 16
NET: Registered protocol family 2
Initializing IPsec netlink socket
NET: Registered protocol family 1
NET: Registered protocol family 17
NET: Registered protocol family 10



lspci | grep -i ethernet
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8136 (rev 01)

/sys/bus/pci/devices/0000:01:00.0# cat device
0x8136


ifconfig eth0 up
eth0: ERROR while getting interface flags: No such device


uname -a
Linux "my hostname" 2.6.13 #1 Sat Sep 3 21:11:20 PDT 2005 i686 pentium4 i386 GNU/Linux


01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8136 (rev 01)
Subsystem: Intel Corporation: Unknown device d607
Flags: bus master, fast devsel, latency 0, IRQ 11
I/O ports at 1000 [size=256]
Memory at 50000000 (64-bit, non-prefetchable) [size=4K]
Expansion ROM at 50200000 [disabled] [size=128K]
Capabilities: [40] Power Management version 2
Capabilities: [48] Vital Product Data
Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/1 Enable-
Capabilities: [60] #10 [0001]
Capabilities: [84] #09 [014c]

osor 10-06-2007 12:02 PM

Is the correct module loaded (what does lsmod say)?

ncsuapex 10-06-2007 12:10 PM

I didn't see anything that looked like a network module loaded when I ran lsmod. And I'm not real sure which module needs to be loaded. I've seen


From http://www.xpcgear.com/d945gcpe.html

10/100 Mbits/sec LAN subsystem using the Realtek* RTL8101E-GR Ethernet LAN controller


from intel's website.


"The board provides one of the following:
Gigabit (10/100/1000 Mbits/sec) LAN subsystem using the Intel® 82573L Gigabit Ethernet Controller
10/100 Mbits/sec LAN subsystem using the Intel® 82562GZ Platform LAN Connect (PLC) device"

ncsuapex 10-08-2007 05:41 PM

ok I did

modprobe r8169

when I do lsmod I get

Module size used by
r8169 23304 0


but when i try to do ifconfig eth0 up I get the error

eth0: error while getting interface flags: No such device


ifconfig -a doesnt show eth0 at all

osor 10-08-2007 06:18 PM

Quote:

Originally Posted by ncsuapex (Post 2917692)
modprobe r8169

For the Realtek FastEthernet controller (which seems to be what you have from your lspci) try the modules for 8139cp or 8139too. If you somehow have the Intel controller, try e100 or e1000 for FastEthernet or Gigabit ethernet respectively. When you find the correct driver, you can add it to modules.conf or whatever.

ncsuapex 10-09-2007 09:47 AM

I ended up adding the modules 8139cp and 8139too still no worky. I did a modules -l | grep for 100 and didn't see either of those 2 modules.


Is it possible that the lspci and other commands are giving data about my old PCI ethernet card? All I did was take the harddrive out of one PC and put it into a new PC. Is there a way to force linux to probe the new hardware to see what it says?


thanks for the replies so far.


j

osor 10-09-2007 10:51 AM

Quote:

Originally Posted by ncsuapex (Post 2918430)
I did a modules -l | grep for 100 and didn't see either of those 2 modules.

That just means you (or whoever compiled your kernel) didn’t build them.
Quote:

Originally Posted by ncsuapex (Post 2918430)
Is it possible that the lspci and other commands are giving data about my old PCI ethernet card?

I don’t think so. Generally, lspci gets its data from the sysfs interface provided by the kernel. This is dynamically generated at boot from hardware probing.

An alternate theory is that you may have the NIC disabled in the BIOS or something.

ncsuapex 10-09-2007 01:12 PM

I went back and checked for the e100 module and it was there so I added it along with the 8139cp and 8139too and r8169, no worky. I checked in the BIOS and it had On board LAN: enabled.


I'm thinking about just putting in my old PCI network card that was in the old PC and see if that works.

osor 10-09-2007 04:57 PM

Quote:

Originally Posted by ncsuapex (Post 2918638)
I'm thinking about just putting in my old PCI network card that was in the old PC and see if that works.

I guess that’s what you do when you’re out of ideas. You might instead try to boot a livecd that has good autodetection and that has a more recent kernel (such as knoppix). From there, see what module is being used for your NIC, and see if it works on your slack setup.

ncsuapex 10-09-2007 05:18 PM

I had booted with a Slax 5.1.8rc CD and it didn't detect it either. I think I have an old Knoppix CD laying around.. I might try that as well. The old Ethernet card was onboard as well so I can't take it out.


I did try to install the Realtek drivers

r8101-1.003.00.tar.bz2
Linux driver for kernel 2.6.x (Support x86 and x64)
http://152.104.125.41/downloads/down...1E/RTL8102E-GR


got this error. The "make clean modules" command was from the readme file, ran as root.


make clean modules
make -C src/ clean
make[1]: Entering directory `/installs/r8101-1.003.00/src'
rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers
make[1]: Leaving directory `/installs/r8101-1.003.00/src'
make -C src/ modules
make[1]: Entering directory `/installs/r8101-1.003.00/src'
make -C /lib/modules/2.6.13/build SUBDIRS=/installs/r8101-1.003.00/src modules
make: Entering an unknown directory
make: *** /lib/modules/2.6.13/build: No such file or directory. Stop.
make: Leaving an unknown directory
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/installs/r8101-1.003.00/src'
make: *** [modules] Error 2



ls -l /lib/modules/2.6.13
total 1108
lrwxrwxrwx 1 root root 21 2006-06-25 19:29 build -> /usr/src/linux-2.6.13



ls /usr/src/
linux@ linux-2.4.32/ rpm/ slackbuilds/ speakup-2.4.32/

rsashok 10-09-2007 07:13 PM

You have version mismatch: your kernel version is 2.4.xx, but the drivers require version kernle 2.6.xx. I'd try drivers for 2.4.x

osor 10-09-2007 10:11 PM

Quote:

Originally Posted by rsashok (Post 2919019)
You have version mismatch: your kernel version is 2.4.xx, but the drivers require version kernle 2.6.xx. I'd try drivers for 2.4.x

Or maybe he is running 2.6.xx, but he has deleted his buildtree. Or perhaps he installed a precompiled kernel. If he didn’t build his currently-running kernel, he won’t be able to build modules for it.

ncsuapex 10-10-2007 11:03 AM

according to uname I am running 2.6.13. I installed Slackware 10.2 straight from the install CDs and havent modified the kernel at all. I don't remember deleting the build tree, but then again I'm not exactly sure what that is. How do I get it back?

uname -a
Linux "my hostname" 2.6.13

rsashok 10-10-2007 11:33 AM

Could you look at :
> ls -l /lib/modules
and
> ls -l /usr/src/kernels

osor 10-10-2007 12:36 PM

Quote:

Originally Posted by ncsuapex (Post 2919809)
I don't remember deleting the build tree, but then again I'm not exactly sure what that is. How do I get it back?

uname -a
Linux "my hostname" 2.6.13

The buildtree contains the configuration, Kbuild system, and object files for the kernel that you built. The sourcetree contains the sources that led to said object files. For a running kernel, the buildtree and sourcetree are usually accessed through the symlinks:
Code:

/lib/modules/`uname -r`/build
/lib/modules/`uname -r`/source

These almost always point to the same directory, which usually resides somewhere in /usr/src.


All times are GMT -5. The time now is 03:34 PM.