A switch can be recovered by performing a format installation with a bootable USB if it does not boot successfully. This article explains how the format installation can be performed on EX2300 and EX3400 switching devices.
Warning: This procedure will format the switch and all configurations will be lost.
For TFTP format install steps, refer to: KB31462 - How to recover EX2300s and EX3400s with format install procedure via TFTP
If you are getting the "can't load 'kernel" error, refer to KB33842 - Fix Device is not booting up with 'can't load kernel' error on EX3400/EX2300 Devices.
To perform format installation on EX3400 and EX2300 switches, perform the following steps:
-
Download the corresponding "USB" image under the "Install Media" section from Juniper's Support site.


-
Transfer the image to a bootable USB. You can make a USB drive bootable by using the dd
command in shell, or use GUI-based USB flash drive utilities such as Rufus or ISO Burner for Windows.
Note: "img.gz
" files may need to be extracted to "img
."
-
Insert the USB into the EX3400/EX2300 switch.
-
Reboot the switch and interrupt the boot sequence by using the up/down arrow keys or Ctrl C.
Warning: Using the numbers or hotkey menu letters may select an undesired option.
Example working condition
U-Boot 2016.01-rc1 (May 23 2016 - 08:45:58 -0700) VERSION=1.2.0
DRAM: AVS: 0x0
DEV ID = 0xdc14
SKU ID = 0xb548
DDR type: DDR3
MEMC 0 DDR speed = 750MHz
PHY revision version: 0x00044006
SF: Detected MX25L6405D with page size 256 Bytes, erase size 64 KiB, total 8 MiB
In: serial
Out: serial
Err: serial
FLASH bank: 1
Board: EX3400-24P
Base MAC: F4CC55CC9661
Net: bcmiproc_eth-0
Last Reset Reason: 8
Hit ^C to stop autoboot: 0
SF: Detected MX25L6405D with page size 256 Bytes, erase size 64 KiB, total 8 MiB
device 0 offset 0x3c0000, size 0x10000
SF: 65536 bytes @ 0x3c0000 Read: OK
## Checking Image at 61000000 ...
Legacy image found
Image Name: Juniper U-Boot Script File
Image Type: ARM Unknown OS Script (uncompressed)
Data Size: 1803 Bytes = 1.8 KiB
Load Address: 00000000
Entry Point: 00000000
Contents:
Image 0: 1795 Bytes = 1.8 KiB
Verifying Checksum ... OK
## Executing script at 61000000
Setting bus to 0
SF: Detected MX25L6405D with page size 256 Bytes, erase size 64 KiB, total 8 MiB
device 0 offset 0x140000, size 0x140000
SF: 1310720 bytes @ 0x140000 Read: OK
6113fffc: f1c1fb43 C...
crc32 for 61000000 ... 6113ffff ==> 43fbc1f1
Total of 1 word(s) were the same
starting USB...
USB0: phy ctrl 01d36440
Initial usb2h clock is: 000003fc
Initial usb2h clock is: 000003fd
iClk = 00000078, USBClk = 01536440
Bring usb2h_out of reset.......
usb2_reset_state is set and now it is: 00000000
usb2_reset_state is: 00000000
USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
SF: Detected MX25L6405D with page size 256 Bytes, erase size 64 KiB, total 8 MiB, mapped at 00000088
## Starting application at 0x00000074 ...
Consoles: U-Boot console
FreeBSD/armv6 U-Boot loader, Revision 1.2
(fbsd-builder@svl-bsdx-05.juniper.net, Wed May 18 12:32:06 PDT 2016)
DRAM: 2048MB
Number of U-Boot devices: 2
U-Boot env: loaderdev not set, will probe all devices.
Found U-Boot device: disk
Probing all disk devices...
Checking unit=0 slice=<auto> partition=<auto>... good.
-
Main Menu
1. Boot [J]unos volume
2. Boot Junos volume in [S]afe mode
3. [R]eboot
4. [B]oot menu
5. [M]ore options
-
Press 4 for Boot Menu.
Boot Menu
1. Boot [P]revious installed Junos packages
2. Boot Junos in [S]ingle user mode
3. Boot from [R]ecovery snapshot
4. Boot from [U]SB
5. Boot to [O]AM shell
6. Snapshot [B]oot menu
7. [M]ain menu
Choice:
-
Press 4 again for Boot from USB.
-
You will see a message about attempting to boot from USB.
-
After the USB image installation is complete, log in and verify that the new version of the software is properly installed.
Note: If the process fails with the error "can't load 'kernel", refer to KB33842 - Fix Device is not booting up with 'can't load kernel' error on EX3400/EX2300 Devices.