Format a NI Linux Real-Time Target from the Command Line (Linux Shell)

Updated Jul 1, 2020

Reported In

Operating System

  • NI Linux Real-Time


NI CompactRIO

Issue Details

I have not been able to format my NI Linux Real-Time target using NI Measurement and Automation Explorer (MAX), because MAX crashes or throws an error when attempting a format. Is there a way to format the target from the command line (linux shell)?


Follow the steps below to reformat a NI Linux Real-Time target from the command line (linux shell):
  1. Use NI MAX to enable SSH on the target and save settings.

Note: If for some reason the cRIO does not appear in NI MAX, and you need to format it, step 1 can be done from the Web Configuration.
  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.
  3. After logging in, you are now able to run commands the device.
  • For ARM-Based (32-bit) targets run the following commands
  1. nisystemformat -f -c -t ubifs 
  2. nisystemformat -f -t ubifs
  • For Intel-Based (64-bit) targets run the following commands
  1. nisystemformat -f -t ext4
  2. nisystemformat -f -t ext4 -c