Support Support Downloads Knowledge Base Service Request Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

[SRX] How to copy OS from primary partition to secondary partition if the primary partition is corrupt

0

0

Article ID: KB20554 KB Last Updated: 05 Oct 2019Version: 4.0
Summary:

This article describes how to copy the primary partition's OS to the secondary partition of a device if the primary partition becomes corrupt.

Symptoms:

You will see the following alarms and messages if the primary partition is corrupt.

user@switch> show chassis alarms
1 alarms currently active
Alarm time Class Description
2011-02-17 05:48:49 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. **
** **
****************************************************************************************

Solution:

Release 10.0 supports dual-root partitions on SRX-branch devices. Dual-root partitions allow the SRX Series devices to remain functional if there is file system corruption which will facilitate easy recovery of the corrupted file system.

With the dual-root partitioning scheme, the SRX Series device first tries to boot Junos from the primary root partition. If that fails, then it will try to boot from the backup root partition on the default storage media. The SRX remains fully functional even if it boots Junos from the backup root partition of storage media.

To recover the primary partition, copy the running version into the primary partition of the device easily by executing the following command in operations mode of the device:

root@SRX> request system snapshot slice alternate

Example:

{primary:node0}[edit]
root@1# run request system snapshot slice alternate ?
Possible completions:
  <[Enter]>            Execute this command
  factory              Include only files shipped from factory in snapshot
  media                Media to snapshot to
  partition            Partition the media
  |                    Pipe through a command

{primary:node0}[edit]
root@1# run request system snapshot slice alternate
node0:
--------------------------------------------------------------------------
Formatting alternate root (/dev/ad0s1a)...
Copying '/dev/ad0s2a' to '/dev/ad0s1a' .. (this may take a few minutes)
The following filesystems were archived: /

node1:
--------------------------------------------------------------------------
Formatting alternate root (/dev/ad0s2a)...
Copying '/dev/ad0s1a' to '/dev/ad0s2a' .. (this may take a few minutes)
The following filesystems were archived: /

It will take a while.

Check the version of the backup software by executing the command:

root@SRX> show system software backup

Note : The above will not work or it will report the following error if you do not have dual partitions:

Error: usb media missing or invalid

Execute the following command to check the internal partition:

root@SRX> show system snapshot media internal
root@SRX> show system software backup

Below is the sample output for these commands:

root@> show system snapshot media internal
Information for snapshot on       internal (/dev/da0s1a) (backup)
Creation date: Oct 3 11:21:05 2019
JUNOS version on snapshot:
  junos  : 12.1X46-D65.4-domestic
Information for snapshot on       internal (/dev/da0s2a) (primary)
Creation date: Jan 28 13:17:38 2019
JUNOS version on snapshot:
  junos  : 12.1X46-D65.4-domestic
 
root@> show system software backup
Backup JUNOS package information:
File name: /altroot/cf/packages/junos-12.1X46-D65.4-domestic
sFile size: 148410905

Refer to the Related Links at the bottom of this article for more information in the Technical Documentation.



 
Modification History:
2091-10-05: Added examples.
2017-12-07: Article reviewed for accuracy. Updated Symptoms and Related links.

Related Links

Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Security Alerts and Vulnerabilities

Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search