Linux Driver Injection to Ramdisk ISO, X2P Driver Package and Source Take Control Package Creation Instructions

  • 7005990
  • 17-May-2010
  • 26-Jun-2018

Environment

PlateSpin Migrate
PlateSpin Protect
PlateSpin Forge

Linux Drivers are in the following format,
For kernel 2.6 and later, .ko files

The following supported distributions are recommended for the ISO disk build environment:

RHEL 7
CentOS 7

Note: Other distributions may also be used to build the Linux boot ISO. These two distributions are supported for usage with PlateSpin. Other distributions such has Ubuntu 14.14.01 may be used the build the boot ISO, but aren't supported.  Not all versions of genisoimage 1.1.11 provide the features to build a Linux loot ISO.


Situation

This article provides instructions on how to inject Linux drivers into linux boot ISO file, source take control package and X2P driver manager.

 

Resolution

Ramdisk Driver Injection Procedure
 
Drivers must be created for the appropriate boot ISO kernel.
 
Linux boot ISO kernels:
 
Forge 11.0, Forge 11.0.1, Forge 11.1, Forge 11.2, Forge 11.2.1, Forge 11.3: SLES 11 SP3 -> 3.0.93-0.8-default
Protect 11.0, Protect 11.0.1, Protect 11.1, Protect 11.2, Protect 11.2.1, Protect 11.3: SLES 11 SP3 -> 3.0.93-0.8-default
Migrate 11.0, 11.1, 12.0, 12.1,12.2.1: SLES 11 SP3 -> 3.0.93-0.8-default
Migrate 12.2, 12.2.1, 12.2.2: SLES 11 SP4 -> 3.1.101-63-default
Migrate 12.2.2: SLES 12 SP3 -> 4.4.73-5-default

 

1. Upload bootofxx2p.iso to any Linux machine, for example, to /root/platespin/bootofxx2p.iso.
2. Upload drivers (.ko files) to be injected to /root/platespin/drivers.
3. Logon to the Linux machine using root account and switch to /root/platespin/.
4. Execute: mkdir -p /mnt/platespin.
5. Execute: mount -o loop bootofxx2p.iso /mnt/platespin.
6. Execute: cp /mnt/platespin/tools/rebuildiso.sh
7. Execute:

For PlateSpin 11 and above use the follow commands:

  ./rebuildiso.sh -i bootofxx2p.iso -d <driver_dir> -m32 (If drivers are of 32-bit)
  ./rebuildiso.sh -i bootofxx2p.iso -d <driver_dir> -m64 (If drivers are of 64-bit)

For PlateSpin 12.2.2 (bootofx.x2p.iso) use the following command for SLES 12 SP3

      ./rebuildiso.sh –i bootofx.x2p.iso -d <driver_dir>

For PlateSpin 12.2.2 (bootofx.x2p.sles11sp4.iso) use the following command for SLES 11 SP4

  ./rebuildiso.sh -i bootofx.x2p.sles11sp4.iso -d <driver_dir> -m32 (If drivers are of 32-bit)
  ./rebuildiso.sh -i bootofx.x2p.sles11sp4.iso -d <driver_dir> -m64 (If drivers are of 64-bit)

8. bootofxx2p.iso will be updated and is ready to put to test.

Note: "bootofxx2p.iso" may be "LinuxPhysicalTarget.iso".  These names are interchangeable.

Driver Packaging for Source TakeControl
 
1. Open the ISO file in which drivers were injected to (using MagicISO for example). Copy "initrd.gz" and "vmlinuz" out from "\i586".
2. Backup 1.package file under ".\Platespin Portability Suite Server\Packages\740C1DE0-76EC-4939-8075-8C71F6C6FCAF".
3. Rename the above package file to 1.zip and open using WinZip. Replace the two files (initrd.gz and vmlinuz) with the two from step 1.
4. Remove 740C1DE0-76EC-4939-8075-8C71F6C6FCAF folder from the package cache under ".\Platespin Portability Suite
Server\Controller\Packages\0\740c1de0-76ec-4939-8075-8c71f6c6fcaf".
5. The correct drivers for take control of source machine will be applied when conversion is run next time.
 

Driver Packaging for X2P Driver Database


Note: A Linux driver ties to a specific Linux kernel version. Therefore, in order to inject drivers into X2P Driver Database for a specific kernel version, all drivers must be valid for such kernel version. And the drivers injected will work with this specific kernel version only.


1. Find a Linux machine that has the same kernel version as the source machine. Source machine itself is one of the best choices.
2. Upload bootofxx2p.iso to the Linux machine, for example, /root/platespin/bootofxx2p.iso.
3. Upload to the Linux machine the driver (.ko file) to be injected to X2P Driver Database , for example, /root/platespin/drivers.
4. Logon to the Linux machine and switch to /root/platespin.
5. Execute: mkdir -p /mnt/platespin.
6. Execute: mount -o loop bootofxx2p.iso /mnt/platespin.
7. Execute: cp /mnt/platespin/tools/PackageModules.tar.gz ./
8. Execute: tar xvfz PackageModules.tar.gz.
9. Execute: ./PackageModules.sh -d drivers -o <package name>. Recommended package name format: DriverName-DriverVersion-Dist-KernelVersion-Arch.pkg. For example, bnx2x-1.48.107-RHEL4-2.6.9.11.EL-i686.pkg.
10. The newly generated .pkg file is ready to be injected into the X2P Driver Database.

Additional Information

You may encounter an error "The problem is that in architecture is missing from the package". The problem indicates that the version.xml file within the package does not include the architecture type of the drivers. I f you encounter the this error while adding the driver, then follow the steps below to resolve the issue.

 

Solution

 

Each built package can be extracted by a zip utility. When you extract the contents, you will see an XML file named "version.xml". with linux kernel version in it.  Edit the filename to include the architecture as well. In above example, change it to "2.6.5-7.244-bigsmp x86.xml" (by adding x86 for architecture). Here are the steps to be taken:

 

1. Rename the .pkg file to .zip and extract the contents.

2. Edit file named "version.xml" and locate the line which shows the linux kernel version. It should read like "<kernel version> <architecture>.xml" but in this case, will only have the kernel version part.  

3. Modify this xml file and append either " x86" (for 32bit) or " x86_64" (for 64bit) to the end of the line. In above example, after correcting the line, it will read as "2.6.5-7.244-bigsmp x86".

4. Compress all extracted contents to a zip file and rename it to ".pkg".

5. Upload this file in X2P driver manager.