Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 553 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 560 Notice: Undefined property: stdClass::$theme in /var/www/html/drupal-5.5/includes/theme.inc on line 45 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 553 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 560 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 553 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 560 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 553 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 560 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 553 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 560 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 553 Notice: Undefined offset: 8192 in /var/www/html/drupal-5.5/includes/common.inc on line 560 NVIDIA driver automation | Open Source Experts

NVIDIA driver automation

My current project calls for 300+ RHEL 5 Workstations with NVIDIA Quadro GPUs. Unfortunately, the open source nouveau driver doesn't support the specific graphics card. The client did not want to manually recompile a third-party driver every time the kernel was updated. My solution was to wrap the native NVIDIA installer in a RPM with post and triggerin scripts.

Here is the SPEC file:

Summary: NVIDIA Driver for RHEL 5 Workstations
Name: RHEL-5-WRKST-NVIDIA
Version: 270.41.06
Release: 8
License: NVIDIA
Group: Applications/System
Source: ftp://download.nvidia.com/XFree86/Linux-x86_64/
Packager: Steve Kohrs
Requires: kernel-devel kernel-headers binutils gcc

%description
NVIDIA driver for RHEL 5 Workstations, packaged to automatically rebuild
itself after a kernel upgrade.

%files
%attr(0700, root, root) /usr/local/sbin/NVIDIA-Linux-x86_64-270.41.06.run
/usr/src/redhat/SPECS/RHEL-5-WRKST-NVIDIA.spec

%post
/usr/local/sbin/NVIDIA-Linux-x86_64-270.41.06.run -i >/dev/null 2>&1
if [ $? != 0 ]; then
  /usr/local/sbin/NVIDIA-Linux-x86_64-270.41.06.run --silent --no-network >/dev/null 2>&1
fi
exit 0

%triggerin -- kernel-devel
/bin/logger "NVIDIA Triggerin executed for `ls -1tr /lib/modules | tail -1`"
/usr/local/sbin/NVIDIA-Linux-x86_64-270.41.06.run --silent --no-network --kernel-name=`ls -1tr /lib/modules | tail -1` --kernel-module-only --no-x-check >/dev/null 2>&1
exit 0

%changelog
...

Here are some of the key features:

  • The post script handles the initial installation, via a kickstart, so we immediately have a fully functional display.
  • The triggerin script builds and installs a new version of the driver for any new kernel that is installed. Since the installer depends on kernel-devel, the trigger is based on this package.
  • Key NVIDIA installer parameters are as follows:
    --kernel-name, --kernel-module-only --no-x-check

    Learn more by reading about the Advanced installer options:

    NVIDIA-Linux-x86_64-270.41.06.run -A

By using this method, the client is able to avoid outages associated with system patching.

NOTE: This deviates from RPM best practices, by not accounting for all the files installed by the NVIDIA installer.

 

Copyright © 2002-2011 Open Source Experts all rights reserved.
Please send comments to webmaster@opensourceexperts.com.
Questions? Call 402.598.0630

A SiLK Enterprises, Inc. company.