During the installing and netbooting of a node, the drivers in the initrd will be used to drive the devices like network cards and IO devices to perform the installing things. But sometimes the drivers for the new devices were not included in the default initrd which shipped by the Redhat or Suse, a work around is to inject the new drivers to the initrd to drive the new device during the installing process.
Generally there are two approaches to patch the new drivers: Driver Update Disk and Drive Rpm package. xCAT supports to load both of the format to drive the devices during the installing and netbooting process.
"Driver Update Disk" is a media which containing the drivers, firmware and related configuration files for certain devices. The "driver update disk" is always supplied by the vendor of device. One "driver update disk" can contain multiple drivers for different os release and different hardware architecture. The Redhat and Suse have different "driver update disk" format.
There are two approaches for xCAT to search the driver disk:
The value for the 'driverupdatesrc' is a comma separated driver disk list. The tag 'dud' must be specified before the full path of 'driver update disk' to specify the type of the file.
chdef -t osimage <osimagename> driverupdatesrc=dud:<full path of driver disk>
If specifying the driver disk location in the osimage, the osimage object must be used to run the 'genimage' and 'nodeset'.
[Diskless]
genimage <osimagename>
[Diskfull]
geninitrd <osimagename>
nodeset <noderange> osimage=<osimagename> --noupdateinitrd
OR:
nodeset <noderange> osimage=<osimagename>
'geninitrd' + 'nodeset --noupdateinitrd' is useful when you need to run nodeset frequently for diskful node. 'geninitrd' only needs be run once to rebuild the initrd and 'nodeset --noupdateinitrd' will not touch the initrd and kernel in the /tftpboot/xcat/osimage/<osimage name>/.
If putting the driver disk in the <installroot>/driverdisk/<os>/<arch>
[Diskless]
Run 'genimage' in anyway will load the driver disk
[Diskfull]
Run 'nodeset <nodenrage> in anyway will load the driver disk
Note: only supported in 2.8 and later.
'Driver RPM Package' is the rpm package which including the drivers, firmware for the specific devices. The 'Driver RPM' can be the rpm package which shipped by the Vendor of device for the new device or the kernel rpm from the Linux distro update.
The Driver RPM packages must be specified in the osimage object.
Three attributes of osimage object can be used to specify the Driver RPM location and Driver names. If you want to load new drivers to initrd, 'netdrivers' attribute must be set. And one or both of the 'driverupdatesrc' and 'osupdatename' must be set. If both of 'driverupdatesrc' and 'osupdatename' are set, the drivers in the 'driverupdatesrc' have higher priority.
The netdrivers attribute must be set to specify the new driver list. If you want to load all the drivers from the driver rpms, using the keyword allupdate. Another keyword for netdrivers attribute is updateonly, it means only the drivers which located in the original initrd will be added to new built initrd from driver rpms. This is useful to reduce the size of new built initrd when distro update is specified since the drivers in new kernel rpm is much more than the number in original initrd.
chdef -t osimage <osimagename> netdrivers=megaraid_sas.ko,igb.ko
chdef -t osimage <osimagename> netdrivers=allupdate
chdef -t osimage <osimagename> netdrivers=updateonly,igb.ko,new.ko
A tag named 'rpm' can be specified before the full path of rpm to specify the file type. For 'Driver RPM' the tag is optional since the default format is 'rpm' if no tag is specified.
chdef -t osimage <osimagename> driverupdatesrc=rpm:<full path of driver disk>,rpm:<full path of driver disk>,<full path of driver disk>
When run geninitrd, 'kernel-*.rpm' will be searched from osdistroupdate.dirpath to get all the rpm packages and then search the drivers from the rpm packages.
mkdef -t osdistroupdate update1 dirpath=/install/rhels6.4/x86_64/
chdef -t osimage <osimagename> osupdatename=update1
If 'osupdatename' is specified, the kernel which shipped with the 'osupdatename' will be used to load the new built initrd, then only the drivers which matching the new kernel will be kept in the new built initrd. If trying to use the 'osupdatename', the 'allupdate' or 'updateonly' should be added in 'netdrivers' attribute, or all the necessary driver names for the new kernel need be added in 'netdrivers' attribute, otherwise the drivers for the new kernel will be missed in new built initrd.
[Diskless]
genimage <osimagename> [--ignorekernelchk]
[Diskfull]
geninitrd <osimagename> [--ignorekernelchk]
nodeset <noderange> osimage=<osimagename> --noupdateinitrd
OR:
nodeset <noderange> osimage=<osimagename> [--ignorekernelchk]
'geninitrd' + 'nodeset --noupdateinitrd' is useful when you need to run nodeset frequently for diskful node. 'geninitrd' only needs be run once to rebuild the initrd and 'nodeset --noupdateinitrd' will not touch the initrd and kernel in the /tftpboot/xcat/osimage/<osimage name>/.
The option '--ignorekernelchk' is used to skip the kernel version checking when injecting drivers from osimage.driverupdatesrc. To use this flag, you should make sure the drivers in driver rpms are usable for target kernel.