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:
- Insert a USB storage device into the PC.
-
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).
-
Insert the USB storage device into one of the USB slots in the router.
-
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.
-
Verify the contents of the USB storage device on the mounting point (/var/tmp/usb
).
root@% pwd
/cf/var/tmp/usb
root@% ls
jinstall-xxxx-xxx.tgz
root@%
-
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.
2020-02-17: Article reviewed for accuracy; no changes required.