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

[MX] How to copy Junos from one RE to aother RE with USB and install



Article ID: KB35791 KB Last Updated: 15 Jun 2020Version: 1.0

How to copy Junos file from one RE to another RE where both are on the same chassis but are unable to communicate with each other due to different Junos versions.


Copying Junos from one RE to aother RE is needed if both are on significantly different JUNOS releases and unable to communicate. In this case, we need to bring both routing engines onto the same Junos release, copy the Junos install file available on one RE, then take it to the other RE with USB.

  1. user@mx10003> start shell user root
    password:     <-- Type the root password.

  2. root@mx10003:~# ls -l /var/tmp/ |grep <junos release e.g. 18.2X75-D20.16>    <-- it will list the file which is there in currently running RE. 

  3. Insert USB stick to the CBRE working one on USB port. The CLI terminal window should show the output below.
    This will help you know the disk_partition for USB as the highlighted one. 

    % ugen0.2: <Unigen Corporation PQS4000B8-JNP> at usbus0
    umass0 on uhub0
    umass0: <Unigen Corporation PQS4000B8-JNP, class 0/0, rev 2.00/11.00, addr 1> on usbus0
    da0 at umass-sim0 bus 0 scbus3 target 0 lun 0
    da0: <Unigen PQS4000 1100> Removable Direct Access SCSI device
    da0: Serial Number UNIGEN-000010275
    da0: 40.000MB/s transfers
    da0: 3824MB (7831552 512 byte sectors)
    da0: quirks=0x2<NO_6_BYTE>
    %  ls /dev/da*
     /dev/da0        /dev/da0p1   <-- [da0p1] is the USB disk_partition name

    For more details, refer to Routing Engines and Storage Media Names (M Series, MX Series, T Series, TX Matrix, TX Matrix Plus, and more) 

  4. dd if=/dev/zero of=/dev/da0p1 bs=64k count=20      <-- USB will be formatted in respective file system
    dd if=</var/tmp/<file_name> of=/dev/da0p1 bs=64k   <-- filename from step 2 and disk_partition from step 3

    You will get the output below from the step above.

    root@mx10003:~# dd if=/dev/zero of=/dev/da0p1 bs=64k count=20
    20+0 records in
    20+0 records out
     20971520 bytes (21 MB) copied, 0.015077 s, 1.4 GB/s
    root@mx10003:~# dd if=/var/tmp/junos-vmhost-install-mx-x86-64-xx.#X##-X##.##.tgz of=/dev/da0p1 bs=64k
    1800+0 records in
    1800+0 records out
    1887436800 bytes (1.9 GB) copied, 1.13771 s, 1.7 GB/s
  5. You can mount the USB here and check if the file is copied but don't forget to un-mount before unplugging.

    root@mx10003:~# mkdir /var/tmp/usb
    root@mx10003:~# mount_msdosfs /dev/da0p1 /var/tmp/usb
    root@mx10003:~# ls -l /var/tmp/usb
    if you get file listed the one copied then move to unmount the USB
    root@mx10003:~# umount /var/tmp/usb

    Here, unplug the USB and plug it into backup RE1.

  6. You will see the USB insert notification (same as STEP 3). Recognize USB partition name is the same as STEP3.
    Next, you need to mount USB in RE1 here from root user start shell.

    user@mx10003> start shell user root
    password:                          <-- Type the root password.
    root@mx10003:~# mkdir /var/tmp/usb
    root@mx10003:~# mount_msdosfs /dev/da0p1 /var/tmp/usb
    root@mx10003:~# ls -l /var/tmp/usb
    root@mx10003:~# cp /var/tmp/usb/junos-vmhost-install-mx-x86-64-xx.#X##-X##.##.tgz /var/tmp/  <-- this will start copying the file from USB to RE1  
    root@mx10003:~# ls -l /var/tmp/ |grep 18.2X75-D20.16   <-- check if file is listed here in /var/tmp
  7. You can install the image with the CLI command below if the above step verified that file is available under /var/tmp/ directory.

    request vmhost software add /var/tmp/junos-vmhost-install-mx-x86-64-xx.#X##-X##.##.tgz no-validate reboot
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