LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Realtek NIC driver (https://www.linuxquestions.org/questions/linux-newbie-8/realtek-nic-driver-748340/)

Aldoran768 08-18-2009 01:22 AM

Realtek NIC driver
 
Hello.

1) I'm a Linux Newbie, but want to understand some more of this world.
2) I got a little, but simple, issue. I need your help to solve it.

Scenario:
a) I got a linux ubuntu workstation with a Intel Nic driver.
b) I got a server I want Vmware esxi 4.0 installed on (no OS yet and uses realtek nic drivers)
c) I downloaded drivers; LINUX driver for kernel 2.6.x and 2.4.x (Support x86 and x64) 8.013.00 2009/7/30

Issue that needs to be solved:
I need to get something called r8168.o-file or r8168.ko although I don't know much about such files nor where they are located. It's not in the driver package. Issue is the .o/.ko file and how to create/download/extract, etc.

Above driver contains files:
r8168-8.013.00/
r8168-8.013.00/readme
r8168-8.013.00/Makefile
r8168-8.013.00/src/
r8168-8.013.00/src/r8168.h
r8168-8.013.00/src/Makefile_linux24x
r8168-8.013.00/src/rtl_eeprom.c
r8168-8.013.00/src/Makefile
r8168-8.013.00/src/r8168_asf.h
r8168-8.013.00/src/rtl_eeprom.h
r8168-8.013.00/src/r8168_asf.c
r8168-8.013.00/src/r8168_n.c

No r8168.o/r8168.ko file to be found in there.

What I have tried so far:
1) Downloaded missing kbuild, gcc, make for ubuntu.
2) Tried to reuse the ubuntu Workstation modules, but it doesn't provide the r8168.o file as it uses intel drivers instead.
3) Tried to compile the driverpackage according to readme, but the package itself needs the .o file to run, which is kinda weird. Why publish a driver that is only 50% complete?
4) Hunted the Internet Linux sites for a fresh clue to approach this issue. Found Linuxquestions.org as one possible station.

I don't belive this is a difficult issue.
I just want the driver file, so I can burn a esxi-CD to use on my server.
What takes a normal Linux user 1 minute to complete, takes 5 days or more days for a Linux-newbie like me.

Thanks
Aldoran

GrapefruiTgirl 08-18-2009 01:29 AM

First, have a look on your machine in /lib/modules/`uname -r`/kernel/drivers/ and see if the driver you need is already in there somewhere. If it is, use the modprobe <module-name> command to insert it (leave the .ko off of the end). Presto, done!

If it isn't there, you'd need to rebuild the kernel to enable the module.

The package you downloaded there is source code; it's the driver, but needs to be compiled. However, since the driver is to the best of my knowledge already included inside the linux kernel, there should be no need to build it yourself.

If you DO want to build the driver you downloaded there, you would open a terminal window from within that folder you extracted, and type make and then make install BUT: this is not the proper way to install stuff into a Linux OS which has a package manager. I don't use Ubuntu so I can't explain for you how to correctly build & package the driver for proper installation; you'd need to wait for another Ubuntu user to explain that, if you need it. Once it's built, (assuming it does build) then you will see the .ko file in there somewhere. That's the driver (the kernel module).

Sasha

EDIT: for clarity: you can't build the driver on ONE machine, for use on ANOTHER machine, because it builds against the kernel and all sorts of other things. You'll need to build the driver ON the machine you'll be using it for.

Drakeo 08-18-2009 01:43 AM

it never got built.
there was no need to install it it has been built into the kernel for a while now. Linus Travold and kernel.org placed it in the kernel so now it is maintained by the kernel team.
if you want to compile a kernel module you better have the tools.
the ubuntu way.
Quote:

sudo apt-get install linux-kernel-devel fakeroot build-essential makedumpfile
and
Quote:

sudo apt-get build-dep linux
and now you need a kernel.
Quote:

sudo apt-get build-dep linux-source
now you can ./configure make make install.

Aldoran768 08-18-2009 02:30 AM

Thank you both for such fast replies. I've read them and from that there are questions.
Quote:

Originally Posted by GrapefruiTgirl
EDIT: for clarity: you can't build the driver on ONE machine, for use on ANOTHER machine, because it builds against the kernel and all sorts of other things. You'll need to build the driver ON the machine you'll be using it for.

So what you say is the ISO-file from esxi can't work on any other computer besides the one that it originated from? I got esxi ISO that doesn't load and stops due to the NIC driver error. The server doesn't have an OS installed, so I need to install a Linux OS on the server to get the .o file then reformat the server and rebuild the esxi CD to install the esxi server on it? Much work for almost nothing. Wouldn't it be easier to just buy a separate NIC that works with esxi and not use the buildt-in NIC? I thought Linux beat the crap out of Windows when it comes to micromanagement like this.


Quote:

Originally Posted by drakeo
if you want to compile a kernel module you better have the tools. the ubuntu way.

Considering what Grapefruitgirl commented. Will this way create a .o/.ko file to use on my server?

To both of you:
From what I understand the VMware ISO delivers an image of some kind of VMware-linux. That said together with your comments it's impossible to create a driver for such ISO unless VMware releases another ISO for my particular NIC, isn't it?

GrapefruiTgirl 08-18-2009 07:39 AM

At this point, I don't know how to answer your above question(s) because I am very unfamiliar with not only VMware, but certainly with this 'esxi' VMware too. My advice/suggestions were intended to help you install a NIC driver into the Ubuntu OS. I don't know how this affects, or works in regard to, the VMware installation.

That said, depending on exactly what's inside the .ISO image you have, maybe you could mount the image, chroot into it (provided the shell & other tools are in there needed to chroot) and build the driver there, OR simply mount the image and put the appropriate .ko module into it as though it came with it (I don't know how that would go though).

This is beyond me at this point -- hopefully Drakeo or another member familiar with your situation can shed some *more accurate* light on what you might do next. Sorry I can't be of (more?) help!

Sasha

Aldoran768 08-18-2009 08:49 AM

Thank you for the answer.
I'll try fix this with a classic Windows workaround.
If that doesn't do it I just have to face the fact Linux can't be modified this way.
Replacing hardware seems to be the fastest way to solve this.

Thanks for the help ppl.

GrapefruiTgirl 08-18-2009 09:12 AM

Quote:

Originally Posted by Aldoran768 (Post 3647971)
Thank you for the answer.
I'll try fix this with a classic Windows workaround.
If that doesn't do it I just have to face the fact Linux can't be modified this way.
Replacing hardware seems to be the fastest way to solve this.

Thanks for the help ppl.

Whoa, don't give up so quick :)

The hardware in question IS supported, no doubt. It's just that as yet, you haven't gotten a perfect solution or accurate instruction as to how to do what you need to do.

Linux, generally speaking, *can* be modified in pretty much any way you can imagine -- you just need to know exactly what you need to do, and how to do it.

It's early yet in the life of your thread. Whatever you decide, I suspect others will pop in here sooner or later with more help.

Good luck,
Sasha


All times are GMT -5. The time now is 06:43 AM.