This article explains how to copy a Junos OS file from one Routing Engine (RE) to another Routing Engine where both are on the same chassis but are unable to communicate with each other due to different Junos OS versions.
Copying Junos from one RE to another RE is needed if both are on significantly different Junos OS releases and unable to communicate. In this case, we need to bring both REs onto the same Junos OS release, copy the Junos OS installation file that is available on one RE, and then take it to the other RE by using a USB device.
Perform the following:
user@mx10003> start shell user root password: <-- Type the root password.
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.
Insert the USB device into the working CBRE on the USB port. The CLI terminal window should show the output below.
This will highlight the disk_partition for the USB.
% 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)
dd if=/dev/zero of=/dev/da0p1 bs=64k count=20 <-- USB will be formatted in respective file system. dd if=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
You can mount the USB here and check if the file is copied but do not 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 that you copied above, then unmount the USB.
root@mx10003:~# umount /var/tmp/usb
Here, unplug the USB and plug it into the backup RE1.
You will see the USB insert notification (same as STEP 3). Check that the USB partition name is the same as STEP3.
Next, you need to mount the USB in RE1 here. As 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
You can install the image with the following CLI command if the above step verified that the file is available under the /var/tmp/ directory .
/var/tmp/
request vmhost software add /var/tmp/junos-vmhost-install-mx-x86-64-xx.#X##-X##.##.tgz no-validate reboot