JunOS - mount USB stick

There are times when you have to use a USB stick to copy to or from it files to a Juniper router/switch.
Fortunetly it will not be to very frequently, but there will be a time when you will need it.
JunOS being a UNIX( FreeBSD ) based OS, you have to identify and mount the device attached.
First, you have to check the device name, so you can identify it on /dev:
smocanu@j2350> show log messages | match mass
May 16 15:25:45  j2350 /kernel: umass0: Kingston DataTraveler SE9, rev 2.00/1.00, addr 2
May 16 15:25:46  j2350 /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Then you have to verify the partition number, usually it is the first one:

smocanu@j2350> start shell
% ls -las /dev/da0
/dev/da0 /dev/da0s1
Now you can mount your USB stick:

% mkdir /var/tmp/usb
% mount_msdosfs /dev/da0s1 /var/tmp/usb

Once your USB stick is mounted, you can copy to/from it files, using /var/tmp/usb path.

Do not forget that you have to umount the USB storage, before removing it from your device.

% umount /var/tmp/usb/
% exit

References: KB12880

Comments

Popular posts from this blog

Linux: Versioning the /etc/ configurations using 'etckeeper'

Linux: moving moov atom index to the beginning of the file