Driver Install - make - Cannot stat r8101.ko

Hi,
I’m pretty new to Linux. I just installed openSUSE 11. The 64-bit laptop has a RealTek RTL8102E NIC, which SUSE misidentified during the install. I found the supposedly correct Linux driver on Realtek’s website, but I’m getting a problem when trying to compile the driver and I can’t find my problem or the solution in any current threads - so I must be doing something pretty stupid. I followed the directions…

su - root

lsmod | grep r8169

rmmod r8169

tar -vjxf r8101-1.010.00.tar.bz2

cd r8101-1.010.00

make clean modules

make install

But when I do the make install, I get errors:

make -C src/ install
make[1]: Entering directory /home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src' install -m 744 -c r8101.ko /lib/modules/2.6.25.5-1.1-default/kernel/drivers/net/ install: cannot stat r8101.ko’: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src’
make: *** [install] Error 2

The file listing in the ./src directory is:
total 164
-rw-r–r-- 1 root root 1742 Jul 22 03:27 Makefile
-rw-r–r-- 1 root root 1887 Jul 22 03:44 Makefile_linux24x
-rw-r–r-- 1 root root 0 Nov 29 21:47 filist.txt
-rw-r–r-- 1 root root 19093 Sep 26 03:43 r8101.h
-rw-r–r-- 1 root root 105910 Sep 26 03:28 r8101_n.c
-rw-r–r-- 1 root root 5248 Jul 22 03:56 rtl_eeprom.c
-rw-r–r-- 1 root root 1750 Jul 22 03:27 rtl_eeprom.h
-rw-r–r-- 1 root root 12772 Jul 22 04:15 rtl_ethtool.h

The commands from the makefile are:
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
KMISC := /lib/modules/$(KVER)/kernel/drivers/net/
KEXT := $(shell echo $(KVER) | sed -ne ‘s/^2.[567]…/k/p’)o
KFLAG := 2$(shell echo $(KVER) | sed -ne 's/^2.[4]…
/4/p’)x

modules:
ifeq ($(KFLAG),24x)
$(MAKE) -f Makefile_linux24x
else
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD)/src modules
strip --strip-debug r8101.$(KEXT)
endif

clean:
rm -rf .o .ko ~ core .dep ..d .*.cmd *.mod.c *.a .s ..flags .tmp_versions Module.symvers Modules.symvers *.order

install:
install -m 744 -c r8101.$(KEXT) $(KMISC)

ifneq ($(KFLAG),24x)
r8101-objs := r8101_n.o
r8101-objs += rtl_eeprom.o
obj-m += r8101.o
endif#($(KFLAG),24x)

Any help that someone could give to get me past this issue would be very much appreciated!

Could you try these commands?

# make modules
# make install

Hi Adrian,
Thank you for replying. Yes, the output from those commands are pasted below:

make modules

make -C src/ modules
make[1]: Entering directory /home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src' make -C /lib/modules/2.6.25.5-1.1-default/build SUBDIRS=/home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src modules make[2]: Entering directory /usr/src/linux-2.6.25.5-1.1-obj/x86_64/default’
make[2]: *** No rule to make target modules'. Stop. make[2]: Leaving directory /usr/src/linux-2.6.25.5-1.1-obj/x86_64/default’
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src’
make: *** [modules] Error 2

make install

make -C src/ install
make[1]: Entering directory /home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src' install -m 744 -c r8101.ko /lib/modules/2.6.25.5-1.1-default/kernel/drivers/net/ install: cannot stat r8101.ko’: No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/wade/Downloads/NetworkRTL8102E_Driver/r8101-1.010.00/src’
make: *** [install] Error 2

It seems that you don’t have kernel source installed, do you?
You can check it by typing

rpm -qa | grep kernel-source

If you don’t have it, then

sudo zypper install kernel-source

You will need linux-kernel-headers also

rpm -qa | grep linux-kernel-headers

again, if you don’t have it

sudo zypper install linux-kernel-headers

Then follow the instruction in the readme file of your driver
as you did it before, it should compile now.

Hi Adrian,
You are a genius! That was the problem, the default SUSE11 install didn’t include the kernel or header files. This is what I love about the Linux community - people who are passionate about the specialty and willing to share their knowledge! Many Thanks!

Well, I’m glad to help you. Not a genius though, that goes for people like Linux Torvalds :slight_smile:

One more question on this topic. I am having the same problem.
The command
“sudo zypper install kernel-source”
requires that the computer tries to connect to the internet to download files. I need to install the kernel source and header files in order to connect to the internet. Is there another way to install the files? I have another Windows computer that can connect to the internet. Is there a way I can download the files on that computer and then move them to the linx machine and install them? If so, what are the commands for it?

Thanks.

HI also have I problem installating NIC driver in my suse 10.1 linux system.

I found out that my NIC card is
realtek rtl8102e family pci-e fast ethernet nic
and im not sure how to install that in suse linux.

i have a dual boot system: windows and suse. I got the NIC card from looking at windows hardware profile.

I believe I cant connect to LAN without installing the NIC card, right?

Guys, can you please share your idea on how can I get this driver installed?

My HP DV7 laptop has a Rtk8108 device, for which the r8101 driver is also desired (although it sort of worked OK with the r8169 that installs by default with 11.2)

I usually find an r8101 rpm file appropriate to my kernel by searching the openSuSE build service at

Software.openSUSE.org

Be aware that once you install a driver instead of the default, a kernel update will not load a new/updated driver automatically nor will it install a default appropriate for the new kernel.

Best approach - don’t permit a kernel update until you have downloaded the appropriate driver and/or are prepared to rebuild from source. Same holds true for video drivers such as those from the ATI repositories.

Hello -

Thanks for the response.

May I ask the step by step approach on how can I get the driver installed or in your case how did you able to successfully install the NIC driver in your workstation.

can i just use r8101-1.010.00.tar.bz2 for my
realtek rtl8102e family pci-e fast ethernet nic?

I am also new to suse linux and I am passionate about connecting it to my laptop using the LAN cable only (PC to PC connection)

Please help me if you have the time.

many Thanks

For AllanX:
It has been a while since I was on 10.x vintage OS.
I am currently at 11.2, and the r8169 driver loads by default and mostly works. I changed to the r8101 to enable WOL (wake on lan) and to make the install more compatible with KNetworkManager, neither of which may be important to you.

As for direct connect, PC-PC, depending on the age of your hardware, you may need an Ethernet Crossover cable. You will have to check hardware manuals or on line to find out if your NICs support Auto-Sense; if not, you’ll need a crossover cable or two normal cables and a hub or switch.

To directly connect two PC’s, you need to setup each for static IP addressing. Open YAST - Network Devices - Network settings, select edit for the Ethernet device and choose an address, for example 192.168.10.x (x=1 to 244, 255 usually a broadcast address) and subnet mask (I use /24). The second PC needs a different address, 192.168.10,y.
Keep in mind that setting up static addresses will most likely break any subsequent connections to routers or gateways, unless you carefully select your static addresses.

With both PCs set up with compatible static addresses, you should be able to open a konsole session (command window) and “ping” one address from the other.

ping 192.168.10.40
PING 192.168.10.40 (192.168.10.40) 56(84) bytes of data.
64 bytes from 192.168.10.40: icmp_seq=1 ttl=128 time=1.69 ms
64 bytes from 192.168.10.40: icmp_seq=2 ttl=128 time=0.525 ms
(Ctrl-C exits from ping)

Assuming you can ping each from the other, then what?
Are both running Linux?
If the second is Windows, you will need to set up sharing to move or access files, and will need something like Samba on the Linux side.

Be (very) aware that getting all these set up usually works best when you have internet access and can download programs and check forums. The PC-PC connect complicates this.

If you really want/need the r8101 driver, then
Step one: In a konsole window, get your kernel info:

uname -a
Linux PVE-LinuxSRV5 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 x86_64 x86_64 x86_64 GNU/Linux

So here I am running kernel 2.6.31.12-0.2-desktop

Step two: Open Software.openSUSE.org and search for r8101 in SLES/SLED/10
You should see several selections like:

r8101-kmp-default
drivers:nic/SLE_10
Realtek r8101 kernel module for RealTek RTL8100/8101/8102/8103 Fast Ethernet controllers with PCI-Express interface.

Step three:
Scroll down to find the rpm that matches the type AND version of kernel you found in step one. For example

x86_64 r8101-kmp-default-1.015.00_2.6.16.46_0.12-1.1.x86_64.rpm

is ONLY for the x86_64 version of kernel 2.6.16.46-0.12-1.1

If you can’t find a good match for your kernel version and type, then you will have to compile from source.
Open a new thread and ask for help.

Step four:
Load the rpm to you Linux system. I find One-Step install usually works, but many don’t like it, particularly in older versions of the OS such as 10.x You can also download the rpm and install it with YaST or the rpm command line.

Step five:
Open YAST - Network Devices - Network settings, select to edit your NIC, select the hardware tab and in the “module name” drop down box select the r8101 driver. If it does not show up after installing (Step four), reboot and try again.

Step Six:
Reboot is probably the easiest way to get your new r8101 module loaded. To verify, in a konsole window,

lsmod |grep r8
r8168                 110460  0

You should see r8101 (my machine here running r8168 module)

Final reminder: once you replace the default driver in this manner, subsequent updates of the kernel or updates to newer version of OS will probably not load an updated version of r8101 module. You must repeat this process each time.

Good luck, or since this is SuSE - “Have a Lot of Fun” :slight_smile:

Hi -

It works. thanks a lot for the detailed steps.
My SUSE is now workig properly and I can do a PC-to-PC connection: linux and windows.

Just a follow up question.
Have you tried to setup a socket program (server program) that is configured in xinetd in YAST? what I did is, i edit /etc/services to add something like:

testserver 5556/tcp 'my test version

and I configure xinetd such that the testserver service when called in my client program will fireup the actual server. Here, I configured xinetd through YAST in this way.

service name
testserver
path
/home/allan/netwrork/myserver

my concern now, do you think that the way I setup my socket program (listening socket) to run by xinetd is correct?

I am getting a bind error while trying to connect to my testserver service. When I try not to run my server program (listening socket) through YAST and run it as:

/home/allan/network/ ./client localhost

/home/allan/network/ ./server (listening socket)

it works just fine. my client was able to connect and did not get any bind error.

Please help if you have the time. many many thanks