Useful Steps to recover from a Loader prompt ( Loader>)
Steps to recover from a Loader prompt ( Loader> )
There may be situations if a unit has failed to load the kernel during boot process and displays the below message:
can't load '/kernel'can't load '/kernel.old'
Press any key or space bar to enter into the loader prompt. < After pressing space bar or any key you would be directed to the below prompt >
To recover from this situation, below procedure can be used.
Format a USB stick with the FAT32 file system.
Copy the desired JunOS image (*.tgz) to the USB Stick. Make sure that no file(s) is there in the USB drive before copying the Junos image.
Insert the USB stick into the USB port on the switch.
Connect via console port to the switch.
Power on the switch.
Press the space bar after getting the above message to get into the loader prompt.
Type the command " loader>install file:///jinstall-ex-xxxx-xx.xxx.x-domestic-signed.tgz and press [enter]”. < Marked in BLUE is the Junos image file name copied in the USB>
After the above command the switch would reboot and get you to the normal prompt.
It would ask for User Name to get in. Type root as username and press [enter], it would give you the % prompt. There is a possibility that system would not accept the root as username, this would be in the case of old units where root-login is denied. Then there would be a need to recover the root password and there is a separate procedure for it.
Above command (@ point 7 )will load the Junos in the switch but there is a possibility that switch may boot from the old partition having old version of image.
Verify the same using # run show system snapshot media internal command. This command will show the Junos image present in both the partitions (In below image both have the same version).
12. If the unit has the updated/desired verison then skip the step number 13.
13. Run command # run request system reboot slice alternate to get the new version of Junos stored in alternate partition, in case required.
14. Now the new unit is ready to join the VC or master.
15. Make the connections and check the status of new unit . After this, the unit would get the configuration from master once joined in VC.
Re: Useful Steps to recover from a Loader prompt ( Loader>)
I had the same problem but my EX2300-C was not in a boot loop, not able to even get to the loader, what I end up doing was opening the unit, there is a mini usb port inside that connected directly to the internal memory, since those partitions are freeBSD, i was able to mount those with a virtual machine, and edit the files on both partitions.
Even thought that was the way i solved this, i think it could be a good idea to default a switch and create a iso or img image of the internal memory using the DD command over Linux so if it happens again, you just need to connect over usb and reflash the internal one.
Other tip, is to backup the envs from the U-boot environment. I have mine, but for each device its totally different. I have rescue couple of SRX and now one EX by troubleshooting directly from uboot.
If you have any questions, or if you need help, ping me directly email@example.com