Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX] USB autoinstallation on SRX branch platforms for software upgrade/downgrade



Article ID: KB23882 KB Last Updated: 07 Jul 2016Version: 7.0

This article provides information on how to upgrade or downgrade Junos OS software on SRX branch platforms by using USB autoinstallation.


As the size of the Junos OS image grows, the simple task of image download and image upgrade becomes more challenging. This is particularly more apparent when the image download takes place over a slow WAN link. So, with Junos Release 10.3, a new feature is being introduced for SRX branch platforms that will allow zero-touch installation of software via USB.


The SRX Series USB autoinstall feature simplifies the upgrading of Junos OS images when there is no console access to an SRX device that is located at a remote site. This feature allows you to upgrade the Junos OS image with a  minimum configuration effort by just inserting a USB flash drive into the USB port of the SRX device and performing a few simple steps. This feature can also be used to reformat the boot device and recover the SRX device after boot media corruption.

Before you begin the installation, ensure that the following prerequisites are met:

  • The Junos OS upgrade image and autoinstall.conf files must be copied to the USB device. The instructions on how to copy the image and create the files are provided below. Make sure that adequate space is available on the SRX device to install the software image.

Preparing the autoinstall USB key:

Any USB key, which is formatted with the FAT/FAT32 file systems, can be used for the autoinstall. USB keys from vendors such as Sandisk, Transcend, Unigen, Kingston, and Lexer are recommended for this installation:

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

  2. Right-click the Removable Disk drive that is detected in My Computer.

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

  4. Copy the Junos package to the USB key.

    Note: Only one Junos package should be present for the autoinstall to proceed. Only packages with the junos-srxsme* name are recognized.

  5. Check the drive name that is detected in My Computer for the USB key. Open a command prompt and type echo " " > < drive-name >:\autoinstall.conf. For example, if the detected drive is F:, issue the echo " " > F:\autoinstall.conf command via the command prompt. This will create an autoinstall.conf file on the USB key. When the file is opened in a notepad, you would see the two quotes with a space between them. This file indicates to the system that the USB key is an autoinstall USB key.

    Note: If 'Hide extensions for known file types' is enabled on the system, Windows Explorer creates autoinstall.conf with the .txt extension. So, the above method is recommended.

For more information about preparing the autoinstall USB, refer to the following link:

USB Autoinstallation procedure for Junos software upgrade/downgrade with example console output:

Note: USB autoinstallation is supported only on SRX branch platforms.

  1. Insert the USB flash drive into the USB port of the SRX device and wait for the LEDs to blink amber, indicating that the SRX device detects the Junos OS image. If the LEDs do not turn amber, press the Power button or power-cycle the device and wait for the LEDs to blink in amber.

    root@SRX> umass0: Kingston DataTraveler 2.0, rev 2.00/1.10, addr 2
    da0 at umass-sim0 bus 0 target 0 lun 0
    da0: <Kingston DataTraveler 2.0 PMAP> Removable Direct Access SCSI-0 device
    da0: 40.000MB/s transfers
    da0: 7660MB (15687680 512 byte sectors: 255H 63S/T 976C)
  2. Press the Reset Config button on the SRX device. The LEDs will become solid amber to indicate that the installation is in process.

    Note: If the USB device is plugged in, the Reset Config button always acts as an image upgrade button. Any other functionality of this button is overridden until the USB flash drive is removed.

    Formatting alternate root (/dev/ad0s1a)...
    /dev/ad0s1a: 629.5MB (1289196 sectors) block size 16384, fragment size 2048
    using 4 cylinder groups of 157.38MB, 10072 blks, 20224 inodes.
    super-block backups (for fsck -b #) at: 32, 322336, 644640, 966944
    Extracting /tmp/mnt_usb_dev.54212/junos-srxsme-12.1X44-D45.2-domestic.tgz ...
    Checking compatibility with configuration
    …… (And so on)
  3. Wait for the LEDs to turn green; this indicates that the Junos OS upgrade image has been installed successfully. 

    JUNOS 12.1X44-D45.2 will become active at next reboot
    WARNING: A reboot is required to load this software correctly
    WARNING: Use the 'request system reboot' command
    WARNING: when software installation is complete
    Saving state for rollback ..
  4. Remove the USB flash drive. The SRX Series device automatically restarts and loads the new Junos OS version.

    umass0: at uhub0 port 1 (addr 2) disconnected
    (da0:umass-sim0:0:0:0): lost device
    (da0:umass-sim0:0:0:0): removing device entry
    umass0: detached
    JWaiting (max 60 seconds) for system process `vnlru' to stop...done
    Waiting (max 60 seconds) for system process `vnlru_mem' to stop...done
    Waiting (max 60 seconds) for system process `bufdaemon' to stop...done
    Waiting (max 60 seconds) for system process `syncer' to stop...
    Syncing disks, vnodes remaining...0 0 0 done
  5. syncing disks... All buffers synced.
    Uptime: 28d18h35m5s
    ….. (and so on)


  • If an installation error occurs, the LEDs turn red, which might indicate that the Junos OS image on the USB flash drive is corrupted. An installation error can also occur if the current configuration on the SRX Series device is not compatible with the new Junos OS version on the USB, or not enough space is available on the SRX device to install the image. You must have console access to the SRX device to troubleshoot an installation error.

  • You can use the set system autoinstallation usb disable command to prevent the automatic installation from the USB device. After using this command, if you insert the USB device into the USB port of the SRX device, the installation process will not work.

For more information about installing Junos OS via a USB device on SRX devices, refer to KB16652 - SRX Getting Started - Junos Software Installation/Upgrade.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search