Formatting an NI Linux Real-Time Target From the Command Line (Linux Shell)

Updated Jan 16, 2025

Environment

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

This article outlines the steps to format an NI Linux Real-Time (RT) from the Command Line (Linux Shell). When you format the disk, you will lose all programs and configuration data on your controller. Make sure you have a backup copy of any files you may need from your controller and make a note of your IP configuration. There is no need to back up any of the driver or run-time files as they will be reinstalled after the format.

Follow the steps below to reformat a NI Linux Real-Time target from the command line (Linux shell):

  1. Use NI MAX to select Enable Secure Shell Server (sshd) on the target and Save settings. In newer Linux Real-Time base images, SSH is enabled by default and the Enable Secure Shell Server (sshd) option will now show up under Startup Settings.

 

  1. Put the target into Safe Mode by checking the Force Safe Mode option in the Startup Settings pictured above or manually using one of the methods mentioned below.
  • For Embedded Devices With DIP Switches:
  1. Move the SAFE-MODE switch to the ON position.
  2. Press the RESET button to restart the device.
  • For Embedded Devices Without DIP Switches:
  1. Hold the RESET button for 5 seconds, then release it.
  2. The Status LED will begin a 3-blink pattern to indicate safe-mode. 
  1. Connect to the shell on the target via SSH using a terminal emulator such as PuTTY. See Accessing the Shell on NI Linux Real-Time Devices for more information.
  2. Login with the admin account associated with the device. When asked for a password, the default option is to leave it blank unless changed during setup.
  3. After logging in, you are now able to run commands on the device depending on the architecture of your Linux RT target. This can be checked in the Real-Time Controllers and Real-Time Operating System Compatibility article. 
For ARM-based (32-bit) targets, 
nisystemformat -f -t ubifs
nisystemformat -f -c -t ubifs
reboot
For Intel-based (64-bit) targets, 
nisystemformat -f -t ext4
nisystemformat -f -t ext4 -c
reboot
  1. After cRIO is rebooted, install the required software by right-clicking Software under cRIO and clicking Add/Remove Software in NI MAX, as shown in this article.
  2. If your RT can't be detected on NI MAX or the SSH connection is not successful, you can run the commands above directly on your target if it has keyboard and monitor capabilities. Check the specifications of your target to confirm this.