Search My Techie Guy

Tuesday, May 3, 2016

How to mount USB flash drive on Juniper EX series switches


Am trying to upgrade my juniper EX4200 from JUNOS Base OS Software Suite [12.3R9.4] to 12.3R12.4 in preparation for virtual chassis, Juniper recommends that all switches within the same virtual chassis run the same software version. And because my VC will be a mixture of EX4550/EX4500/EX4200, juniper recommended that i use 12.3R12.4

So i have my software already downloaded and on a flash disk

Problem or Goal:

I need to transfer the software to the switches using a flash drive


You probably have no network connectivity to the switches to do an FTP transfer, or you are working on a new switch.


1. Enter the shell as root:

root> start shell user root

2. Before inserting the USB device, perform the following:

root@:RE:0% ls /dev/da*
/dev/da0        /dev/da0s1c     /dev/da0s2c     /dev/da0s3d     /dev/da0s4c
/dev/da0s1      /dev/da0s2      /dev/da0s3      /dev/da0s3e     /dev/da0s4d
/dev/da0s1a     /dev/da0s2a     /dev/da0s3c     /dev/da0s4

3. Insert the USB drive in the USB port. The following output will be displayed:

root@:RE:0% umass1: Generic Mass Storage, rev 2.00/1.06, addr 3
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <Generic Flash Disk 8.07> Removable Direct Access SCSI-4 device
da1: 40.000MB/s transfers
da1: 7800MB (15974400 512 byte sectors: 255H 63S/T 994C)

root@:RE:0% ls /dev/da*
/dev/da0        /dev/da0s2      /dev/da0s3c     /dev/da0s4c
/dev/da0s1      /dev/da0s2a     /dev/da0s3d     /dev/da0s4d
/dev/da0s1a     /dev/da0s2c     /dev/da0s3e     /dev/da1
/dev/da0s1c     /dev/da0s3      /dev/da0s4      /dev/da1s1

Note: if you compare the "ls /dev/da*" output before inserting the flash drive and after inserting the drive, you will notice these have been added:

/dev/da1 and "/dev/da1s1"

Your USB drive is located here "/dev/da1s1"

4. Create a directory for the USB drive to mount to:

root@:RE:0% mkdir /var/tmp/usb

5. Mount the USB drive to the /var/tmp/usb directory:

root@:RE:0% mount_msdosfs /dev/da1s1 /var/tmp/usb

root@:RE:0% ls /var/tmp/usb

Problem Solved?


6. You can now copy any of the USB files to the /var/tmp directory on the switch:

root@:RE:0% cp /var/tmp/usb/jinstall-ex-4200-12.3R12.4-domestic-signed.tgz /var/tmp

7. Now unmount the USB drive after the file is completely copied:

root@:RE:0% umount /var/tmp/usb

Post a Comment