PDA

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



dbligh
30-Apr-2013, 10:08
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

2. Update the kernel
- Had to install the kernel source, and was having trouble finding the source for the pretty old SP2 version I had installed. So downloaded and installed something newer.
- Download from http://download.novell.com/patch/finder/#familyId=7261&productId=36426&dateRange=&startDate=&endDate=&priority=&distribution=&architecture=&keywords=kernel
- E.g. 25 Feb 2013 - Linux kernel 7374 x86-64

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/<stick name>
- 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.

3. 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

4. Install gcc compiler
- From YaST > Software Management search and install gcc, you may need a SLES disk handy for this.

5. 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.

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

7. 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.

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

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

dbligh
30-Apr-2013, 12:54
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.

jmozdzen
30-Apr-2013, 16:50
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 :)

Just a few comments:


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.

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 ;)


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

2. Update the kernel
- Had to install the kernel source, and was having trouble finding the source for the pretty old SP2 version I had installed. So downloaded and installed something newer.
- Download from http://download.novell.com/patch/finder/#familyId=7261&productId=36426&dateRange=&startDate=&endDate=&priority=&distribution=&architecture=&keywords=kernel
- E.g. 25 Feb 2013 - Linux kernel 7374 x86-64

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/<stick name>
- 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.

3. 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

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.


4. Install gcc compiler
- From YaST > Software Management search and install gcc, you may need a SLES disk handy for this.

5. 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.

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.


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

7. 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.


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 ;)


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

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

dbligh
30-Apr-2013, 23:44
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