View unanswered posts | View active topics It is currently Fri Sep 20, 2019 6:51 pm



Reply to topic  [ 7 posts ] 
 linux vs MS pci-ids 
Author Message

Joined: Mon Dec 28, 2009 7:32 pm
Posts: 1
Reply with quote
Post linux vs MS pci-ids
I am attempting to determine pci-id for a Realtek nic to be used with ESXi 3.5.

I have copied the ESXi image to a bootable USB stick to avoid making 'coasters' of a few CD's.

I have two identical Compaq machines and both have a Realtek nic. One is running XP and I will leave it as is. The second was running CentOS 5.3 and that is the box I am installing ESXi on.

I have gotten past the first hurdle of getting ESXi to recognize the IDE disk but have been halted by "lvmdriver failed to load..."

Prior to killing the CentOS box with the ESXi install I ran “lspci” (knowing
that I might have issues.) I also performed MircoSofts 'Device Manager' version.
This Where my confussion starts.

The former CentOS box showed the Vendor:Device combo as
10ec:2a01

the XP machine showd
PCI\VEN_10ec&DEV_8139&SUBSYS_2a01103c......

As I read it, CentOS was calling 2a01 a Device#, but XP is calling 2a01 a
Subsystem#.

I think it should be 10ec:8139

If I dig into the "wayback machine", isn't 0x2a01 an HP vendor number? I also remember HP and Realtek being in bed togather.

###
So my first of probably many questions to come is...
which data Needs to be entered where, and to what file(s) does it need to be tar'd back into?

###
My second is...
Is there one document/one source that explains the ESXi directory structure after the 'something.tgz' files get expnaded?
What stuff gets cruched where?

simple.map... pci.ids... hwdata... bootbank... ???...

I ask because once I DO put the correct pci.ids in their proper place(s), won't I STILL have to put some ESXi version of the Realtek-8139 Driver somewhere?

I have seen posts about Realtek-8169 drivers working with ESXi. Maybe that driver would get me close. I do not want to hack/recomplie driver code because I am lousey at it. I have not touched c code for a very long time. Perhaps the folks at sourceforge have already done me a favor!

If I can find a 8139 driver where do I put it and would the driver be an object file with .o extension?

I will continue the peek-n-poke method like my old undocumented dos days until I get ESXi to recognize the nic, but ANY input is greatly appreciated.


######
Perhaps somewhat off topic, but but my curiusoty has been peaked. I have been meaning to re-acquent myself with hardware at this level. As a WAN guy now, I spend most of my days working/wrestling with telco and providers.

I like the "insert tab A into slot B" step-by-step approach and will use it, but after the fire is put out, it is also nice to understand what is
happening behind the sceeens.

Like most topics googled, I have found a lot of snipits. But can anyone
recommend a comprehensive, detailed book that covers I/O sub-systems and such.

Something on the order of "The Magic Garden Explained" by Goodheart & Cox. This was an exellent read/reference back in '94 that covered SVR4


Very many thanks in advance.


Mon Dec 28, 2009 9:00 pm
Profile
Site Admin

Joined: Mon Mar 16, 2009 10:13 pm
Posts: 3880
Reply with quote
Post Re: linux vs MS pci-ids
The first thing to start with will be the driver. ESX(i) uses drivers compiled specifically for ESX(i) and you can use generic Linux drivers. The vmkernel has a Linux compatability module so you can use Linux source as a start for the drivers, but they still have to be modified for use with ESXi. There are a few threads that lay down some instructions for that if you're still interested.

Once you have a driver compiled, you can test it by using the command vmkload_mod <driver> to try to load the driver. If you have it compiled OK, it will load and you'll end up with the nic available for use (you can use esxcfg-nics -l to check to see if the NIC is up and running).

Once you have that in place then you need to drop both the driver (the .o file) and an edited simple.map file into oem.tgz. pci.ids is optional.

_________________
Dave Mishchenko
VMware vExpert 2009-2013
Image
Now available - VMware ESXi: Planning, Implementation, and Security
Also available - vSphere Quick Start Guide


Tue Dec 29, 2009 11:11 pm
Profile

Joined: Thu Dec 31, 2009 9:53 am
Posts: 1
Reply with quote
Post Re: linux vs MS pci-ids
Paco, I just went through a similar exercise with a different RealTek NIC. I don't know if there is any "official cookbook" or perhaps a simpler approach, but here's a sample procedure.

From your ESXi console, scp these two files out to your CentOS box (if you've got a dual-boot setup with ESXi and CentOS, you'll need a 3rd Linux machine or else will need to enable some kind of SSHD on your XP box):

Code:
    scp /etc/vmware/simple.map myname@mycentosbox:/tmp
    scp /etc/vmware/pci.ids    myname@mycentosbox:/tmp


Go to your CentOS box.

To modify /tmp/pci.ids, look for the RealTek section (10ec) and simply add a line for the 2a01 device, e.g.

Code:
   10dc  Realtek Semiconductor Co, Ltd.
           0139 Zonet Zen3200
           2a01 My Funky RealTek NIC
           etc.


To modify /tmp/simple.map add a line anywhere that looks something like:

Code:
  10ec:2a01 0000:0000 network r2a01.o


The hard part is that module r2a01.o, which as Dave writes you'll need to compile yourself. If you're lucky, someone may have already posted a compiled driver file, but if you can't locate one via Google you can look for the source code at RealTek's website:

http://www.realtek.com.tw/downloads/dow ... l=3&Conn=2

You should compile the code on a 64-bit version of Linux -- as always, YMMV.

You can try scp'ing the newly-compiled r2a01.o file into ESX and trying the vmkload_mod Dave mentions, or you can go for the gusto and just try a deployment.

To bundle everything up for deployment, from your CentOS host you'd do something like:

Code:
   # Create skeleton dir tree
   mkdir -p /etc/vmware /usr/lib/vmware/vmkmod

   # Next copy in the files you either modified or compiled
   cp /tmp/simple.map /etc/vmware
   cp /tmp/pci.ids /etc/vmware
   cp /src/realtek/r2a01.o /usr/lib/vmware/vmkmod

   # Tar things up
   tar cvf /tmp/oem.tar /etc/vmware /usr/lib/vmware/vmkmod
   gzip /tmp/oem.tar
   mv /tmp/oem.tar.gz /tmp/oem.tgz

   # Mount the ESX partition that contains the oem.tgz file and copy in your new one.
   # On my setup, the commands were:

     mount /dev/sdb5 /mnt
     cp /tmp/oem.tgz /mnt


NOTE: I'm assuming that the existing ESX oem.tgz was empty (which it usually is, unless you had modified it yourself), otherwise you'd have to modify the above procedure to save the existing oem.tgz data and repackage it along with your new stuff.

Boot up ESX and see if the driver has loaded -- if it doesn't, you'll simply see warnings in /var/log/messages, it won't actually stop the system from booting. If you're lucky, though, the new NIC will already be working.

Good luck.


Thu Dec 31, 2009 10:44 am
Profile

Joined: Wed Mar 18, 2009 1:32 pm
Posts: 455
Location: Sweden
Reply with quote
Post Re: linux vs MS pci-ids
You could use me script too.

Create the folders and add the files needed in custom-esx.

or


Create the oem file and run the script.

_________________
Dovie'andi se tovya sagain,



Fri Jan 01, 2010 12:23 am
Profile WWW

Joined: Tue May 25, 2010 12:15 am
Posts: 3
Reply with quote
Post Re: linux vs MS pci-ids
Dave.Mishchenko wrote:
The first thing to start with will be the driver. ESX(i) uses drivers compiled specifically for ESX(i) and you can use generic Linux drivers. The vmkernel has a Linux compatability module so you can use Linux source as a start for the drivers, but they still have to be modified for use with ESXi. There are a few threads that lay down some instructions for that if you're still interested.

Once you have a driver compiled, you can test it by using the command vmkload_mod <driver> to try to load the driver. If you have it compiled OK, it will load and you'll end up with the nic available for use (you can use esxcfg-nics -l to check to see if the NIC is up and running).

Once you have that in place then you need to drop both the driver (the .o file) and an edited simple.map file into oem.tgz. pci.ids is optional.


Can you tell me more, how to manually compile the driver module for ESX/ESXi 3.5/4.0 ?
I suppose, for ESX/ESXi 3.5 it must be 32-bit version of Linux and for ESX/ESXi 4.0 it must be 64-bit version of Linux, am i right?

-What Distribution i should to use?
-What kernel should be (if it is important)?
-How to modify the driver's source code, before compile it?
-and so on (another circumstances) ...


Sat May 29, 2010 7:46 am
Profile
Site Admin

Joined: Mon Mar 16, 2009 10:13 pm
Posts: 3880
Reply with quote
Post Re: linux vs MS pci-ids
Have you see this guide?

http://www.kernelcrash.com/blog/using-a ... 009/08/22/

_________________
Dave Mishchenko
VMware vExpert 2009-2013
Image
Now available - VMware ESXi: Planning, Implementation, and Security
Also available - vSphere Quick Start Guide


Mon May 31, 2010 1:16 am
Profile

Joined: Tue May 25, 2010 12:15 am
Posts: 3
Reply with quote
Post Re: linux vs MS pci-ids
Dave.Mishchenko wrote:


No I am not seen it.
Thank you.


Mon May 31, 2010 2:28 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.