Description

 

This article describes the method to force an EX device into loader mode while booting up.

Note: EX switches may not be able to boot up normally due to a power outage or other failure. The standard procedure is to re-format and install from loader by following the instructions provided in KB20643 [juniper.net] . However, under certain circumstances, the system may not boot into loader mode as described in KB20643 [juniper.net] in which case you would need to follow the method given in this article.

 

Symptoms

 

EX cannot boot up normally if the following console output is seen:

FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.2
([email protected], Wed May 19 06:04:27 UTC 2010)
Memory: 1024MB
Loading /boot/defaults/loader.conf <-- stuck here

or

FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.1
([email protected], Wed Feb 6 11:23:55 PST 2008)
Memory: 1024MB
Loading /boot/defaults/loader.conf
/kernel data=0xbc78dc+0x6989c Device NOT ready
Request Sense returned 00 00 00
Device NOT ready
Request Sense returned 00 00 00
Device NOT ready
Request Sense returned 00 00 00
Device NOT ready
Request Sense returned 00 00 00
Device NOT ready
Request Sense returned 00 00 00
Device NOT ready
Request Sense returned 00 00 00
Device NOT ready                  <-- Continuously outputting last two lines

To reinstall Junos OS for EX from loader, you need to put the device into loader mode first. This will require you to press the space bar when prompted to do so:

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

However, the system fails before the message/prompt appears and thus this method does not work. 

To recover from this situation, the system must be forced into loader mode and display the loader> prompt while booting.

 

Solution

 

To force the system to boot in loader mode, set the load device to an invalid disk from U-boot mode by pressing the [Control + C] key combination at the beginning of the system boot process.

U-Boot 1.1.6 (Mar 28 2011 - 04:05:40)

Board: EX4200-24PX 3.9
EPLD:  Version 8.0 (0x82)
DRAM:  Initializing (1024 MB)
FLASH: 8 MB
NAND:  1024 MiB                

Firmware Version: --- 01.00.00 ---
USB:   scanning bus for devices... 2 USB Device(s) found  <-- Type Control + C here.
       scanning bus for storage devices... 1 Storage Device(s) found

=>
=>  

Prompt "=>" means the system is in U-boot mode.  

While in U-boot mode, type the following sequence of commands:

=> setenv loaddev disk66
=> saveenv
=> reset

Note: You can use disk numbers other than 0 and 1, which are intentionally invalid disk numbers; for example: disk99, or disk12, and so on.

The reset command will let the system reboot. At this point, press the [Enter] key, when prompted to do so:

Press Enter to stop auto bootsequencing and to enter loader prompt.

For your reference, an output sample is given below:

U-Boot 1.1.6 (Mar 28 2011 - 04:05:40)

Board: EX4200-24PX 3.9
EPLD:  Version 8.0 (0x82)
DRAM:  Initializing (1024 MB)
FLASH: 8 MB
NAND:  1024 MiB

Firmware Version: --- 01.00.00 ---
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

=> setenv loaddev disk66
=> saveenv
Saving Environment to Flash...
. done
Un-Protected 1 sectors
Erasing Flash...
. done
Erased 1 sectors
Writing to Flash... writing to flash...
done
. done
Protected 1 sectors
=> print loaddev
loaddev=disk66

> reset

U-Boot 1.1.6 (Mar 28 2011 - 04:05:40)

Board: EX4200-24PX 3.9
EPLD:  Version 8.0 (0x82)
DRAM:  Initializing (1024 MB)
FLASH: 8 MB
NAND:  1024 MiB

Firmware Version: --- 01.00.00 ---
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

ELF file is 32 bit
Consoles: U-Boot console  

FreeBSD/PowerPC U-Boot bootstrap loader, Revision 2.4
([email protected], Mon Mar 28 01:49:54 UTC 2011)
Memory: 1024MB
bootsequencing is enabled
bootsuccess is set
new boot device = disk66

can't load '/kernel'
can't load '/kernel.old'
Press Enter to stop auto bootsequencing and to enter loader prompt.   <-- Type Enter key here.

Type '?' for a list of commands, 'help' for more detailed help.
loader>

The EX device should now be in loader mode. Use KB20643 [juniper.net] to perform a format install.

If you have a different type of issue at boot time, refer to KB20464 - [Upgrade EX switch] Stage 4 – Troubleshoot upgrade failure/crash – System stuck on Boot-up [juniper.net] .

 

Modification History

 

2021-10-13: Article checked for accuracy, minor modifications made