/ts_tma_tma-documentation_maintenance-documents_ni-linux-rt-installation

This repo contains the steps to install NI Linux RT on a non-NI target (e.g. desktop PC). Repo from GitLab, original is here: https://gitlab.tekniker.es/publico/3151-lsst/documentation/maintenancedocuments/ni-linux-rt-installation

NI Linux RT Installation

Generate NI Linux RT USB

  • Open the NI MAX

    Generate NI Linux RT USB

  • Select the image to flash to the USB.

    DiskFlashUtility

    For using LV 2020, that uses the recovery image 8.0, the maximum allowed intel generation, in DELL computers, is the 10th generation. This recovery version 8.0 is not compatible with newer intel versions, tested only in DELL machines. If a DELL computer with higher intel chip is used the LV image for 2023 Q1 must be used (23.0), this is compatible with LV 2020 as well.

BIOS Config

For installing the recovery image the BIOS must be set accordingly:

  • Boot mode set to UEFI

  • Disable secure BOOT

  • Disable RAID for better compatibility and ensure hard drive detection

    BIOS Storage Configuration

After using the USB

Install real time packages from the NI MAX.

  • Install RT image

    Step 1

  • Select programming environment

    Step 2

  • Install required packages

    Step 3

  • Set SSH password

    Step 4

After installation to set as PXI

Define the system as a PXI.

  • Log into the machine and type the following commands

    • Set as PXI

      grub-editenv - set TargetClass=PXI
      grub-editenv - set DeviceCode=0x77E1
      grub-editenv - set NITarget=true
    • Define desired device description

      grub-editenv - set DeviceDesc=PXIe-8880_Dell
    • Define desired host name

      grub-editenv - set hostname=ats_AXES-PXI
    • Reboot to apply the changes

  • Check the settled configuration command

    fw_printenv
  • Example configuration

    admin@NI-cRIO-903x-VM-e50e7166:~# grub-editenv - set TargetClass=PXI
    admin@NI-cRIO-903x-VM-e50e7166:~# grub-editenv - set DeviceCode=0x77E1
    admin@NI-cRIO-903x-VM-e50e7166:~# grub-editenv - set DeviceDesc=PXIe-8880_Dell
    admin@NI-cRIO-903x-VM-e50e7166:~# grub-editenv - set hostname=ats_TMA-PXI
    admin@NI-cRIO-903x-VM-e50e7166:~# grub-editenv - set NITarget=true
    admin@NI-cRIO-903x-VM-e50e7166:~# fw_printenv
    serial#=e50e7166
    DeviceCode=0x77E1
    DeviceDesc=PXIe-8880_Dell
    TargetClass=PXI
    BIOSBootMode=efi
    NITarget=true
    primaryethaddr=CC96E50E7166
    hostname=ats_TMA-PXI
    safemodeenabled=False
    admin@NI-cRIO-903x-VM-e50e7166:~# reboot

    after the reboot

    admin@ats_TMA-PXI:~# fw_printenv
    serial#=e50e7166
    DeviceCode=0x77E1
    DeviceDesc=PXIe-8880_Dell
    TargetClass=PXI
    BIOSBootMode=efi
    NITarget=true
    primaryethaddr=CC96E50E7166
    hostname=ats_TMA-PXI
    safemodeenabled=False

Discover the target from the LV project

After setting the target as a PXI, the new target appears as a PXI target in the project and the NI MAX.

Graphical user interface, text, application Description automatically generated

After installation to set as cRIO

Define the system as a cRIO.

  • Log into the machine and type the following commands
    • Set as PXI

      grub-editenv - set TargetClass=cRIO
      grub-editenv - set DeviceCode=0x7735
    • Define desired device description

      grub-editenv - set DeviceDesc=cRIO-903x-VM
    • Define desired host name

      grub-editenv - set hostname=name
    • Reboot to apply the changes

Installation on a Virtual Box VM

Creating a Virtual Machine for NI Linux RT

  • Choose Linux as Type and Ubuntu (64-bit) as version

    Graphical user interface, application Description automatically generated

  • Choose 1024 or 2048 as your memory size (this can be changed later if needed)

    Graphical user interface, text, application Description automatically generated

  • Choose to create a virtual hard drive (at least 4 GB)

    Graphical user interface, text, application Description automatically generated

  • Choose VDI as your hard disk type

    Graphical user interface, text, application, email Description automatically generated

  • Choose Dynamically allocated as how the data is stored (both options will work, this takes less space on your host system)

    Graphical user interface, text, application, email Description automatically generated

  • Once the virtual machine has been created, copy the image from C:\\Program Files (x86)\\National Instruments\\RT Images\\Utilities\\Linux RT PXI Safemode\\8.0 called standard_x64_recovery.iso to your virtualbox workspace (this is strictly not necessary, however I prefer to do this in case the image get corrupted during the install process, we have a backup and don't have to reinstall the LabVIEW Real Time Module) Graphical user interface, application Description automatically generated

Configuring the Virtual Machine

  • Select your virtual machine (NILRT in my case) and click on the settings gear

  • Go to settings -> system -> Motherboard and check the box "Enable EFI (Special OSes only)

    Graphical user interface, text, application, email Description automatically generated

  • Go to Settings -> Storage and select the optical storage device

    Graphical user interface, application Description automatically generated

  • Click the options menu of the optical drive in the top right corner (little blue "wheel") and select the option "Choose a disk file"

    Graphical user interface, text, application Description automatically generated

  • Navigate to where you have stored your NILRT recovery iso file and select it

    Graphical user interface, application Description automatically generated with medium confidence Graphical user interface, application Description automatically generated

  • Go to network and in the adapter 1 tab, select the Enable Network Adapter checkbox (usually selected by default)

  • Choose Attached to: Bridged Adapter and select your main network card as the Name

    Graphical user interface, text, application, email Description automatically generated

  • Expand the advanced menu and select the Intel PRO/1000 MT Desktop as your Adapter type (usually the default one. NI ships most of their controllers with Intel based hardware)

    Graphical user interface, text, application, email Description automatically generated

  • Select the settings -> Serial Ports -> Port 1 tab

  • Check the box Enable Serial Port

    • This is needed for one of the hardware authentication steps in the NILRT installer and will fail if not enabled

    Graphical user interface, text, application Description automatically generated

  • Select USB 3.0 as your USB controller (USB keyboards and other USB based peripherals will not work unless you do this)

    Graphical user interface, text, application Description automatically generated

Installing NILRT from the ISO

  • DoubleClick or hit the start arrow to run the machine

    Graphical user interface, application Description automatically generated

  • Select the ISO as your startup drive/disk

    Graphical user interface, application, Word Description automatically generated

  • choose "y" (yes) when the installer prompts you if you want to continue

    Graphical user interface, text Description automatically generated

If you are using a USB based keyboard, the installer might refuse to take any keyboard inputs at this step. If this happens, right click the USB icon in the down right corner of your NILRT virtual machine window and select your keyboard. This is only needed during the installation and can be unchecked on the next reboot (once the system is installed)

Graphical user interface, text, application Description automatically generated

  • When the process finishes, it will ask you to restart the machine:

    Restart request

  • After restarting you'll get the following screen:

    NI Linux RT welcome screen

  • That's it, the system should now be discoverable from MAX and you can install all drivers from there.

If the system is discoverable but you're not allowed to install, it might be because the network configuration in virtualbox is not correct.

  • From NI MAX -> Remote systems -> Your remote device -> Open the device submenu clicking on the arrow -> Right click on Software -> Click on Add/Remove Software

    Graphical user interface, text, application Description automatically generated

  • If the credentials screen opens, the default user is "admin" and leave password empty. Click enter to proceed to the following screen

    Graphical user interface, text, application, Word, email Description automatically generated

  • Select the OS to install:

    Graphical user interface, text, application Description automatically generated

  • Wait for this to finish and restart

    Graphical user interface, text, application, Word Description automatically generated Graphical user interface, text, application Description automatically generated

  • Selected software to install by default:

    • CompactRIO Support.
    • LabVIEW Real-Time.
    • NI Web-Based Configuration and Monitoring
    • NI Wireless Certificate Management Web Service
    • NI-VISA

    Graphical user interface, text Description automatically generated with medium confidence Graphical user interface, text, application Description automatically generated Graphical user interface, text Description automatically generated Graphical user interface, text Description automatically generated Welcome screen Graphical user interface, text, application, chat or text message Description automatically generated

  • Done, a cRIO system is installed in a VM, to change the system to be a PXI, go to this section