Offline Installation of NI Linux Device Drivers

Updated Aug 18, 2021

Environment

Driver

  • NI Linux Device Drivers

Operating System

  • Linux

My Linux system is not allowed to connect the internet due to my company/client's privacy/security policy. Are there any methods to install Linux device drivers offline to my computer?  

Currently, the recommended approach for installing NI Linux Device Drivers on an offline system is to create a local copy of the online repositories to removable media, such as a USB driver or DVD. Below are some example procedures tested on RHEL 6 and 7 systems. The overall process should be similar with slight variations on other Linux distributions.

The RHEL offline installation procedure requires two RHEL systems, similar except that one (host) has an internet connection and one (target) does not. The purpose of the host system is to clone the NI repository to a USB drive or DVD media.  Additionally, for the process to work fully offline you must have the official RHEL installation media. This is so that the target system can access RedHat installation packages required by NI software that may not already be present.

 
  1. Install NI-Linux Device Drivers Repo (performed on the host system)
  2. USB Drive/DVD media preparation (performed on the host system).
    • Open a terminal session and elevate to root permissions with the command: "su -".
    • Connect the USB drive to the system , then determine its device identifier in the /dev/ directory (e.g. /dev/sdb1/). Can skip for DVD media to burn after creating a local repo copy.
      • Mount the USB to the system with the command: "mount <USB or DVD device identifier> /mnt/".
    • Install the yum-utils package with the command: "yum install yum-utils". This will allow syncing the NI repository to the media
    • Clone the NI repository to the USB or DVD drive using the command: "reposync --repoid=ni-software-20xx --newest-only --download_path=/mnt/ni". May use alternative download path to later burn to DVD media such as "/home/<user>/ni"
    • Change the current working directory to the directory containing the copied repository with: "cd /mnt/" or "cd /home/<user>/".
    • Issue the command: "createrepo -v ni" and create an iso file of the current directory for burning to DVD if needed. 
      • Any Linux compatible DVD burning software such as 'Brasero' should work for burning the DVD
  3. If not using a DVD, the NI repository has been cloned to the USB drive and we can copy the included file, "ni-media.repo" onto the USB drive.
  4. NI Repository Installation (performed on target system)
    • USB process
      • Open a terminal session and elevate to root permissions with the command: "su -".
      • Connect the USB drive to the system, then determine its device identifier in the /dev/ directory (e.g. /dev/sdb1/).
        • Mount the USB drive to the system with the command: "mount <USB device identifier> /mnt/".
      • Change the current working directory to the USB mount point with: "cd /mnt/".
      • Copy the ni-media.repo file from the USB drive to the appropriate directory containing the targets yum repo files with: "cp -f ni-media.repo /etc/yum.repos.d".
      • Clear the cache with: "yum clean all".
      • Check for new repolist which should now include ni-software-20XX using "sudo yum repolist"
    • DVD process, if unable to create the .repo file in during media preparation:
      •  Move all synced rpm files to a new folder. Use the "mkdir <folderName>" command to create a folder.
      • Create a .repo file in the /etc/yum.repos.d directory using a text editor such as vi: "sudo vi /etc/yum.repos.d/ni-software-20XX.repo"
      • The file should contain the following text (without the indention):
        • [ni]
        • name=ni-software-20XX
        • baseurl=file:///<absolutepathtofiles>
        • enabled=1
        • gpgcheck=0
      • Check for new repolist which should now include ni-software-20XX: "sudo yum repolist"
 

At this point, you will need to insert the RHEL installation media to the system, in order to access native dependencies of NI's drivers. Once the installation media is inserted, you can install the desired NI driver through yum, e.g. NI-DAQmx: "yum install ni-daqmx"
 
Note: If any dependency rpm files are missing and RHEL media is unavailable, it is also possible to cache additional rpm files from the online RHEL system using the same process for each repository.