SHIFT

--- Sjoerd Hooft's InFormation Technology ---

User Tools

Site Tools


Sidebar

Recently Changed Pages:

View All Pages


View All Tags


LinkedIn




WIKI Disclaimer: As with most other things on the Internet, the content on this wiki is not supported. It was contributed by me and is published “as is”. It has worked for me, and might work for you.
Also note that any view or statement expressed anywhere on this site are strictly mine and not the opinions or views of my employer.


Pages with comments

View All Comments

zenworksdriverdevelopment

ZENworks Driver Development

Introduction

This is an overview of all the trouble you can walk into when you have a nic that's not natively supported by ZENworks. These troubles include compiling a new driver, adding it to the boot source and editing the boot source. This article was written because I had some trouble with the “Marvell Yukon” nics. But… they work now. The article is divided in five parts:

  • Development trees
  • Driver development
  • Adding the driver
  • Loading the driver manually
  • Tips, tricks and resources

Development Trees

If you need to add a driver to the ZENworks imaging files you have to make sure the driver is compiled for the correct kernel. Because the kernel differs between the different ZENworks editions you'll find this table to be handy:

ZENworks editionUsed kernelReleased OSChecked
ZENworks for Desktops 3.02.2.14RedHat 6.2No
ZENworks for Desktops 3.22.4.3Mandrake 8.0No
ZENworks for Desktops 3.2 SP12.4.18RedHat 7.3/8.0 and Mandrake 8.2No
ZENworks for Desktops 4.02.4.18RedHat 7.3/8.0 and Mandrake 8.2No
ZENworks for Desktops 4.0.1 IR62.4.28 No
ZENworks for Desktops 4.0.1 IR72.4.31 No
ZENworks Desktop Management 6.5 SP22.6.5 SuSE Linux No
ZENworks Desktop Management 72.6.5 SuSE LinuxSLES 9 SP2 (some say SP3???) No
ZENworks Desktop Management 7 SP1 IR1 t/m IR3a2.6.16.46-0.12-defaultSLES 10 SP1 or OES 2Yes
ZENworks Desktop Management 7 SP1 IR3a Patch22.6.16.60-0.21-defaultSLES 10 SP2No

Most of this data is from other resources (novell support). If the Checked column says “Yes” it means I've checked the version on both the imaging and the retail version. To check the version the ZENworks imaging environment is using you can boot into maintenance mode and issue this command:

  • uname -r

This will give you an output like:

  • 2.6.16.46-0.12-default

To check if the ZENworks imaging environment already has a driver for your nic boot into maintenance mode and issue one of these commands:

  • modprobe -l |grep <modulename>
  • ls /lib/modules/-default/updates/initrd/

Driver Development

If you need to add a driver because it's not included you need one that is specifically compiled for the kernel you are using. I prefer to do that in an especially created virtual machine which holds nothing except the software needed to compile new drivers. The plus side of this method is that you don't screw up your own linux workstation, and that with vmware server almost anyone can create a virtual machine. There is another method, as described in the documentation (see below), which includes obtaining a source tree of the correct kernel. To obtain the kernel source for this, to compile the driver, go to the download section at Novell.com and search for kernel source. I can't tell you how to compile a driver, because it differs per supplier. However, you need to do in a way that you end up with a driver that has an extension of .ko. If you have that you're done. Most of the suppliers will tell you how to compile the source. In most cases change to the directory which has the source code and type “make”. That will most of the times do the trick.

Adding The Driver

There are several ways to add a driver to the ZENworks imaging environment. This article describes the way to add them to initrd. If you want to use another method, check the documentation below. Be aware that there are minimal differences between how to do this on ZENworks 7 and ZENworks 10. If you need to do this for ZENworks 10 check the documentation below. To modify the initrd file system:

  1. Using a Linux device, create a working directory and change to that directory.
  2. To copy initrd from the PXE server or the boot CD to the new working directory:
    1. For PXE, copy /tftp/boot/initrd to the Linux workstation’s working directory.
    2. For the CD, extract initrd from the /boot/i386/loader directory on the boot CD, then copy the extracted initrd to the Linux workstation’s working directory.
  3. To rename initrd to initrd.gz, enter:
    1. mv initrd initrd.gz
  4. To unzip the initrd.gz file, enter:
    1. gunzip initrd.gz
  5. To create another working directory for use as a mount point in the subsequent steps, enter:
    1. mkdir work
    2. cd work
  6. To extract initrd into the /work directory, enter:
    1. cpio -idmuv < ../initrd
  7. To copy your files or updated driver to the extracted initrd file system, enter:
    1. cp /your_path/module.ko work/lib/modules/2.6.5-override-default/initrd
    2. where your_path is the path to the module.ko file and module is the name of the module.
  8. To re-package the initrd file system, enter:
    1. cd work
    2. find . | cpio -quiet -o -H newc > ../initrd
    3. cd ..
  9. To zip the new initrd file, enter:
    1. gzip -v9c initrd > initrd.gz
  10. To rename initrd.gz back to initrd, enter:
    1. mv initrd.gz initrd
  11. To copy the file back:
    1. For PXE, copy the updated initrd file to the /tftp/boot directory on the PXE server (rename the old file instead of copying the new one over it).
    2. For the CD, copy the updated initrd file to the /boot/i386/loader directory on the boot CD.

Loading The Driver Manually

It could happen that despite the driver is available, it still doesn't load. It doesn't matter if the driver is added or is in the original media, this could happen. If that's the case you can test if manual loading of the driver is possible. If so, the driver is correct, but not recognized correctly. If not, you'll need to compile the correct driver.

Test The Driver

  1. Boot from the latest ZENworks Imaging bootcd, check the updates link below to see what the latest releases are.
  2. At the imaging menu select “Manual mode”.
  3. An error will occur saying that the network module was not loaded, select“OK”. It could also happen that you have to give the ip address of the imaging server. Do so.
  4. This will get you to the bash prompt.
  5. Once at a bash prompt type hwinfo --netcar. If necessary, type hwinfo --netcard | less in case part of the information is missing.
  6. This will give information about the network card in the workstation.
  7. Look for Vendor, Device and Driver, and write these values down.
    1. Example: Vendor: pci 0x11ab “Marvell Technology Group Ltd” and Device: pci 0x436c and Driver: sk98lin
  8. Reboot the workstation and get back to the imaging menu.
  9. Once at the imaging menu select manual and enter an install option, which with the above example would be:
    1. newid=“0x11ab 0x436c,sk98lin”
      1. Make sure quotes are used like in this example and the only space that's used is between the two hex values.
  10. If it works now you can add the newid to the linuxrc.config inside the initrd file:
SLES10SP1ZEN:/tmp/work # cat linuxrc.config
Zen:            2
SetupCmd:       "setctsid `showconsole` /bin/bash -rcfile /bin/bashrc -c zenworks.s"
KernelPCMCIA:   1
UseUSBSCSI:     1
Product:        ZENworks
UpdateDir:      /linux/suse/i386-sles10
MemLoadImage:   60000
MemYast:        20000
MemYastText:    20000
NetSetup=dhcp,all
ScsiRename=0
ScsiBeforeUsb=1
RootImage:      /boot/i386/root
newid="10de 0x03E5,forcedeth"
newid="10de 0x03E6,forcedeth"
newid="10de 0x03EE,forcedeth"
newid="10de 0x03EF,forcedeth"
newid="10de 0x0450,forcedeth"
newid="10de 0x0451,forcedeth"
newid="10de 0x0452,forcedeth"
newid="10de 0x0453,forcedeth"

netsetup=dhcp,all

noshell=1
newid="0x11ab 0x4363,sky2"
newid="0x11ab 0x4364,sky2"
newid="0x14e4 0x167a,tg3"
newid="0x14e4 0x167b,tg3"
newid="0x14e4 0x167c,tg3"
newid="0x14e4 0x1693,tg3"
newid="0x8086 0x104a,e1000"
newid="0x8086 0x104b,e1000"
newid="0x8086 0x104c,e1000"
newid="0x8086 0x1049,e1000"
newid="0x11ab 0x436c,sk98lin"

You can edit this file by following the procedure in Adding the driver as stated above.

Engl Imaging

If you use the engl imaging engine with ZENworks you can't just edit the linuxrc.config inside the initrd file. You need to follow a different method, as stated in ENGL TID 2007020. You need to log in to access this document. Here is a short summary:

  1. Copy the C:\Program Files\ENGL\ImagingToolkit\Zim\ziminst.tar to a working directory on your linux system (/work) and unpack it:
    1. tar xvf ziminst.tar
  2. Copy the SYS:tftp\boot\initrd file to the /work/src
  3. Run the ziminst script
    1. /work/ziminst.pl
  4. Answer all questions with default options or with the correct answers regarding your ZENworks environment, except this question:
    1. Add new hardware ID to linuxrc.config?
    2. Answer with Y
    3. Add this line: newid=“0x11ab 0x436c,sk98lin”
  5. When finished, copy the /work/out/initrd file back to SYS:tftp\boot\initrd

Tips, Tricks and Resources

Loading Existing Drivers

If there is a module that you want to load during the linuxrc processing time, and if linuxrc does not recognize that it needs to be loaded, or you want to specify the load parameters, you can enter a line in the linuxrc.config or /info file. This file then needs to be updated in the initrd file system. Open the configuration file and add the following line:

modprobe="modulename"

or

insmod="modulename"

You might need to load a LAN driver module with specific parameters. You can do this with a line like:

insmod="modulename parm=xxx"

where parm= provides identification of the parameter. This type of line is most commonly used to load a LAN driver with specific parameters, such as full duplex or specific speed.

You could leave a comment if you were logged in.
zenworksdriverdevelopment.txt · Last modified: 2021/09/24 00:25 (external edit)