Support Support Downloads Knowledge Base Juniper Support Portal 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

[MX] How to copy Junos software from USB to internal memory for upgrading or troubleshooting



Article ID: KB26830 KB Last Updated: 17 Feb 2020Version: 3.0

This article shows how to copy Junos software from a USB storage device to a router's internal flash memory when upgrading or troubleshooting.



Using USB storage in routers when upgrading Junos OS software or troubleshooting boot issues



To copy a Junos software installation package (for example, jinstall-xxxx-xxx.tgz) from USB storage to internal flash memory, perform the following steps:

  1. Insert a USB storage device into the PC.
  2. Copy a Junos software installation package (for example, jinstall-xxxx-xxx.tgz) from the PC to the USB storage device (the USB storage device must be formatted as FAT16 or FAT32).

  3. Insert the USB storage device into one of the USB slots in the router.

  4. Issue the following commands in shell mode (root privilege is required):

root@% mkdir /var/tmp/usb (any directory name can be used as mounted directory)
root@% mount -t msdos /dev/ad[N]s1 /var/tmp/usb
### [N] is discussed later.
  1. Verify the contents of the USB storage device on the mounting point (/var/tmp/usb).

root@% pwd
root@% ls
  1. Copy the file from the USB storage device to internal flash.

root@% cp /var/tmp/usb/jinstall-xxxx-xxx.tgz /root/.

Or it is possible to upgrade the Junos software from the USB storage device directly:

root> request system software add /var/tmp/usb/jinstall-xxxx-xxx.tgz <options...>

In order to recognize device name in routers:

When a USB storage device is inserted into a USB slot, the system shows information related to the inserted device on the console, which can be verified by using the dmesg command.

For example, in the following message displayed by the system, the device name is /dev/ad2s1:

root@% umass1: SanDisk MobileMate Micro, rev 2.00/94.07, addr 4
ad2 at umass-sim1 bus 1 target 0 lun 0
ad2: <Generic STORAGE DEVICE 9407> Removable Direct Access SCSI-0 device
ad2: 40.000MB/s transfers
ad2: 982MB (2012160 512 byte sectors: 64H 32S/T 982C)

Note that the device name is not related to the used slot or module number. It is considered that the number of the device, such as ad1 and ad2, increments as the device is mounted.

But the beginning number of the device differs depending on the platform used. It is highly recommended to confirm the number of the device every time a new device is inserted. You can look up the number of a device based on the model you have by referring to Routing Engines and Storage Media Names.


Modification History:

2020-02-17: Article reviewed for accuracy; no changes required.


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