Installing Software on NFX Devices Using USB Autoinstallation
The USB autoinstallation feature simplifies Junos OS image upgrade when there is no console access to the NFX device. This feature allows you to upgrade the Junos OS image by inserting a USB flash drive with the image and configuration into the USB port of the NFX device. To install software on an NFX series device using the USB autoinstallation you must:
- Enable Junos OS configuration
- Insert a USB flash drive with Junos OS image and configuration files
- Enable the configuration to autoinstall the image from the USB.
- Reboot after installation.
Preparing the USB
You need to prepare the USB for automatic installation, so that the USB is recognized and works properly.
Precautions
Consider the following precautions before preparing the USB:
-
Make sure /var/public/ has at least 3.5 GB to 4 GB of empty space before attempting
usb-auto-install
. -
Verify any staged installation using
show vmhost version
command.usb-auto-install
fails to install image if an installation is staged already. To cancel any staged installation, runrequest vmhost software rollback
command. -
If the USB is already plugged in, unplug and re-insert the USB to trigger the autoinstallation.
-
NFX350 device has 2 USB host or slot. If the device contains any invalid USB (not configured for
usb-auto-install
), the other USB slot can be used forusb-auto-install
. -
If one connected USB is valid but inactive (not configured for
usb-auto-install
), you can configure if configuration is disabled and use other slot to trigger auto-install without disturbing the first USB. -
If one USB has already triggered
usb-auto-install
and the installation is in progress, you must wait until the installation is complete. Insert the other USB only after the installation is complete. Avoid inserting the second USB to protect the USB and the image inside it from getting corrupted due to improper mount/unmount.
Preparing the USB
Format the USB with FAT/FAT32
On Windows PC or laptop:
Plug-in the USB key to a Windows PC or a laptop.
From My Computer right-click the Removable Disk drive.
Format the drive with the FAT/FAT32 file system.
Copy the Junos OS package to the USB key.
On Macintosh PC or laptop
Insert the USB to be formatted to a Mac PC.
Navigate to Applications > Utilities. Double-click to open disk utility.
Select the drive you want to format. Click Erase.
Rename the USB drive (optional) and choose the MS-DOS(FAT) to format.
Select Master Boot Record for scheme, select Erase to erase USB drive.
Once the process is complete, the USB drive is ready to reuse with a FAT32 file system to save data.
On NFX series device or on any Juniper device running Linux:
Run
lsblk
to find the dev node or partition of the USB, possibly sdb/sdc.Format the partition (sdb1/sdc1)
mkfs.vfat /dev/sdb1
If you are not successful, try the following command.
mkfs.vfat -I /dev/sdb1
Note:You can format the partition of the USB, that is, sdb1/sdc1. Do not format sdb/sdc.
Copy the file to USB
To copy the file from laptop:
Copy and paste the files manually if you have a GUI (Windows/Mac OS/Linux).
Else, open a command prompt and type
cp <pkg> <drive-name>:\
. For example, if the detected drive is F, typecp <pkg> F:\
To copy file from an NFX device or any Juniper device running Linux:
Mount the dev node to any path and copy the following:
mkdir /var/public/tomount mount /dev/sdb /var/public/tomount cp <pkg> /var/public/tomount
Note:This feature works with only CLI packaged images ( jinstall--***-secure-signed.tgz). The images specifically built for USB (install**usb**.tgz) does not work with this feature.
Creating the conf file
- To create the conf file using GUI:
Open the USB partition. Right-click and create an empty file.
Save the file with the name usb-auto.conf. Ensure to use the right name and extension.
Else, open a command prompt and type
echo " " > <drive-name>:\usb-auto.conf
For example, if the detected drive is F, type
echo " " > F:\usb-auto.conf
.
- To create the conf file using an NFX device or any Juniper device running Linux:
Mount the USB
Edit /var/public/tomount/usb-auto.conf
- To create the conf file using GUI:
After copying a package and creating a conf file, make sure to unmount the USB before
removing it using unmount /var/public/tomount
.
Configuring the NFX Device
After preparing the USB device, you need to configure the NFX device.
Ensure
usb-pass-through
is not enabled.Run
show system services usb-pass-through
command. Ensure that the output displays usb-pass-through is disabled.If
usb-pass-through
is enabled, then disable it by removing the configuration.Run
delete system services usb-pass-through
command to remove the configuration.Reboot the device once
usb-pass-through
is disabled.
Enable
usb-auto-install
configurationConfigure
usb-auto-install
.user@host> set system services usb-auto-install
Verify
usb-auto-install
is enabled.user@host> show system services usb-auto-install
Installing the Image
Once the configuration is applied, the USB and the device are ready for autoinstallation. Following are the steps to install the image on an NFX device.
Insert the USB in the USB slot of the device. Wait for at least 5 minutes till the image is copied to the device. You can now remove the USB.
Wait for 10 more minutes and observe the LED’s. Initially, all LEDs must be up. After the installation is complete and the device reboots, the SYS LED starts to blink green and other LEDs go down. This LED status indicates that the installation is successful and the device is rebooting.
When all the LEDs are up, it indicates that the bootup is done and the device is ready with new image.
Note:- If the LEDs do not change even after 20 minutes, it indicates that the installation has failed.
- SYS LED turns red if there are any issues during bootup. This indicates that the installation is successful but the bootup after the installation is a failure.
Disabling Autoinstallation
After installation, we recommend disabling usb-auto-install
to avoid
reinstallation or to avoid unintentional upgrade through usb-auto-install
. To
delete the usb-auto-install
:
user@host> delete system services usb-auto-install