Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Boot Junos OS Evolved by Using a Bootable USB Drive

SUMMARY You can boot Junos OS Evolved from a USB device. Booting from the USB device reformats the disk and reinstalls the software without prompting you. After the installation is done, you can either remove the USB drive from the USB port or reboot the device.

You can use several ways to create the Junos OS Evolved image on the USB drive. Also included are both a procedure for booting from the USB drive and a procedure for how to recover if the boot process from the USB drive goes bad.

Create a Bootable USB Drive Using a Windows Device

You need the following items to perform this procedure:

  • Windows desktop or laptop with a USB port.

  • Version 2.0 or version 3.0 USB device with the following features:

    • USB device is big enough to hold the image.

    • USB device must have no security features, such as a keyed boot partition.

  • Junos OS Evolved image

    For a virtual Windows desktop you must map a physical USB of the host to the guest virtual machine (VM).

To create a bootable USB drive using a Windows device:

  1. Install Win32 Disk Imager on your laptop or computer.
  2. Download the required Junos OS Evolved image from the Downloads page to the Documents directory of your laptop or computer.
  3. Insert a USB flash drive into the USB port of your laptop or computer.
  4. Open the win32diskimager application and, in the Image File box, type the path to the Documents directory (or click the folder icon to navigate to the Documents directory) and select the install media image.
  5. Under Device, select the USB flash-drive and click Write and Confirm. The Progress box shows the progress.
  6. Remove the USB flash drive once it is complete.

    The USB flash-drive is now ready to use as a bootable disk.

Create a Bootable USB Drive Using a MAC OS X

You need the following items to perform this procedure:

  • A MAC OS X desktop or laptop with a USB port.

  • Version 2.0 or version 3.0 USB device with following features:

    • USB device is big enough to hold the image.

To create a bootable USB using MAC OS X:

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

    For example:

  2. To get the list of devices on the MAC OS X device, run the diskutil list command.
  3. Insert the USB flash drive into the USB port of the MAC OS X.
  4. Run the diskutil list command again to determine the device node assigned to USB flash-drive (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-evo-install-ptx-fixed-x86-64-19.2R1.31-EVO.img of=/dev/rdiskN bs=1m

    For example:

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

Create a Bootable USB Drive Using a Switch or Router Running Junos OS Evolved

You need the following items to perform this procedure:

  • A switch or router with a USB port that is running Junos OS Evolved.

  • Version 2.0 or version 3.0 USB device with following features:

    • USB device is big enough to hold the image.

    • USB device must have no security features, such as a keyed boot partition.

    • USB device label should be JUNOS.

To create a bootable USB using a switch or router running Junos OS Evolved:

  1. Download .img image from Downloads site and copy it to the /var/tmp/ directory of the switch or router running Junos OS Evolved using the scp command.
  2. Enter the shell as root:
  3. Before inserting the USB device, list the contents of /dev/.
    Note:

    Your output might differ based on the device you are using. Connect to the device using the console before inserting the USB to see the name given to the USB device. For more information see KB36398.

  4. Insert the USB drive in the USB port.
  5. Repeat the command to list the contents of /dev/.
    Note:

    /dev/sdc is the USB drive.

  6. Execute the following command, where $USB identifies the device for that USB (typically sdc in Linux):
  7. The USB with image is created and ready for installation. Safely remove the USB drive and use it as a bootable USB drive on the device on which you plan to run Junos OS Evolved.

Boot Junos OS Evolved from a Bootable USB Drive Using the CLI

Before you perform this procedure, you must create a USB drive with the Junos OS Evolved software image installed on it. For instructions, see Create a Bootable USB Drive Using a Windows Device Create a Bootable USB Drive Using a MAC OS X or Create a Bootable USB Drive Using a Switch or Router Running Junos OS Evolved.

To install Junos OS Evolved on a device that runs Junos OS Evolved using a USB drive:

  1. Connect to the console.
  2. Insert the USB drive with the Junos OS Evolved package in the USB0 port on the routing device.
  3. Reboot the routing device from the CLI:
    Note:

    Use the command request system shutdown reboot usb for Junos OS Evolved software images older than Release 20.1R1.

    When the reboot and loading of the Junos OS Evolved package is complete, you have a choice as to running a snapshot or not:

  4. Enter N to skip taking a snapshot. The system keeps the previous snapshot.
  5. Reboot the device to finish the installation.

Recover Junos OS Evolved Using USB Scratch Install

Problem

Description

If, while you are trying to boot Junos OS Evolved from a USB device, the device goes to a bad state, follow this procedure.

Solution

To recover using a USB scratch install:

  1. Insert the bootable USB device into the device.

  2. Access the BIOS manager to check the USB selection:

    1. Reboot the routing device.

      Note:

      Use the command request system shutdown reboot usb for Junos OS Evolved software images older than Release 20.1R1.

    2. To access the BIOS boot manager, press ESC while the system reboots.

  3. In the BIOS boot manager, select one of the following:

    • For PTX10003 devices, select EFI USB.

    • For QFX5200 devices, select USB: model-name.

    The scratch installation starts automatically and the operating system loads.

  4. Reboot the device to finish the installation.

Boot Junos OS Evolved from a Bootable USB Drive Using the Shell

The USB installation process deletes all configuration and other files. Therefore, after the USB installation process completes:

  • If your system contains only one Routing Engine, you need to re-create the configuration file. Hopefully, you previously stored a configuration file on a remote server or other off-box location. See Restore the Configuration from a Backup Copy after a USB Software Installation. If you do not have a previously-stored configuration file, you must start with the initial configuration steps as described in the hardware guide for your product and then continue to add the configuration statements that you need.

  • If your system contains two Routing Engines, the secondary Routing Engine boots up, but does not join the system formed by the primary Routing Engine and the FPCs, because the current software versions are different. To synchronize the software and configurations from the primary Routing Engine to the secondary Routing Engine, use the request system software sync all-versions operational mode command. The secondary Routing Engine then reboots and joins the system.

If you have not yet created a USB drive, follow the instructions at Create a Bootable USB Drive Using a Windows Device or Create a Bootable USB Drive Using a MAC OS X to create a USB drive using either a Microsoft Windows or a Mac OS X device and then use that USB drive to install the image.

  1. Power on or reboot the device. The device boots from RE0.
  2. Press the ESC key multiple times until the Front Page menu appears.
  3. Using the arrow keys, move the cursor to the Boot Manager option, and press Enter to select that option. The Boot Manager menu appears:
  4. Using the arrow keys, move the cursor to the USB00 option, and press Enter to select that option. Some messages and the GNU GRUB menu appear:
  5. Because the USB device can contain only one image, you do not need to select the image. GRUB starts the installation automatically.
  6. Issue the reboot command to finish the installation.
  7. The action you take next depends on whether your system has one or two Routing Engines.
    • If your system has one Routing Engine, either copy a known-good configuration file to the Routing Engine, as explained in Restore the Configuration from a Backup Copy after a USB Software Installation, or start creating a new configuration file with the steps contained in the hardware guide for your product.

    • If your system has two Routing Engines, use the request system software sync all-versions operational mode command to synchronize the software and configurations from the primary Routing Engine to the secondary Routing Engine and enable the secondary Routing Engine to join the system and use the most-recent configuration that was stored on the primary Routing Engine. Because the current software versions do not match, the secondary Routing Engine does not join the system, which comprises the primary Routing Engine and the FPCs.