Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Boot Junos OS Evolved by Using a Bootable USB Drive

date_range 20-Dec-24

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:

    content_copy zoom_out_map
    $ scp user@server:/var/tmp/image-name /var/tmp/ 
    password: 
  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:

    content_copy zoom_out_map
    $ diskutil unmountDisk /dev/disk3 
    Unmount of all volumes on disk3 was successful
    
  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:

    content_copy zoom_out_map
    $ sudo dd if=/var/tmp/usb.img of=/dev/rdisk3 bs=1m 
    Password:
    965+0 records in
    965+0 records out
    1011875840 bytes transferred in 82.891882 secs (12207177 bytes/sec)
  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:
    content_copy zoom_out_map
    user@host> start shell user root
    Password:
    
  3. Before inserting the USB device, list the contents of /dev/.
    content_copy zoom_out_map
    root@host-re0:~#ls /dev/sd*
    /dev/sda   /dev/sda3  /dev/sda6  /dev/sdb1  /dev/sdb4  /dev/sdb7
    /dev/sda1  /dev/sda4  /dev/sda7  /dev/sdb2  /dev/sdb5  
    /dev/sda2  /dev/sda5  /dev/sdb   /dev/sdb3  /dev/sdb6  
    root@host-re0:~#
    
    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/.
    content_copy zoom_out_map
    root@host-re0:~#ls /dev/sd*
    /dev/sda   /dev/sda3  /dev/sda6  /dev/sdb1  /dev/sdb4  /dev/sdb7
    /dev/sda1  /dev/sda4  /dev/sda7  /dev/sdb2  /dev/sdb5  /dev/sdc
    /dev/sda2  /dev/sda5  /dev/sdb   /dev/sdb3  /dev/sdb6  /dev/sdc1
    root@host-re0:~#
    
    Note:

    /dev/sdc is the USB drive.

  6. Execute the following command, where $USB identifies the device for that USB (typically sdc in Linux):
    content_copy zoom_out_map
    root@host-re0:~# dd if=/var/tmp/usb.img of=/dev/$USB bs=1M
  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:
    content_copy zoom_out_map
    user@host> request node reboot usb
    
    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:

    content_copy zoom_out_map
    Installation of image junos-evo-install-ptx-fixed-x86-64-19.2R1.31-EVO done.
    Boot version is now 'junos-evo-install-ptx-fixed-x86-64-19.2R1.31-EVO'
    Do you want to run snapshot on secondary ssd? (Y/N)
  4. Enter N to skip taking a snapshot. The system keeps the previous snapshot.
    content_copy zoom_out_map
    Do you want to run snapshot on secondary ssd? (Y/N)N
        Setting next_boot
        Booting from 0000
  5. Reboot the device to finish the installation.
    content_copy zoom_out_map
    user@host-re0~# reboot

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.

      content_copy zoom_out_map
      user@host> request node reboot usb
      
      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.

    content_copy zoom_out_map
    user@host-re0~# reboot

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:
    content_copy zoom_out_map
    Booting USB00 (JetFlashTranscend 16GB)...                                                                                  
    Secure boot is not enforced
    
    GNU GRUB  version 2.02~juniper/rel_v3~
    
    +------------------------------------------------------------------------+
    |*Evo ISO installation media [junos-evo-install-ptx-x86-64-20.4R2.14-EVO]|
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    |                                                                        |
    +------------------------------------------------------------------------+
    
          Use the ^ and v keys to select which entry is highlighted.
          Press enter to boot the selected OS, `e' to edit the commands
          before booting or `c' for a command-line. ESC to return
          previous menu.
       The highlighted entry will be executed automatically in 1s.
    
  5. Because the USB device can contain only one image, you do not need to select the image. GRUB starts the installation automatically.
    content_copy zoom_out_map
     Booting `Evo ISO installation media
    [junos-evo-install-ptx-x86-64-20.4R2.14-EVO]'
    
    Version is junos-evo-install-ptx-x86-64-20.4R2.14-EVO, Product is ptx[re].
    IMA is 1
    Loading kernel ...ok
    Loading initrd ...ok
    Booting ...
    error: no suitable video mode found.
    Booting in blind mode
    error: no suitable video mode found.
    Booting in blind mode
    Trying sdc...sdc1...Found!
    [    7.624873] jnx-cbd-fpga jnx-cbd-fpga.10: jnx_cbc_probe: FRU not handled by jnx-connector: -22!
    [    7.736740] jnx-cbd-fpga jnx-cbd-fpga.8: jnx_cbc_probe: FRU not handled by jnx-connector: -22!
    Watchdog set to 500 seconds
    [    8.205691] watchdog: watchdog0: watchdog did not stop!
    Found 186 gig (195360984 kbytes) Vendor ATA, Model SFSA200GM3AA4TO-
    Writing new partitioning table to disk sda -
        boot - 204800K
        soft - 32768M
        swap - 4096M
        data - 3072M
        conf - 1024M
        var - 149622M
        user - 0M
    Done
    Installing/Mounting on disk /dev/sda mapped to device ata1
    Processing /dev/sda2 for mount on /soft ...[creating]..
        data - 3072M
        conf - 1024M
        var - 149622M
        user - 0M
    Done
    Installing/Mounting on disk /dev/sda mapped to device ata1
    Processing /dev/sda2 for mount on /soft ...[creating]..ok [mounting]..done
    Processing /dev/sda5 for mount on /data ...[creating]..ok [mounting]..done
    Processing /dev/sda6 for mount on /data/config ...[creating]..ok [mounting]..done
    Processing /dev/sda7 for mount on /data/var ...[creating]..ok [mounting]..done
    Processing /data/var/opt_fs for mount on /data/var/external ...[creating]..ok [mounting]..done
    mkswap: /dev/sda3: warning: wiping old swap signature.
    Setting up swapspace version 1, size = 4 GiB (4294963200 bytes)
    no label, UUID=66495c63-a79e-496a-ba60-853417d76edb
    Processing /dev/sda1 for mount on /boot ...[creating]..ok [mounting]..done
    Done with local filesystems setup.
    Cleanup check done.
    Installation on re node for version junos-evo-install-ptx-x86-64-20.4R2.14-EVO started.
    [...output truncated...]
    Installation of image junos-evo-install-ptx-x86-64-20.4R2.14-EVO done.
    Boot version is now 'junos-evo-install-ptx-x86-64-20.4R2.14-EVO'
    Do you want to run snapshot on secondary ssd? (Y/N)n
    Setting next_boot
    Booting from 0000
    NOTE: Now 9 keys in keyring: %keyring:.ima
    Scratch install done.
    BootCurrent: 0003
    Timeout: 5 seconds
    BootOrder: 0003,0000,0001,0002
    Boot0000* HDD00 (SFSA200GM3AA4TO-C-HC-646-JUN)
    Boot0001* HDD01 (SFSA200GM3AA4TO-C-HC-646-JUN)
    Boot0002* ETH00 (B8-C2-53-32-91-63)
    Boot0003* USB00 (JetFlashTranscend 16GB)
    Booting from 0000
    Scratch install done.
    
    ### To Reboot : ################################
    #      Pull out the USB stick                  #
    # Or -                                         #
    #      Type 'reboot' and hit <return>          #
    ################################################
    
  6. Issue the reboot command to finish the installation.
    content_copy zoom_out_map
    user@host-re0:~# reboot
  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.

      content_copy zoom_out_map
      [vrf:none] user@host-re1:~# cli
      {master}
      user@host-re1> request system software sync all-versions
      warning: Erase software versions present on the other RE node and sync software versions from Master RE node
      Erase software versions on the other RE and sync from Master RE? [yes,no] (no) yes                                         
      Cleanup old software versions on re0
      The current version on master RE - junos-evo-install-ptx-x86-64-20.4-202102141059.0-EVO
      The current version on other RE - junos-evo-install-ptx-x86-64-19.4R1-S1.18-EVO
      Transfer software version files for junos-evo-install-ptx-x86-64-20.4-202102141059.0-EVO to node re0...
      [...output truncated...]
footer-navigation