Sunday 17 July 2016

How to copy from USB to internal memory for upgrading or troubleshooting

To copy a Junos software installation package (e.g., jinstall-xxxx-xxx.tgz) from USB storage to internal flash memory, follow these steps:
1. Insert a USB storage into the PC.

2. Copy a Junos software installation package (e.g., "jinstall-xxxx-xxx.tgz") from the PC to USB storage (USB storage must be formatted in FAT16 or FAT32).

3. Insert the USB storage into one of USB slot(s) in the router.

4. Issue the following commands in shell mode (the 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.


5. Verify the contents of the USB storage in the mounting point (/var/tmp/usb).

   root@% pwd
   /cf/var/tmp/usb
   root@% ls
   jinstall-xxxx-xxx.tgz
   root@%


6. Copy the file from USB storage to internal flash.

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

Or it's possible to upgrade the Junos software from the USB storage directly:

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


In order to recognize device name in the routers:

When a USB storage is inserted in a USB slot, the system shows the information of the inserted device name on the console or can be verified using the "dmesg" command.

For example, when the system displays the following message, the device name is "/dev/ad2s1" in this case:

    -----------------------------------------------------
    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.
loading...