SLES 11 SP2 with JMicron(R) JMC250/JMC260 PCI-E Ethernet NIC

Hi All,

I’m a bit of a Linux newbie, and was installing SLES 11 SP2 on a Shuttle XS35V2 box at home, which has a JMicron(R) JMC250 PCI-E Ethernet Adapter. Out of the box SLES didn’t seem to support it, so I went and grabbed the driver. Two days later and I now have networking. Was a painful process, learned a lot, and figured I’d save some others some time and post the whole process of getting everything running.

Be aware not all these steps are probably necessary, but it’s what I did.

  1. Downloaded the latest linux driver from ftp://driver.jmicron.com.tw/Ethernet/Linux/
  • Copy the driver to a USB stick
  1. Update the kernel

What I needed:
kernel-default-3.0.58-0.6.6.1.x86_64.rpm
kernel-default-base-3.0.58-0.6.6.1.x86_64.rpm
kernel-source-3.0.58-0.6.6.1.x86_64.rpm

  • Copy onto USB stick, stick it into the server and it mounts automagically to /Media/
  • Run YaST, Software > Add-On Products (Add) > USB Mass Storage → Select the USB Drive, give it a name etc etc.
  • Search Phrase kernel, and from here upgrade the kernel version, you’ll need to reboot from memory.

Hopefully your server comes back OK. I can feel your cringes from here.

  1. Install kernel source
  • cd to your mounted USB drive. Run following command to install the source
  • rpm -Uvh kernel-source-3.0.58-0.6.6.1.x86_64.rpm

  1. Install gcc compiler
  • From YaST > Software Management search and install gcc, you may need a SLES disk handy for this.
  1. Make oldconfig - Maybe someone higher up can comment on what this does, but I had to do it to get everything to run
  • cd /usr/src/linux

  • make oldconfig

  • This will take a while I found, grab a beer in the meantime.
  1. Copy your JME Driver to your server and extract
  • cp /media/T/jmebp-1.0.8.5.tar.bz /root/

  • tar -xvf jmebp-1.0.8.5.tar.bz

  1. Modify the Makefile
  • cd /jmebp-1.0.8.5/

  • vi Makefile

  • Find the line
    KSRC ?= /lib/modules/$(KVER)/build

Comment it out, and replace with:
KSRC ?= /usr/src/linux

Save the fine. Exit out.

  1. Try and run the make install
  • From the driver directory where the Makefile exists, run:
  • make install

  • When this finishes, try and load the module
  • modprobe jme

  • If this fails due to it being unsupported, run in unsupported mode:
  • modprobe jme --allow-unsupported

I think this is all I had to do, I was able to configure the NIC and was up and running. However I may have run /etc/init.d/network restart during this time, so that might be required as well.

Hopefully someone in the future is desperately googling how to do something similar and stumbles across this.

Cheers,

Dan

Just a follow up on the unsupported driver. Noticed when I bounced the server the network dropped out again. Had to edit the /etc/modprobe.d/unsupported-modules file and set allow_unsupported_modules from 0 to 1. Network now comes up on reboot.

Hi Dan,

thank you for your success report… I really like that piece of hardware, it’s sitting right next to my monitor in front of me :slight_smile:

Just a few comments:

[QUOTE=dbligh;13349]Hi All,

I’m a bit of a Linux newbie, and was installing SLES 11 SP2 on a Shuttle XS35V2 box at home, which has a JMicron(R) JMC250 PCI-E Ethernet Adapter. Out of the box SLES didn’t seem to support it, so I went and grabbed the driver. Two days later and I now have networking. Was a painful process, learned a lot, and figured I’d save some others some time and post the whole process of getting everything running.

Be aware not all these steps are probably necessary, but it’s what I did.[/QUOTE]

Many people run SLES for stability - when installing non-distro pieces, you are definitely leaving that path and will have to watch out in case of future updates. Not that I’d count SLES11 on the XS35 a typical server environment :wink:

[QUOTE]1. Downloaded the latest linux driver from ftp://driver.jmicron.com.tw/Ethernet/Linux/

  • Copy the driver to a USB stick
  1. Update the kernel

What I needed:
kernel-default-3.0.58-0.6.6.1.x86_64.rpm
kernel-default-base-3.0.58-0.6.6.1.x86_64.rpm
kernel-source-3.0.58-0.6.6.1.x86_64.rpm

  • Copy onto USB stick, stick it into the server and it mounts automagically to /Media/
  • Run YaST, Software > Add-On Products (Add) > USB Mass Storage → Select the USB Drive, give it a name etc etc.
  • Search Phrase kernel, and from here upgrade the kernel version, you’ll need to reboot from memory.

Hopefully your server comes back OK. I can feel your cringes from here.

  1. Install kernel source
  • cd to your mounted USB drive. Run following command to install the source
  • rpm -Uvh kernel-source-3.0.58-0.6.6.1.x86_64.rpm[/QUOTE]

As an alternative, you can install those files via "rpm -i " from the command line. IMO, that “add-on products” way is a bit strong here.

[QUOTE]4. Install gcc compiler

  • From YaST > Software Management search and install gcc, you may need a SLES disk handy for this.
  1. Make oldconfig - Maybe someone higher up can comment on what this does, but I had to do it to get everything to run
  • cd /usr/src/linux

  • make oldconfig

  • This will take a while I found, grab a beer in the meantime.[/QUOTE]

There’s a neato documentation in “/usr/src/linux/README.SUSE”, look there for “BUILDING ADDITIONAL (EXTERNAL) MODULES”.

“make oldconfig” takes the settings from an existing kernel configuration file and clones them into your kernel build environment. IMO a call to “make cloneconfig” would be favourable, as that takes the configuration of the currently running kernel as the base (you have the same kernel running as you’re trying to compile, so no additional questions for new options should pop up. This is described in the mentioned README.SUSE, see “HOW TO CONFIGURE THE KERNEL SOURCES”).

A follow-up call to “make scripts; make prepare” will prepare the build environment for further actions, by i.e. creating helpful symlinks and pre-compiling some tools.

[QUOTE]6. Copy your JME Driver to your server and extract

  • cp /media/T/jmebp-1.0.8.5.tar.bz /root/

  • tar -xvf jmebp-1.0.8.5.tar.bz

  1. Modify the Makefile
  • cd /jmebp-1.0.8.5/

  • vi Makefile

  • Find the line
    KSRC ?= /lib/modules/$(KVER)/build

Comment it out, and replace with:
KSRC ?= /usr/src/linux

Save the fine. Exit out.
[/QUOTE]

If your build environment is set up properly (“make prepare”), you needn’t change that line as the required symlink (/lib/modules/$(KVER)/build) is added to your system. And even without that symlink, you might have changed the following call to “make” into

KSRC=/usr/src/linux make install

as that “?=” syntax means “set this value if it is not set already”. And there are other ways to skin this cat, too - I would generally recommend to have a look at the README.SUSE that accompanies each kernel sources RPM for latest information.

The required change to “/etc/modprobe.d/unsupported-modules”, which you mention in your other message, is covered in the README.SUSE, too :wink:

[QUOTE]8. Try and run the make install

  • From the driver directory where the Makefile exists, run:
  • make install

  • When this finishes, try and load the module
  • modprobe jme

  • If this fails due to it being unsupported, run in unsupported mode:
  • modprobe jme --allow-unsupported[/QUOTE]

As your module is a kernel-specific thing, you’ll have to watch out for kernel updates: Those will be installed silently (unless you “lock” the kernel RPM) and after the following reboot, you’re “out of network” again.

Thank you for sharing your experience!

Regards,
Jens

Appreciate the feedback. I assumed that my approach would have steered off the path of best practise, thanks for the tips.

And yes, the Shuttle is a great little machine, I’ve been using Ubuntu desktop on it as a server sitting on the corner of my desk, but figured I’d go for something that is less intensive on memory. Always found SLES less of a black-box to administer so at least now I have a better idea of exactly what it’s doing.

Dan