SRX

Expand all | Collapse all

How to boot the srx from usb

Jump to Best Answer
  • 1.  How to boot the srx from usb

    Posted 01-17-2017 22:43

    Hello ,

     

    How can i boot the srx from usb ?

     

    i am getting the kb for install and upgrade the junos  from usb .

     

    can any one please help me for this

     

     

    Thanks



  • 2.  RE: How to boot the srx from usb

     
    Posted 01-17-2017 22:50
    root> request system reboot media ?
    Possible completions:
    internal Boot from internal flash
    usb Boot off USB device
    root> request system reboot media usb
    Reboot the system ? [yes,no] (no)


  • 3.  RE: How to boot the srx from usb

     
    Posted 01-17-2017 23:30

    Hi Folks,

    Please find the detaield steps to Install Software via CLI from Junos software copied to USB stick

     

    Follow these steps to install the software via the CLI from a USB stick:
    1.Download the Junos upgrade file to the USB stick.
    2.Locate the USB device ID that Junos is associating to the USB stick:
    user@srx> start shell
    user@srx% ls /dev/
    3.Insert the USB device into the USB slot. For example, slot 0 would return the following:
    root# umass0: USB USBFlashDrive, rev 2.00/1.00, addr 2
    da0 at umass-sim0 bus 0 target 0 lun 0
    da0: <USB USBFlashDrive 0100> Removable Direct Access SCSI-0 device
    da0: 1.000MB/s transfers
    da0: 980MB (2007040 512 byte sectors: 64H 32S/T 980C)

    Run the following command

    user@srx% ls /dev/

    Locate difference in outputs to locate drive label. (It will usually be da#s1, i.e. da0s1)
    4.Create a mount directory:
    user@srx% mkdir /tmp/usb
    5.Mount the USB to the directory:
    user@srx% mount -t msdosfs /dev/<drivelabel, e.g. #da0s1> /tmp/usb

    Example:
    user@srx% mount -t msdosfs /dev/da0s1 /tmp/usb (there is a space between the label name and /tmp)

    Verify that the USB is mounted to the device:
    root@% pwd
    /cf/root
    root@% cd /tmp/usb/
    root@% pwd
    /cf/tmp/usb
    root@% ls
    junos-jsr-11.4R5.7-export.tgz
    6.Exit shell and install the software:
    user@srx% exit
    user@srx> request system software add /tmp/usb/<upgrade filename> no-validate no-copy
    For additional details regarding a software installation, refer to the instructions at Installing the Software.
    7.Upon completion, reboot the SRX:
    user@srx> request system reboot

     

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB16652&smlogin=true&actp=search



  • 4.  RE: How to boot the srx from usb

    Posted 01-18-2017 01:28

    Thank you for your reply

    The process which you have shared are for the install the junos from usb

     

    I want to know , can we boot the whole device from usb , if RE  Junos gets faulty?

     

     

     



  • 5.  RE: How to boot the srx from usb
    Best Answer

     
    Posted 01-18-2017 01:40
    If you have a snapshot of the working device on USB you can. If you have a working device (same model), you can take snapshot using " root> request system snapshot media usb partition". Plugin the USB and run this command, once its completed you can use this USB to bootup another SRX.
    If you have a high end device you can create bootable USB using the image on Juniper site.


  • 6.  RE: How to boot the srx from usb

     
    Posted 01-18-2017 01:41

    Please check this.. I hope it helps you..

     

    If the router’s Junos Software is damaged hence preventing the Junos Software from loading completely, you can use the emergency USB boot disk to revive the router. The emergency boot disk repartitions the primary disk and reloads a fresh installation of the Junos Software. The Junos software is kept as a backup in USB so that if there is any damage to the installed software it can be revived from the USB drive itself.

     

    SOLUTION:

    Perform the following procedure to prepare a USB Boot disk with install-media file:

    1. Download install media file from the Juniper support website.
    2. Login into a working firewall using root username and password.         
    3. Create the directory /var/tmp/test/: % mkdir /var/tmp/test/
    4. Use FTP to copy the installation media into the firewall’s /var/tmp/test
    5. Run this command from shell prompt:% dd if=/dev/zero of=/dev/da0 count=20   (Make sure that the USB  is on slot0 of routing engine)
    6. Run this command from shell prompt:% dd if=/var/tmp/test/install-media-package-name of=/dev/da0 bs=64k

    Once it completes, unplug the USB and plug into a another firewall (slot0 of routing engine) in which compact flash is corrupted and then reboot the device.

    Then you will observe a message that the device is booting from USB

    ===================================================

    FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.2

    (xhong@ipg-pool1-11.juniper.net, Thu Aug 21 08:51:56 PDT 2008)

    Memory: 1024MB

    Trying to boot from USB  Loading /boot/defaults/loader.conf

     

    =================== Bootstrap installer starting ===================

     

    Initialized the environment

    Routing engine model is RE-SRX3600

    Discovered that flash disk = ad0 , hard disk = ad2

    Disk to install is ad0 ad2

    mfs: available=1923744

    Using 1923744 for /tmp

    WARNING: The installation will erase the contents of your disks.

    Do you wish to continue (y/n)?

    Press Y to format the compact-flash and reinstall the Junos packages on it.

    Once the installation is complete, the device will reboot automaticaly and prompt for ejecting the USB so that it can boot from  the Compact-flash as shown below.  

    ep: /mnt/etc/db/pkg/*/+COMMENT: No such file or directory machdep.bootsuccess: 0 -> 1 machdep.nextbootdev: usb -> compact-flash

    Eject the installation media and hit [Enter] to reboot?

    Once the device will reboot completely it will ask for user name, and it will allow you to go inside CLI> of the device.

     

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB19576&smlogin=true&actp=search

     

     



  • 7.  RE: How to boot the srx from usb

    Posted 02-27-2021 14:03

    I can see that this thread is loaded with good information.  But many of the terms are a bit strange for me at this point.  

    I agree with the confusion re: being able to boot from USB and being able to upgrade from USB.  They seem mixed here.
    "If you have a high end device you can create bootable USB using the image on Juniper site."  I don't know what this means......

    I have a working SRX340 and am planning to upgrade the firmware.
    Because the firmware upgrade is quite a few levels "up", I want to have a bootable USB.
    I understand that all I need to do is create a SNAPSHOT from the GUI (or likely equivalent operations from the CLI).
    Is that all it takes?  If so, then that's Step 1.
    OK.  So then for Step 2 IF one needs to boot from this USB:
    Open the CLI with puTTY.
    Then what?

    I didn't find anything to download to support: "prepare a USB Boot disk with install-media file:" and don't know that it's needed.

    Sorry to be such a noob but after many years of working with a single SRX340, I've not had to deal with dead systems and rarely with firmware upgrades.




  • 8.  RE: How to boot the srx from usb

     
    Posted 02-28-2021 12:42

    When you create the bootable USB using the snapshot method it is ready to go and you don't need to do anything else for it to be usable as is.

    the ability to "prepare USB boot disk with install-media file" is an alternative way to make a bootable USB should you need to do this without having access to a Junos device of the same model you need the boot media for.  It is much more complicated but is possible in most cases.

    By default if a bootable USB is plugged into a Junos device it will boot from there first.  But you can also force a boot from specific media by specifying that after the reboot command. 

    request system reboot media usb
    or
    request system reboot media internal


    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
    http://puluka.com/home
    ------------------------------



  • 9.  RE: How to boot the srx from usb

    Posted 03-06-2021 14:14
    OK.  Thank you!
    It seems I have a problem with our only SRX340:
    When I run a SNAPSHOT, nothing happens.

    This is an 8GB FAT32 USB flash drive.

     With the USB drive removed

    Using

    ls /dev/da*

    gives the expected table of devs.

    Plugging in the USB next does *nothing* all by itself.

    (The instructions I'm reading says it will generate the table again WITH the USB included – but nothing happens.  If there's a command to use at that point, I believe it is to repeate:
    ls /dev/da*
    But, again, this does nothing.

    It's been suggested that we mount the flash drive.  Here is what happens:

    from /var/tmp
    root@RFB_SRX% cd usb

    root@RFB_SRX% ls

    root@RFB_SRX% mount_msdosfs /dev/da2s1 /var/tmp/usb

    mount_msdosfs: /dev/da2s1: No such file or directory

    root@RFB_SRX% ls

    root@RFB_SRX%

    I'm beginning to wonder if the hardware is faulty or the USB port is somehow blocked.
    ????






  • 10.  RE: How to boot the srx from usb

    Posted 03-06-2021 14:36

    And, I've now tried 3 different USB flash drives.....






  • 11.  RE: How to boot the srx from usb

     
    Posted 03-08-2021 05:55
    You will need to determine the exact device your usb gets when inserted.  The process is to check device names before insertion and after insertion so you can mount the drive successfully.  They are listed in detail here.

    https://kb.juniper.net/InfoCenter/index?page=content&id=KB12880

    ------------------------------
    Steve Puluka BSEET - Juniper Ambassador
    IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
    http://puluka.com/home
    ------------------------------



  • 12.  RE: How to boot the srx from usb

    Posted 03-08-2021 10:38

    Thank you!

    Well, I'm not so messed up after all it appears!

    After a helpful remote session with JTAC, it's been determined to RMA the SRX.