Whilst configuring a Juniper EX4200 switch I came across the issue where the primary boot partition had got corrupted, you get the infamous warning: This device has booted from the backup junos image banner, from here you have two options, re-install Junos or perform a recovery. As this is a new switch just sat on the bench I opted for the recovery option, using the command request system snapshot slice alternate
login: root
Password:
— JUNOS 11.4R1.6 built 2011-11-15 10:11:59 UTC
root@SW1:RE:0% cli
***********************************************************************
** WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE
** It is possible that the primary copy of JUNOS failed to boot up **
** properly, and so this device has booted from the backup copy. **
** Please re-install JUNOS to recover the primary copy in case **
** it has been corrupted.
root@SW1>
root@SW1> request system snapshot slice alternate
Formatting alternate root (/dev/da0s1a)…
Copying ‘/dev/da0s2a’ to ‘/dev/da0s1a’ .. (this may take a few minutes)
The following filesystems were archived: /
root@NHC0-PUR-SWA001> request system reboot
Reboot the system ? [yes,no] (no) yes
The switch reboots and the warning message goes away
If you still get the warning message you need to force the switch to reboot from the newly formatted partition.
root@SW1> request system reboot slice alternate
The advice given here is purely for informational purposes, if you are applying this fix to production equipment I cannot hold any responsibility for any corruption or failure of any device as a result of using this command.
It worked for me whilst setting up a new switch and the information is provided here for informational purposes only.
