[MX] How to copy Junos software from USB to internal memory for upgrading or troubleshooting
[MX]How to copy Junos software from USB to internal memory for upgrading or troubleshooting.
This article shows how to copy Junos software from a USB storage device to a router's internal flash memory when upgrading or troubleshooting.
Symptoms
Using USB storage in routers when upgrading Junos OS software or troubleshooting boot issues
Solution
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@% ls /var/tmp/usb
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)
-----------------------------------------------------