Support Support Downloads Knowledge Base Service Request Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[Junos] How to mount a USB drive on the EX/J/SRX/MX series platforms

0

0

Article ID: KB12880 KB Last Updated: 30 Nov 2019Version: 8.0
Summary:

This article explains how to mount a USB drive on an EX/J/SRX/MX series device and copy files to or from the device via the USB drive.

Solution:

The following procedure allow users to mount a USB device on EX/J/SRX/MX devices.  This can be helpful if network connectivity is unavailable and you need to copy files to or from the device.

  1. Enter the shell as root:
    user@switch> start shell user root
    Password:
    root@switch% 
    

  2. Before inserting the USB device, perform the following:
    root@% ls /dev/da*
    /dev/da0 /dev/da0s1c /dev/da0s2a /dev/da0s3 /dev/da0s3e
    /dev/da0s1 /dev/da0s1f /dev/da0s2c /dev/da0s3c
    /dev/da0s1a /dev/da0s2 /dev/da0s2f /dev/da0s3d
    

  3. Insert the USB drive in the USB port. The following output will be displayed:
    root@% umass1: TOSHIBA TransMemory, rev 2.00/1.00, addr 3
    da2 at umass-sim1 bus 1 target 0 lun 0
    da2: <TOSHIBA TransMemory 5.00> Removable Direct Access SCSI-0 device 
    da2: 40.000MB/s transfers
    da2: 983MB (2013184 512 byte sectors: 64H 32S/T 983C)
    
    root@% ls /dev/da*
    /dev/da0 /dev/da0s1c /dev/da0s2a /dev/da0s3 /dev/da0s3e
    /dev/da0s1 /dev/da0s1f /dev/da0s2c /dev/da0s3c /dev/da2
    /dev/da0s1a /dev/da0s2 /dev/da0s2f /dev/da0s3d /dev/da2s1
    
    Note: '/dev/da2s1' is the USB drive.

  4. Create a directory for the USB drive to mount to:
    root@% mkdir /var/tmp/usb

  5. Mount the USB drive to the /var/tmp/usb directory:
    root@% mount_msdosfs /dev/da2s1 /var/tmp/usb
    root@% ls /var/tmp/usb
    images.tgz
    
    Note: 'ls /var/tmp/usb' will show all the files in the USB drive. ‚Äč
     
  6. Copy any of the USB files to the /var/tmp/usb directory:
    root@% cp /var/tmp/usb/images.tgz /var/tmp
    root@% ls /var/tmp
    images.tgz
    The images.tgz file from the USB is successfully copied to the /var/tmp directory.

  7. Now unmount the USB drive after the file is completely copied:
    root@% umount /var/tmp/usb
    root@% umass1: at uhub0 port 1 (addr 3) disconnected
    (da1:umass-sim1:1:0:0): lost device
    (da1:umass-sim1:1:0:0): removing device entry
    umass1: detached
    

    Note:  ‚ÄčEnsure that the USB devices are unmounted properly before removing them from the router. For devices with multiple USBs, make sure that you unmount both devices.

Modification History:

2019-11-30: Added related PRs.
2017-12-1: Added note to step 7 regarding devices with multiple USBs.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Security Alerts and Vulnerabilities

Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search