How to load Firmware in Juniper Router Switch and Firewalls from USB
I am going to explain how to load Junos in Juniper Router Switch and Firewalls from USB drive. Before going to steps to load the Junos in Devices, there are some prerequisite which are to be prepared.
Prerequisite for the software image installation
- USB stick of 1 GB free space. ( Format the USB stick before copying the software image into USB)
- Console cable.
- Recommended JUNOS. Down load the recommended JUNOS for the device.
Now, Refer the following steps for performing the software loading or up-gradation via CLI from a USB stick on JunOS Platform and the devices must be accessed with console.
- Save the Junos file in USB.
- Login to Devices with root user.
- Insert the USB device into USB slot.
- Verify the usb drive-label. Verifying process for the drive-label as below: After logging to the device run FreeBSD shell command ls /dev/da* . It shows internal and external drives installed into the devices. When the USB device is inserted into the device, it seems as /dev/da…..
The command ls /dev/da* give following output in FreeBSD shell
|Before inserting the USB drive in device following output comes root@host_name% ls /dev/da*/dev/da0 /dev/da0s1c /dev/da0s2c /dev/da0s3e /dev/da0s4a /dev/da0s1 /dev/da0s2 /dev/da0s3 /dev/da0s3f /dev/da0s4c /dev/da0s1a /dev/da0s2a /dev/da0s3c /dev/da0s4 /dev/da0s4e After inserting the USB drive in device, following output comes where white shaded is the USB drive root@host_name% ls /dev/da* /dev/da0 /dev/da0s1c /dev/da0s2c /dev/da0s3e /dev/da0s4a /dev/da1 /dev/da0s1 /dev/da0s2 /dev/da0s3 /dev/da0s3f /dev/da0s4c /dev/da1s1 /dev/da0s1a /dev/da0s2a /dev/da0s3c /dev/da0s4 /dev/da0s4e|
5. Create a USB stick mount directory
% mkdir /tmp/usb
6. Mount the USB stick to the directory:
% mount -t msdosfs /dev/<drivelabel> /tmp/usb
% mount -t msdosfs /dev/da1s1 /tmp/usb
7. Verifying the JUNOS file in USB using command ls /usb . It shows the saved Junos file in USB stick.
Now, Junos can be loaded /upgraded directly from either USB drive or device itself. To load Junos from intenal device itself, Junos package should be copied into the device var/tmp directory from the /tmp/usb directory. To copy the Junos package file from /tmp/usb directory to /var/tmp directory run command ” cp /tmp/usb/<junos_package_file_name> /var/tmp”. The copied file can be verified with command ls /var/tmp/. It shows the copied file in this directory. In case of using internal directory /var/tmp/ of device to load the Junos image file, there should be sufficient space in /var/tmp/ directory of device. It can be verified either with command “show system storage” in operational mode or df -h /var/tmp/ in FreeBSD shell mode.
The command “show system storage” give the following output where the white shaded is free space in /var/tmp/ directory which is under the directory /dev/
|root@host_name> show system storage Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 292M 138M 131M 51% / devfs 1.0K 1.0K 0B 100% /dev /dev/md0 368M 368M 0B 100% /junos /cf 2 92M 138M 131M 51% /junos/cf devfs 1.0K 1.0K 0B 100% /junos/dev/ procfs 4.0K 4.0K 0B 100% /proc /dev/bo0s3e 24M 226K 22M 1% /config /dev/bo0s3f 342M 8.9M 306M 3% /cf/var /dev/md1 168M 17M 137M 11% /mfs /cf/var/jail 342M 8.9M 306M 3% /jail/var /cf/var/log 342M 8.9M 306M 3% /jail/var/log devfs 1.0K 1.0K 0B 100% /jail/dev /dev/md2 39M 4.0K 36M 0% /mfs/var/run/utm /dev/md3 1.8M 4.0K 1.7M 0% /jail/mfs|
8. Go operational mode and proceed with installing software:
Syntax command : request system software add <location_of_Junos_file><Junos_package_filename> ……..
8.1 For Ex series
root@ex> request system software add /tmp/usb/<junos_package_filename> no-validate no-copy reboot
8.2 For SRX series
root@srx> request system software add /tmp/usb/<junos_package_filename> no-validate no-copy partition reboot
After running of this command, Router, Switch and Firewalls reboot and upgrade Firmware automatically. All the process of loading /upgrading appears in console screen.If there is any issue for loading, it comes on screen.
9. Finally after the completion of firmware up-gradation, Upgraded firmware will be displayed on executing the command after the login to the device.
root@ host_name > Show version