This article explains how to increase the storage on a SRX, with a USB drive, for performing a Junos Upgrade.
Junos OS upgrade on an SRX device cannot be performed due to lack of space on the Compact Flash.
A USB mass storage device connected to the SRX can be used to store the Junos image during installation. In this example the Junos image will be copied from an external FTP server in to the USB drive connected to the SRX. For using a USB drive with an already loaded Junos images, see
KB16652.
You must be root to successfully complete many of these commands.
-
Connect the USB mass storage device.
- Format the USB device by dropping to shell (start shell) then using the dd command:
dd if=/dev/zero of=/dev/da0 bs=128k
root@host> start shell
root@host% dd if=/dev/zero of=/dev/da0 bs=128k
dd: /dev/da0: short write on character device
dd: /dev/da0: end of device
3910+0 records in
3909+1 records out
512483328 bytes transferred in nan secs (nan bytes/sec)
Note that this step may take several minutes to complete and that there will not be any output shown at the CLI prompt until the process is complete.
- Label the device using the disklabel command:
disklabel -R -w da0 auto
.
root@host% disklabel -R -w da0 auto
- Create the file system using newfs command:
newfs -U /dev/da0
.
root@host% newfs -U /dev/da0
/dev/da0: nanMB (1000944 sectors) block size 16384, fragment size 2048
using 4 cylinder groups of 122.19MB, 7820 blks, 15744 inodes.
with soft updates
super-block backups (for fsck -b #) at:
32, 250272, 500512, 750752
- Create a directory to be used as a mount point using the mkdir command. In this example we will be creating directory called /var/tmp/usb.
root@host% mkdir /var/tmp/usb
- Mount the USB device using mount command:
mount /dev/da0 /var/tmp/usb
. Do not remove the USB device without following step 8. Failing to do so can lead to operational impact, or possible damage to the filesystem.
root@host% mount /dev/da0 /var/tmp/usb
- Verify the mount using command:
df -h
.
root@host% df -h
Filesystem Size Used Avail Capacity Mounted on
/dev/ad0s1a 851M 277M 565M 33% /
devfs 1.0K 1.0K 0B 100% /dev
devfs 1.0K 1.0K 0B 100% /dev/
/dev/md0 133M 133M 0B 100% /junos
/cf 851M 277M 565M 33% /junos/cf
devfs 1.0K 1.0K 0B 100% /junos/dev/
procfs 4.0K 4.0K 0B 100% /proc
/dev/bo0s1e 95M 16K 94M 0% /config
/dev/md1 336M 7.2M 302M 2% /mfs
/cf/var/jail 851M 277M 565M 33% /jail/var
devfs 1.0K 1.0K 0B 100% /jail/dev
/dev/da0 481M 4.0K 442M 0% /cf/var/tmp/usb
At this point you can use the /var/tmp/usb
directory as a place to store your JUNOS install image. Copy the Junos install image to the USB directory using the command: file copy
.
root@host> file copy ftp://1.1.1.1/junos-srxsme-12.1X46-D40.2-domestic.tgz /var/tmp/usb
/var/tmp//...transferring.file.........PQ6d3g/100% of 48 MB 4209 kBps 00m00s
root@host> file list detail /var/tmp/usb
/var/tmp/usb:
total 36946
drwxrwxr-x 2 root operator 512 Feb 13 2008 .snap/
-rw-r--r-- 1 root wheel 18874368 Feb 13 23:07 junos-jseries-8.5R2.10-domestic.tgz
Once you have the Junos image loaded onto the USB drive, then upgrade using the command: request system software add /var/tmp/usb/
junos-srxsme-12.1X46-D40.2-domestic.tgz
no-copy
. Note the SRX requires a reboot for the changes to take place.
-
To unmount the USB drive before reboot the SRX, use the unmount
command and the path this filesystem is mounted to. If the command has no output, this implies success. After the device is unmounted, it is safe to remove the USB from the router.
root@host% umount /var/tmp/usb
2020-05-31: Article was modified for SRX support only as J-series are EoS. The title and content of the article were modified for a better understanding of the process that is explained, however the commands and steps remained from the previous version. Also a similar KB was added for completeness: KB16652