Boot Junos OS Using a Bootable USB Device on SRX Series Firewalls

You can boot Junos OS from a USB device on SRX1600, SRX2300, SRX4120, SRX4300 and SRX4700 Firewalls. Booting from the USB device reformats the disk and reinstalls the software.

A bootable USB device provides a convenient and reliable way to install, upgrade, or recover Junos OS on supported devices. This section explains how to create a bootable USB device containing a Junos OS image by using a Microsoft Windows device, a macOS device, or a firewall running Junos OS.

Before you begin, download the required Junos OS installation image from the Downloads page. The downloaded file is provided in compressed .gz format. Extract the .gz file to obtain the .img installation image that is used in the procedures that follow.

You can create a bootable USB device by using any of the following methods, depending on the system available in your environment:

Booting from a Junos OS installation USB device erases and reformats the internal boot media without prompting for confirmation. Any existing software installation, logs, and locally stored files are permanently removed unless backed up. Ensure that the current configuration and any required data are backed up before proceeding.

Use Feature Explorer to confirm platform and release support for specific features.

Create a Bootable USB Device Using a Windows Device

To perform this procedure, ensure that the following requirements are met:

  • A Windows device with a USB port.
  • A USB 2.0 or USB 3.0 storage device that:
    • Has sufficient capacity for the selected Junos OS image file.
    • Does not include security features such as a keyed boot partition.
  • The required Junos OS image file.

For a virtual Windows device, map a physical USB device from the host to the guest virtual machine (VM) before starting the procedure.

To create a bootable USB device using a Windows device:

  1. Use a disk imaging utility such as Win32 Disk Imager or an equivalent tool that can write raw .img files to a USB device. You can download it from https://sourceforge.net/projects/win32diskimager/.
  2. Download the required Junos OS image from the Downloads page to the Documents directory of your laptop or computer.
  3. Insert a USB device into the USB port of your laptop or computer.
  4. Open the Win32 Disk Imager application. In the Image File field, enter the path to the Documents directory, or click the folder icon to browse to the directory. Then select the installation media image file.
  5. Select the USB flash-drive option in the device field, and click Write and Confirm. The Progress box shows the progress.
  6. Remove the USB device when the operation completes.

    The USB device is now ready to use as a bootable disk.

Create a Bootable USB Device Using macOS

To perform this procedure, ensure that the following requirements are met:

  • A macOS device with a USB port.
  • A USB 2.0 or USB 3.0 storage device that:
    • Has sufficient capacity for the selected Junos OS image file.
    • Does not include security features such as a keyed boot partition.
  • The required Junos OS image file.

To create a bootable USB device using macOS:

  1. Copy the install media (.img format) to the /var/tmp/ directory of the macOS device by using the scp command.

    For example:

    This is the Junos OS image (junos-vmhost-install-usb-srxmr2-x86-64-26.2R1.7.img) that has been copied.
  2. Run the diskutil list command to get the list of devices on the macOS device.
  3. Insert the USB device into the USB port of the macOS.
  4. Run the diskutil list command again to identify the device node assigned to the USB device (for example, /dev/disk3).
  5. Run the diskutil unmountDisk /dev/diskN command.

    Replace N with the disk number from the last command. (In this example, N would be 3.)

    For example:

  6. Execute the command sudo dd if=/var/tmp/junos-vmhost-install-usb-srxmr2-x86-64-26.2R1.7.img of=/dev/rdiskN bs=1m

    For example:

    The bootable USB device is ready for installation.
  7. Safely remove the USB device and use it as a bootable USB on the device on which you plan to run Junos OS.

Create a Bootable USB Device Using a Firewall Running Junos OS

To perform this procedure, ensure that the following requirements are met:

  • A firewall with a USB port that is running Junos OS.
  • A USB 2.0 or USB 3.0 storage device that:
    • Has sufficient capacity for the selected Junos OS image file.
    • Does not include security features such as a keyed boot partition.
  • The required Junos OS image file.

To create a bootable USB device using a firewall running Junos OS:

  1. Download the .img image from the Downloads page and copy the file to the /var/tmp/ directory on the firewall running Junos OS using the scp command.
  2. Access the shell on the Junos OS device.
  3. Insert the USB device and identify the device name assigned to it. After inserting the USB device, monitor the console output to identify the device name assigned to the USB device.
    For example:
    Note: In this example, the USB device is identified as da0. The device name may differ on your system. Always verify the USB device name before running the dd command to avoid overwriting an internal disk.
  4. Verfy the available disk devices.
  5. Write the Junos OS image to the USB device using the dd command.
  6. Wait for the command to complete successfully and then safely remove the USB device.
    The USB device is now ready to be used as bootable installation or recovery media for Junos OS.

Install Junos OS from a Bootable USB Device

You can install Junos OS on an SRX Series Firewall by booting from a USB device that contains the Junos OS software image. Booting from the USB device reformats the internal boot media and installs the software. Use this procedure only when a full installation is intended.

Method 1: Boot Junos OS from a Bootable USB Device by Using CLI (Recommended)

Before You Begin

Ensure that:

  • A bootable USB device containing the required Junos OS software image has been created.
  • Console access to the device is available.
  • The USB device is connected directly to the SRX Series Firewall.

To reinstall Junos OS on the device using a USB device and the CLI:

  1. Connect to the device console.
  2. Insert the USB device into a USB port on the device. The device automatically detects the USB device. For example:
  3. From operational mode, reboot the device to boot from the USB.
  4. Once the system is rebooted, the following message appears on the console.
    The installer validates the bootloader, kernel, and ramdisk against the platform's secure boot chain, then reformats the internal boot media, and installs the Junos OS image and its component packages (Hostd, coredump, VM, and related images).
  5. The installation environment starts automatically. The system displays platform initialization and installation preparation messages similar to the following:
  6. Enter y to install the vmhost image and Junos OS software.
    The installation begins.
  7. Reboot the device after the installation completes, and remove the USB device when prompted.
    Note: If the console is unavailable when the USB device is inserted, you can verify USB detection using show log messages or ls -lrt /dev/da* commands.
    The device reboots and starts Junos OS from the newly installed internal boot media.

Method 2: Boot Junos OS from a Bootable USB Device by Using Boot Manager

If the device cannot be accessed through the CLI, use the Boot Manager menu to boot from the USB device and reinstall Junos OS. If you have not already created a bootable USB device, see Create a Bootable USB Device Using a Windows Device or Create a Bootable USB Device Using a macOS Device.

Before you use the Boot Manager, ensure that the bootable USB device is connected to the device and that console access is available. If the CLI is not available, power-cycle or reboot the device and start the USB boot process from the Boot Manager menu:

  1. Power on or reboot the Junos OS device.
  2. When the system displays Press ESC for boot options, press ESC to enter the Boot Manager menu.
  3. Select Boot Manager, and then press Enter.

    In the Boot Manager menu, select USB00 and press Enter to boot from the USB device. After the device boots from the USB device, follow Steps 5 through 7 in Method 1: Boot Junos OS from a Bootable USB Device Using CLI to complete the installation. These steps include selecting the USB boot option, starting the installation, confirming the install by entering y, and rebooting the device after removing the USB device.