Configuring Root Partitions on ACX Series Routers
The dual-root partitions help your ACX Series routers to remain functional even if the file system is corrupted. Also, it helps to recover the file system in case of corruption.
Dual-Root Partitioning ACX Series Routers Overview
Dual-root partitioning allows the ACX Series router to remain functional even if there is file system corruption and to facilitate easy recovery of the file system. Dual-root partitioning means that the primary and backup Junos OS images are kept in two independently bootable root partitions. If the primary root partition becomes corrupted, the system can still boot from the backup Junos OS image located in the other root partition and remain fully functional.
ACX5048 and ACX5096 routers do not support dual-root partitioning. All other ACX routers run with dual-root partitioning.
- Boot Media and Boot Partition on the ACX Series Routers
- Important Features of the Dual-Root Partitioning Scheme
Boot Media and Boot Partition on the ACX Series Routers
With dual-root partitioning, the ACX Series router first tries to boot the Junos OS from the primary root partition and then from the backup root partition on the internal NAND flash. If both primary and backup root partitions of the internal NAND flash fail to boot, you must insert a USB storage media with a copy of the Junos OS from which to boot.
The following is the storage media available on the ACX Series router:
USB media emergency boot device
Note:The USB media device is not dual-root partitioned.
Dual, internal NAND flash device (first daOs1, then daOs2)
Important Features of the Dual-Root Partitioning Scheme
The dual-root partitioning scheme has the following important features:
The primary and backup copies of Junos OS images reside in separate partitions. The partition containing the backup copy is mounted only when required. With the single-root partitioning scheme, there is one root partition that contains both the primary and the backup Junos OS images.
The
request system software add
command for a Junos OS package erases the contents of the other root partition. The contents of the other root partition will not be valid unless software installation is completed successfully.Add-on packages, such as jais or jfirmware, can be reinstalled as required after a new Junos OS image is installed.
The
request system software rollback
command does not delete the current Junos OS image. It is possible to switch back to the image by issuing therollback
command again.
Understanding How the Primary Junos OS Image with Dual-Root Partitioning Recovers on the ACX Series Router
If the ACX Series Universal Metro router is unable to boot from the primary Junos OS image and boots up from the backup Junos OS image in the backup root partition, a message appears on the console at the time of login indicating that the device has booted from the backup Junos OS image.
ACX5048 and ACX5096 routers do not support dual-root partitioning.
login: user Password: *********************************************************************** ** ** ** WARNING: THIS DEVICE HAS BOOTED FROM THE BACKUP JUNOS IMAGE ** ** ** ** It is possible that the active 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 active copy in case ** ** it has been corrupted. ** ** ** ***********************************************************************
Because the system is left with only one functional root partition, you should immediately restore the primary Junos OS image using one of the following methods:
Install a new image using the CLI. When you install the new image, the new image is installed on only one partition–the alternate partition, meaning the router is now running two images. When you reboot, the router boots from the newly installed image, which becomes the primary image. So now there are two different images running on the router. Run the installation process again to update the other partition.
Use a snapshot of the backup root partition by entering the
request system snapshot slice alternate
command. After the primary root partition is recovered using this method, the device will successfully boot from the primary root partition on the next reboot. After the procedure, the primary root partition will contain the same version of Junos OS as the backup root partition.Note:You can use the CLI command
request system snapshot slice alternate
to back up the currently running root file system (primary or secondary) to the other root partition on the system.You can use this command to:
Save an image of the primary root partition in the backup root partition when the system boots from the primary root partition.
Save an image of the backup root partition in the primary root partition when the system boots from the backup root partition.
Warning:The process of restoring the alternate root by using the CLI command
request system snapshot slice alternate
takes several minutes to complete. If you terminate the operation before completion, the alternate root might not have all required contents to function properly.
Junos OS Release 12.2 or Later Upgrades with Dual-Root Partitioning on ACX Series Routers
If you are upgrading to Junos OS Release 12.2 without transitioning to dual-root partitioning, use the conventional CLI installation method.
To format the media with dual-root partitioning while upgrading to Junos OS Release 12.2 or later, use either of the following installation methods:
ACX5048 and ACX5096 routers do not support dual-root partitioning. All other ACX routers run with dual-root partitioning.
Installation using a USB storage device. We recommend this method if console access to the system is available and the system can be physically accessed to plug in a USB storage device. See Installing Junos OS Using a USB Storage Device on ACX Series Routers.
Installation from the CLI. We recommend this method only if console access is not available. This installation can be performed remotely. See Installing Junos OS Upgrades from a Remote Server on ACX Series Routers.
Example: Installing Junos OS and Configuring a Dual-Root Partition on ACX Series Routers Using the CLI
This example shows how to install Junos OS Release 12.2 or later and configure a dual-root partition on ACX Series routers with the CLI.
Requirements
This example requires an ACX Series router. Before you begin, back up any important data.
Overview
This example formats the NAND Flash device and installs the
new Junos OS image on the media with dual-root partitioning. Install
the Junos OS Release 12.2 or later image from the CLI by using the request system software add
command. Partitions are automatically
created on ACX Series routers and no option needs to be manually entered
for creating partitions. This command copies the image to the device,
and then reboots the device for installation. The device boots with
the Release 12.2 or later image installed with the dual-root partitioning
scheme. The formatting and installation process is scheduled to run
on the next reboot. Therefore, we recommend that this option be used
together with the reboot
option.
The process might take 15 to 20 minutes. The system is not accessible over the network during this time.
Using the request system software add
command
erases the existing contents of the media. Only the current configuration
is preserved. You should back up any important data before starting
the process.
Dual, internal NAND Flash device (first daOs1, then daOs2) and USB storage device are the storage media available on the ACX Series router. The USB storage device is not dual-root partitioned.
In this example, add the software package junos-juniper-12.2R1.9-domestic.tgz with the following options:
no-copy
option to install the software package. However, do not save the copies of the package files. You should include this option if you do not have enough space on the internal media to perform an upgrade that keeps a copy of the package on the device.no-validate
option to bypass the compatibility check with the current configuration before installation starts.reboot
option to reboot the device after installation is completed.
Topology
Configuration
Procedure
CLI Quick Configuration
To install Junos OS Release 12.2 or later and configure dual-root partitioning on ACX Series routers, copy the following command, paste it in a text file, remove any line break, and then copy and paste the command into the CLI.
From operational mode, enter:
user@host> request system software add junos-juniper-12.2R1.9-domestic.tgz no-copy no-validate reboot
Step-by-Step Procedure
To install Junos OS Release 12.2 or later and configure a dual-root partition:
Upgrade the ACX Series router to Junos OS Release 12.2 or later using the CLI.
Install Junos OS Release 12.2 or later and configure the dual-root partition.
user@host> request system software add junos-juniper-12.2R1.9-domestic.tgz no-copy no-validate reboot Copying package junos-juniper-12.2R1.9-domestic.tgz to var/tmp/install Rebooting ...
Results
In operational mode, confirm your configuration by
entering the show system storage
command. If the output
does not display the intended configuration, repeat the configuration
instructions in this example to correct it.
Sample output on a system with dual-root partitioning that displays information about the root partition that is mounted (only one root partition is mounted at a point in time):
user@host> show system storage
Filesystem Size Used Avail Capacity Mounted on /dev/da0s1a 872M 150M 713M 17% / devfs 1.0K 1.0K 0B 100% /dev /dev/md0 41M 41M 0B 100% /packages/mnt/jbase /dev/md1 183M 183M 0B 100% /packages/mnt/jkernel-ppc-12.2I20121026_1217_sranjan /dev/md2 30M 30M 0B 100% /packages/mnt/jpfe-ACX-12.2I20121026_1217_sranjan /dev/md3 9.1M 9.1M 0B 100% /packages/mnt/jdocs-12.2I20121026_1217_sranjan /dev/md4 55M 55M 0B 100% /packages/mnt/jroute-ppc-12.2I20121026_1217_sranjan /dev/md5 12M 12M 0B 100% /packages/mnt/jcrypto-ppc-12.2I20121026_1217_sranjan /dev/md6 1.0G 8.0K 951M 0% /tmp /dev/md7 1.0G 448K 950M 0% /mfs /dev/da0s1e 92M 18K 91M 0% /config procfs 4.0K 4.0K 0B 100% /proc /dev/da0s3f 3.9G 3.6G 30M 99% /var /dev/da0s3d 447M 2.8M 409M 1% /var/log
If you are done configuring the device, enter commit
in configuration mode.
You can issue the fdisk
command from the Junos prompt
to display information about the entire partition format on the NAND
Flash device. All ACX Series routers run with dual-root partitioning.
The following example displays the partition details on an ACX Series
router with dual-root partitions:
user@host% fdisk
******* Working on device /dev/da0 ******* parameters extracted from in-core disklabel are: cylinders=487 heads=255 sectors/track=63 (16065 blks/cyl) parameters to be used for BIOS calculations are: cylinders=487 heads=255 sectors/track=63 (16065 blks/cyl) Media sector size is 512 Warning: BIOS sector numbering starts with sector 1 Information from DOS bootblock is: The data for partition 1 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 567, size 1011528 (493 Meg), flag 80 (active) beg: cyl 0/ head 9/ sector 1; end: cyl 62/ head 254/ sector 63 The data for partition 2 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 1012662, size 1011528 (493 Meg), flag 0 beg: cyl 63/ head 9/ sector 1; end: cyl 125/ head 254/ sector 63 The data for partition 3 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 2024757, size 3581928 (1748 Meg), flag 0 beg: cyl 126/ head 9/ sector 1; end: cyl 348/ head 254/ sector 63 The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) start 5607252, size 2200338 (1074 Meg), flag 0 beg: cyl 349/ head 9/ sector 1; end: cyl 485/ head 254/ sector 63
In the preceding example, partition 1 and 2 contain two partitions each internally, a root partition and a configuration partition.
Verification
Confirm that the configuration is working properly.
Verifying the Partitioning Scheme Details
Purpose
Verify that the partitioning scheme details on the ACX Series router were configured.
Action
In operational mode, enter the show system storage
command. For details about the output of this command and the descriptions
of the output fields, see show system
storage.