Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Installing Software on NFX Devices Using USB Autoinstallation

The USB autoinstallation feature simplifies Junos OS image upgrade when there is no console access to the NFX device. This feature allows you to upgrade the Junos OS image by inserting a USB flash drive with the image and configuration into the USB port of the NFX device. To install software on an NFX series device using the USB autoinstallation you must:

  1. Enable Junos OS configuration
  2. Insert a USB flash drive with Junos OS image and configuration files
  3. Enable the configuration to autoinstall the image from the USB.
  4. Reboot after installation.

Preparing the USB

You need to prepare the USB for automatic installation, so that the USB is recognized and works properly.

Precautions

Consider the following precautions before preparing the USB:

  • Make sure /var/public/ has at least 3.5 GB to 4 GB of empty space before attempting usb-auto-install.

  • Verify any staged installation using show vmhost version command. usb-auto-install fails to install image if an installation is staged already. To cancel any staged installation, run request vmhost software rollback command.

  • If the USB is already plugged in, unplug and re-insert the USB to trigger the autoinstallation.

  • NFX350 device has 2 USB host or slot. If the device contains any invalid USB (not configured for usb-auto-install), the other USB slot can be used for usb-auto-install.

  • If one connected USB is valid but inactive (not configured for usb-auto-install), you can configure if configuration is disabled and use other slot to trigger auto-install without disturbing the first USB.

  • If one USB has already triggered usb-auto-install and the installation is in progress, you must wait until the installation is complete. Insert the other USB only after the installation is complete. Avoid inserting the second USB to protect the USB and the image inside it from getting corrupted due to improper mount/unmount.

Preparing the USB

  1. Format the USB with FAT/FAT32

    • On Windows PC or laptop:

      1. Plug-in the USB key to a Windows PC or a laptop.

      2. From My Computer right-click the Removable Disk drive.

      3. Format the drive with the FAT/FAT32 file system.

      4. Copy the Junos OS package to the USB key.

    • On Macintosh PC or laptop

      1. Insert the USB to be formatted to a Mac PC.

      2. Navigate to Applications > Utilities. Double-click to open disk utility.

      3. Select the drive you want to format. Click Erase.

      4. Rename the USB drive (optional) and choose the MS-DOS(FAT) to format.

      5. Select Master Boot Record for scheme, select Erase to erase USB drive.

        Once the process is complete, the USB drive is ready to reuse with a FAT32 file system to save data.

    • On NFX series device or on any Juniper device running Linux:

      1. Run lsblk to find the dev node or partition of the USB, possibly sdb/sdc.

      2. Format the partition (sdb1/sdc1)

      3. If you are not successful, try the following command.

        Note:

        You can format the partition of the USB, that is, sdb1/sdc1. Do not format sdb/sdc.

  2. Copy the file to USB

    • To copy the file from laptop:

      • Copy and paste the files manually if you have a GUI (Windows/Mac OS/Linux).

      • Else, open a command prompt and type cp <pkg> <drive-name>:\. For example, if the detected drive is F, type cp <pkg> F:\

    • To copy file from an NFX device or any Juniper device running Linux:

      • Mount the dev node to any path and copy the following:

    Note:

    This feature works with only CLI packaged images ( jinstall--***-secure-signed.tgz). The images specifically built for USB (install**usb**.tgz) does not work with this feature.

  3. Creating the conf file

    • To create the conf file using GUI:
      1. Open the USB partition. Right-click and create an empty file.

      2. Save the file with the name usb-auto.conf. Ensure to use the right name and extension.

      3. Else, open a command prompt and type echo " " > <drive-name>:\usb-auto.conf

        For example, if the detected drive is F, type echo " " > F:\usb-auto.conf.

    • To create the conf file using an NFX device or any Juniper device running Linux:
      1. Mount the USB

      2. Edit /var/public/tomount/usb-auto.conf

Note:

After copying a package and creating a conf file, make sure to unmount the USB before removing it using unmount /var/public/tomount.

Configuring the NFX Device

After preparing the USB device, you need to configure the NFX device.

  1. Ensure usb-pass-through is not enabled.

    • Run show system services usb-pass-through command. Ensure that the output displays usb-pass-through is disabled.

    • If usb-pass-through is enabled, then disable it by removing the configuration.

      Run delete system services usb-pass-through command to remove the configuration.

    • Reboot the device once usb-pass-through is disabled.

  2. Enable usb-auto-install configuration

    • Configure usb-auto-install.

    • Verify usb-auto-install is enabled.

Installing the Image

Once the configuration is applied, the USB and the device are ready for autoinstallation. Following are the steps to install the image on an NFX device.

  1. Insert the USB in the USB slot of the device. Wait for at least 5 minutes till the image is copied to the device. You can now remove the USB.

  2. Wait for 10 more minutes and observe the LED’s. Initially, all LEDs must be up. After the installation is complete and the device reboots, the SYS LED starts to blink green and other LEDs go down. This LED status indicates that the installation is successful and the device is rebooting.

    When all the LEDs are up, it indicates that the bootup is done and the device is ready with new image.

    Note:

    • If the LEDs do not change even after 20 minutes, it indicates that the installation has failed.
    • SYS LED turns red if there are any issues during bootup. This indicates that the installation is successful but the bootup after the installation is a failure.

Disabling Autoinstallation

After installation, we recommend disabling usb-auto-install to avoid reinstallation or to avoid unintentional upgrade through usb-auto-install. To delete the usb-auto-install: