Description

This article describes the issue when a Juniper Networks EX Series Switches boots from the backup root partition after a file corruption occurred on the primary root partition.

Symptoms

EX series switches running Junos release 10.4R3 or later have added resiliency based on the "resilient dual-root partition"; which if the switch detects a corruption on the primary root file system, it boots from the alternate root partition.

When this occurs, you are notified in two ways, via an Alarm and a Warning banner.


The following alarm message is generated:
root@switch> show chassis alarms 
1 alarms currently active
Alarm time               Class  Description
2023-02-10 08:23:53 PST  Minor  Host 0 Boot from backup root

Warning:
***********************************************************************
**                                                                   **
**  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 and if auto-snapshot feature is not        **
**  enabled.                                                         **
**                                                                   **
***********************************************************************

Solution

It is likely that the file system became corrupted due to a sudden power loss or an ungraceful shutdown of the EX Series Switch.

Repairing the primary partition when it is corrupted:
When the primary partition detects corruption, the device boots from the backup partition, which then becomes the active partition. Remember that after every successive reboot, the switch will try to reboot from the current active partition.  You can repair the primary partition, by using request system snapshot media internal slice alternate without any downtime. No reboot is required after running this command.  However, the Alarm and Warning banner will be displayed.

Note: As long as both partitions are healthy, there is no issue with running the switch on either of them. You only must ensure that both partitions are healthy, so that fail over can be done transparently between the two, in case of any file corruption.

Verification:

To verify if the primary partition is rebuilt, run one of the following show commands. The same commands also inform about which partition is the current active partition.

This procedure also applies to devices part of a virtual chassis, remember to reference the virtual chassis member ID whenever needed to either show what device booted from the backup partition or to create the snapshot for the specific device. 

show system storage partitions

Sample output:
root@switch> show system storage partitions 
fpc0:
--------------------------------------------------------------------------
Boot Media: internal (da0)
Active Partition: da0s2a
Backup Partition: da0s1a <-- this is the backup slice
Currently booted from: backup (da0s1a) <-- shows booted from that slice

Partitions information:
  Partition  Size   Mountpoint
  s1a        316M   /         
  s2a        324M   altroot   
  s3d        887M   /var/tmp  
  s3e        170M   /var      
  s4d        116M   /config   
OR

show system snapshot media internal

Sample output:
root@switch> show system snapshot media internal 
fpc0:
--------------------------------------------------------------------------
Information for snapshot on       internal (/dev/da0s1a) (backup)
Creation date: Feb 7 02:48:07 2023
JUNOS version on snapshot:
  jcrypto-ex: 20.4R3-S1.3
  jdocs-ex: 20.4R3-S1.3
  jphone-home: 20.4R3-S1.3
  jsd    : powerpc-20.4R3-S1.3-jet-1
  jsdn-powerpc: 20.4R3-S1.3
  junos  : ex-20.4R3-S1.3
  junos-ex-4300: 20.4R3-S1.3
  jweb-ex: 20.4R3-S1.3
Information for snapshot on internal (/dev/da0s2a) (primary) <-- provides info for this slice/partition the switch booted off and the date the filesystem was created
Creation date: Feb 9 01:58:01 2023  <-- if less than alarm date then customer should snapshot (it is an effective way to confirm)
JUNOS version on snapshot:
  jcrypto-ex: 21.4R3-S3.2
  jdocs-ex: 21.4R3-S3.2
  jphone-home: 21.4R3-S3.2
  jsd    : powerpc-21.4R3-S3.2-jet-1
  jsdn-powerpc: 21.4R3-S3.2
  junos  : ex-21.4R3-S3.2
  junos-ex-4300: 21.4R3-S3.2
  jweb-ex: 21.4R3-S3.2

To go back to the Primary partition, you can use the request system reboot slice alternate media internal command. If you do not use this command, the switch will then boot from the backup partition on successive reboots; which is the current Active partition.

The switch will automatically reboot from the primary partition, which is now the active partition, only when the backup partition gets corrupted. When a primary partition gets corrupted, you will receive the alarm as mentioned above.

Note: This alarm does not get cleared, even if you repair the primary partition. The purpose of this alarm is to inform the users that the device is rebooted from the backup partition, so that administrators take necessary actions to repair the primary partition.

Step-by-step recovery procedure for this situation:

Beginning with Junos release 12.3, use the following commands:

Perform snapshot to the other partition.
> request system snapshot slice alternate local
To perform a snapshot to the other partition on a device part of a virtual chassis:
> request system snapshot slice alternate member <member ID>

To verify if the partition has been copied correctly.
> show system snapshot media internal local

To verify if the partition has been copied correctly for the specific member.
> show system snapshot media internal member <member ID>
The command above ensures that the alternate partition is repaired, without requiring a reboot. You can verify both the partitions by using the following command "show system storage partitions". The command will only repair the partition but will not clear the alarm. To get rid of the alarm, use "request system reboot slice alternate media internal" during a maintenance window as it will require to reboot the device. 

 

Modification History

2025/05/30 : Added EX4300 platform to categories.

Related Information