Accelerating the LN Series Router Boot-Up Process
To minimize the time required for an LN Series router to become operational, you can configure these BOOT features to accelerate the startup process:
Disable or enable power-on self test (POST) using the no_run_post environmental variable.
Disable or enable file system cleanup using the fs_clean_boot environmental variable.
Remove temporary files left over from the IDP security package installation.
We recommend that you only enable the no_run_post and the fs_clean_boot environmental variables in networks when the time to boot the platform is critical to system operations.
These options are not mutually exclusive and not linked. You can choose to set both options, set only one option, or set neither of the options. If neither option is set, the LN Series router’s default behavior remains unchanged; POST runs automatically, and the optional file system cleanup is not performed.
This section contains the following topics:
Accessing the LN Series Router BOOT> Prompt
You set the no_run_post and the fs_clean_boot environmental variables from the BOOT>
prompt.
To access the LN Series router BOOT>
prompt:
- Obtain console access to the LN Series router.
- Start the boot cycle by rebooting or re-powering the router
by entering the request system reboot command at the console
and answering yes to reboot the system prompt. When the
Boot Flash
information displays on the console, press the space bar.lab@md-ln4-2> request system reboot
Reboot the system ? [yes,no] (no) yes Shutdown NOW! [pid 1938] lab@md-ln4-2> *** FINAL System shutdown message from lab@md-ln4-2 *** System going down IMMEDIATELY JWaiting (max 60 seconds) for system process `vnlru' to stop...done Waiting (max 60 seconds) for system process `vnlru_mem' to stop...done Waiting (max 60 seconds) for system process `bufdaemon' to stop...done Waiting (max 60 seconds) for system process `syncer' to stop... Syncing disks, vnodes remaining...0 0 0 0 done syncing disks... All buffers synced. Uptime: 14h48m47s Rebooting... cpu_reset: Stopping other CPUs Boot Flash: 16 MB in 131 Sectors (portwidth: 16bit chipwidth: 16bit) OCTEON CN56XX pass 2.1, Core clock: 600 MHz, DDR clock: 266 MHz Device 1: Product DWC OTG root hub Initializing IDE Initializing FPGA Programming /cf/usr/share/pfe/firmware/563-029572.bit: 2067591 bytes Programmed successfully (time: 883972430 ticks) PCIe: Waiting for port 0 link PCIe: Port 0 link active, 1 lanes 0:00:00.0 0x003b1304 HWA FPGA Version 0x0011081200000055 PCIe: Waiting for port 1 link PCIe: Port 1 link active, 4 lanes 1:00:00.0 0x0009184e IDP Revision Date-Time: 05/28/08-18:00:00 Juniper LN1000-V revision 3.7, Serial# BF1111AG0006 Juniper Part # 710-027379 Bootstrap: #1.6 Loader: #2.5 12.1I20131213_1517_rwinter 2013-12-13 15:19:38 UTC rwinter@svl-junos-d080.juniper.net IPMC: 1.0.19 IPMC_RB: 1.0.19 SDRAM: 1024 MB Boot flash: 16 MB @ 0x1fc00000 IDE flash: 977.4 MB (2001888 x 512) USB: not available current_dev: ide coremask: 0xfff (12 cores) reset: Soft NVMRO: Write-enabled watchdog: Armed FPGA: Enabled FS Cleanup: Disabled POST: Enabled Firmware Image Status: Primary Bootstrap: UP TO DATE Secondary Loader0: UP TO DATE Secondary Loader1: UP TO DATE IPMC Firmware: UP TO DATE IPMC_RB Firmware: UP TO DATE Hit any key to stop autoboot: 1 IPMC test IPMC test completed, 1 pass, 0 errors, 0 warnings BOOT >
- After pressing the space bar, the process continues performing
some system tests, and then the boot process stops at the
BOOT>
prompt. - For available commands, enter
help
or?
at theBOOT>
prompt.
Disabling or Enabling POST
Disabling POST
To disable the POST feature:
BOOT> setenv no_run_post 1
BOOT> saveenv
BOOT> reset
Only the first character of the environmental variable is evaluated. If the variable is not set, or if the first character of the variable’s value is zero (0), then the default behavior for POST (runs automatically) and file system cleanup (not performed) is followed.
When you disable POST, the standard set of POST diagnostic tests are skipped. The following sample console output shows that the POST feature is disabled:
.... NVMRO: Write-enabled watchdog: Armed FPGA: Enabled FS Cleanup: Disabled POST: Disabled Firmware Image Status: Primary Bootstrap: UP TO DATE .... IPMC test completed, 1 pass, 0 errors, 0 warnings Skipping POST Booting...
Enabling POST
To enable the POST feature and run the full set of POST diagnostic tests during the boot-up process:
The POST feature’s default setting is enabled
.
BOOT> unsetenv no_run_post
BOOT> saveenv
BOOT> reset
or
BOOT> setenv no_run_post 0
BOOT> saveenv
BOOT> reset
When you enable POST, the full set of POST diagnostic tests run. The following sample console output shows that the POST feature is enabled:
.... NVMRO: Write-enabled watchdog: Armed FPGA: Enabled FS Cleanup: Disabled POST: Enabled Firmware Image Status: Primary Bootstrap: UP TO DATE ....
Disabling or Enabling File System Cleanup
Disabling File System Cleanup
To disable the file system cleanup feature:
The file system cleanup’s default setting is disabled
.
BOOT> unsetenv fs_clean_boot
BOOT> saveenv
BOOT> reset
or
BOOT> setenv fs_clean_boot 0
BOOT> saveenv
BOOT> reset
When you disable the file system cleanup feature, no files are deleted during the boot process. The following sample console output shows that the file system cleanup feature is disabled:
.... NVMRO: Write-enabled watchdog: Armed FPGA: Enabled FS Cleanup: Disabled POST: Enabled Firmware Image Status: Primary Bootstrap: UP TO DATE ....
We recommend that you disable file system cleanup before performing a Junos OS upgrade. If you enable file system cleanup, you cannot roll back Junos OS to a previous version, and in case of an upgrade failure, can result in a non-functioning router. By setting disabling file system cleanup, you maintain the option of having a recoverable rollback image available, if necessary.
Enabling File System Cleanup
When you enable the file system cleanup feature, certain unnecessary files are identified and deleted early in the boot process. To enable the file system cleanup feature to select and delete files:
BOOT> setenv fs_clean_boot 1
BOOT> saveenv
BOOT> reset
When you enable file system cleanup, temporary, log, and other unnecessary files are identified and deleted. The following sample console output shows that the file system cleanup feature is enabled:
.... NVMRO: Write-enabled watchdog: Armed FPGA: Enabled FS Cleanup: Enabled POST: Enabled Firmware Image Status: Primary Bootstrap: UP TO DATE .... WARNING: Autorecovery feature is not available as this system does not support a recovery partition Starting filesystem cleanup ... Done Loading configuration ... ....
This additional sample console output shows the file system cleanup feature is enabled with non-volatile memory read-only (NVMRO) switch enabled as well:
.... NVMRO: Read-only watchdog: Armed FPGA: Enabled FS Cleanup: Enabled POST: Enabled Firmware Image Status: Primary Bootstrap: UP TO DATE .... Remounting directory /cf/var/home: 5MBytes Preserving directory /cf/etc: 5MBytes Filesystem cleanup skipped - NVMRO Read-only Loading configuration ... ....
No files are deleted when NVMRO is set to Read-only
regardless of the fs_clean_boot setting.
After the system completes its boot process, you can review the list of removed files by reading the file_cleanup.log file:
root@ln1000% cat /var/tmp/file_cleanup.log
/cf/var/log/appidd /cf/var/log/bin_messages /cf/var/log/chassisd /cf/var/log/cosd /cf/var/log/dcd ..... /cf/var/tmp/policy_status /cf/var/tmp/rtsdb/if-rtsdb /cf/var/tmp/spu_kmd_init /cf/var/tmp/vpn_tunnel_orig.id root@ln1000%
To determine the value of the fs_clean_boot environmental variable using the CLI:
root@ln1000% sysctl kern.fs_clean_boot
kern.fs_clean_boot: 1 root@ln1000%
Removing Temporary IDP Package Installation Files
The fs_clean_boot option does not remove temporary files left over from the IDP security package installation. To remove the temporary files, run the separate IDP cleanup request after installing or upgrading the IDP package:
user@ln1000>request security idp storage-cleanup downloaded-files
Successfully deleted downloaded secdb files user@ln1000>