SRX Services Gateway
Highlighted
SRX Services Gateway

How do you boot from usb from => mode?

‎05-21-2019 07:37 PM

It appears the JUNOS image is missing. I have downloaded another JUNOS image from a healthy SRX240. However, I cannot figure out how to boot from USB and save the new JUNOS image from the mode I am in "=>"

 

Thank you for your help,

 

4 REPLIES 4
SRX Services Gateway

Re: How do you boot from usb from => mode?

‎05-21-2019 09:11 PM

You are in U-boot prompt. I think you pressed SPACE key during autoboot and hence you are in that prompt. Reboot the device and boot into loader prompt and then try to recover from USB:

Reboot the device.
The following message appears:

Loading /boot/defaults/loader.conf

After this message appears, you see the following prompt:

Hit [Enter] to boot immediately, or space bar for command prompt.

Press the space bar to access the loader prompt (loader>).
The loader> prompt appears. Enter:

loader> install file:///<image-path-on-usb>

An example of a command is as follows:

loader> install file:///junos-srxsme-10.0R2-domestic.tgz
 

Reference:
https://www.juniper.net/documentation/en_US/junos12.1x44/topics/task/installation/security-junos-os-...
https://www.juniper.net/documentation/en_US/junos/topics/task/installation/security-junos-os-tftp-sr...

 

Thanks,
Nellikka
JNCIE x3 (SEC #321; SP #2839; ENT #790)
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too!!!
SRX Services Gateway

Re: How do you boot from usb from => mode?

‎05-21-2019 11:19 PM

Hi, Matt

 

I am assuming you already try the "reset" or "boot" commands and you reached the same prompt; if not please try them.

If the SRX is getting stuck on uboot (not even reaching Loader) you could try the steps mentioned in the following KB in order to upgrade/reinstall the Loader and maybe after that you could try to recover the device with a USB drive from the Loader:

 

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

https://kb.juniper.net/InfoCenter/index?page=content&id=KB30427&cat=SRX_110&actp=LIST

 

A different person tried this already and it worked:

 

https://forums.juniper.net/t5/SRX-Services-Gateway/Recovery-issue-help-using-u-boot/td-p/217897

 

Also you can try, from u-boot, to boot from the secondary partition of your SRX:

 

https://thorsten-on-tech.blog/2013/11/13/recover-juniper-srx-from-failed-boot/

 

Ive also see the "setenv bootloader usb1:0" command in a couple of forums, however Im not sure about how to use it, maybe you can research more about it; it seems to work with a usb stick:

 

https://www.reddit.com/r/Juniper/comments/9cutat/ex3400_stuck_in_uboot_loader/

https://forums.juniper.net/t5/Junos/Juniper-EX3400-stuck-in-boot-loop-after-upgrade/td-p/307064

https://lists.gt.net/nsp/juniper/66012

 

Also you could try creating a snapshot from a working SRX in to a USB and inserted in the faulty SRX and have it booting from this usb:

 

https://www.juniper.net/documentation/en_US/junos/topics/example/security-boot-device-srx-series-dev...

 

I hope the above info helps you, please let us know.

 

 

 

 

SRX Services Gateway

Re: How do you boot from usb from => mode?

‎05-22-2019 02:53 PM

I am getting this error "## No elf image at address 0x00100000"

 

I am currently in the => mode. The following commands I have access too:


askenv - get environment variables from stdin
autoscr - run script from memory
base - print or set address offset
bdinfo - print Board Info structure
boot - boot default, i.e., run 'bootcmd'
bootd - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootloader - upgrade u-boot
bootloader - upgrade loader
bootloader - upgrade ushell
bootloader - check u-boot
bootloader - check loader
bootm - boot application image from memory
bootoct - Boot from an Octeon Executive ELF image in memory
bootoctelf - Boot a generic ELF image in memory. NOTE: This command does not support
simple executive applications, use bootoct for those.
bootoctlinux - Boot from a linux ELF image in memory
bootp - boot image via network using BootP/TFTP protocol
bootvx - Boot vxWorks from an ELF image
cmp - memory compare
coninfo - print console devices and information
cp - memory copy
cpld - peek/poke CPLD
crc32 - checksum calculation
dhcp - invoke DHCP client to obtain IP/boot params
dumpoct - dump octeon regs
dumpstats - dump cavium stats
echo - echo args to console
eeprom - EEPROM sub-system
erase - erase FLASH memory
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls - list files in a directory (default /)
flinfo - print FLASH memory information
go - start application at address 'addr'
gpio - read/write on gpio pins
help - print online help
i2c - read/write on i2c bus
id_eeprom - peek/poke EEPROM
ide - IDE sub-system
iminfo - print header information for application image
imls - list all images found in flash
itest - return true/false on integer compare
loadb - load binary file over serial line (kermit mode)
loads - load S-Record file over serial line
loady - load binary file over serial line (ymodem mode)
loop - infinite loop on address range
ls609x_read_reg - Read 88E6097 register
md - memory display
mdkinit - start MDK
mm - memory modify (auto-incrementing)
mtest - simple RAM test
mw - memory write (fill)
nfs - boot image via network using NFS protocol
nm - memory modify (constant address)
pci - list and access PCI Configuration Space
pciemd - pcie memory display
pciemw - pcie memory write
pciereset - do PCIE reset
ping - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
rarpboot- boot image via network using RARP/TFTP protocol
read64 - read 64 bit word from 64 bit address
read64b - read 8 bit word from 64 bit address
read64l - read 32 bit word from 64 bit address
read_cmp - read and compare memory to val
reset - Perform RESET of the CPU
run - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv - set environment variables
sleep - delay execution for some time
smi - peek/poke SMI devices
tftpboot- boot image via network using TFTP protocol
usb - USB sub-system
usbboot - boot from USB device
version - print monitor version
watchdog <start | stop | show | pat>
write64 - write 64 bit word to 64 bit address
write64b - write 8 bit word to 64 bit address
write64l - write 32 bit word to 64 bit address

SRX Services Gateway

Re: How do you boot from usb from => mode?

‎05-22-2019 04:08 PM

Matt,

 

Please reinstall/upgrade the loader and uboot as shown in the first two links from my previous comment and let us know.