Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Accelerating the LN Series Router Boot-Up Process

    Power-on self test (POST) diagnostic tests run automatically on the LN Series routers as a standard part of the boot-up process at every power on, reset, or warm reboot. To minimize the time required for an LN Series router to become operational, you can configure these two BOOT features to accelerate the startup process:

    • Disable or enable power-on self test (POST) using the no_run_post command.
    • Disable or enable file system cleanup using the fs_clean_boot command.

    Best Practice: We recommend that you use the no_run_post and the fs_clean_boot commands 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.

    • To disable the POST feature and quicken the boot-up process:
      BOOT> setenv no_run_post 1
      BOOT> saveenv
      BOOT> reset

      Note: 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 with 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...
      
    • To enable the POST feature and run the full set of POST diagnostic tests during the boot-up process:
      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
      ....
      
    • To disable the file system cleanup feature and quicken the boot-up process:
      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, selected files are not deleted early on 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
      ....
      

      Best Practice: 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.

    • Before you enable the file system cleanup feature to remove old system files and clean up storage, you can generate and preview a list of files to delete by entering the storage_cleanup list_delete -all command:
      root@ln1000% /usr/libexec/ui/storage_cleanup list_delete -all
      List of files to delete:
      ls: /cf/packages/junos.old: No such file or directory
         Size Date         Name
         910B Dec 13 23:06 /cf/var/crash/flowd_octeon_hm.log.md-ln4-2.0
         910B Dec 13 23:11 /cf/var/crash/flowd_octeon_hm.log.md-ln4-2.1
          11B Dec 13 23:10 /cf/var/jail/tmp/alarmd.ts
         153B Dec 13 23:10 /cf/var/log/wtmp.0.gz
        4011B Dec 13 23:10 /cf/var/tmp/cleanup-pkgs.log
        1997B Dec 13 23:05 /cf/var/tmp/file_cleanup.log
       124.0K Dec 13 23:09 /cf/var/tmp/gres-tp/env.dat
           0B Dec 13 23:06 /cf/var/tmp/gres-tp/lock
           4B Dec 13 23:11 /cf/var/tmp/idp_license_info
         155B Dec 13 23:10 /cf/var/tmp/krt_gencfg_filter.txt
          30B Dec 13 23:11 /cf/var/tmp/policy_status
           0B Dec 13 23:10 /cf/var/tmp/rtsdb/if-rtsdb
           0B Dec 13 23:05 /cf/var/tmp/spu_kmd_init
           0B Dec 13 23:11 /cf/var/tmp/vpn_tunnel_orig.id
      -------
       132.0K
      root@ln1000%
      
    • 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, the old system files are removed and storage is cleaned out. 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 ...
      ....
      

      After the cleanup files have been deleted, you can review the list of removed files by reading the file_cleanup.log file:

      root@ln1000% cat /var/tmp/file_cleanup.log
      /cf/etc/namedb/named.root
      /cf/etc/namedb/resolver.cache
      /cf/etc/namedb/rndc.key
      /cf/var/crash/flowd_octeon_hm.log.md-ln4-2.0
      /cf/var/jail/etc/auth.conf
      /cf/var/jail/etc/group
      ..... 
      /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%
      

    Note: The fs_cleanup 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>

    Published: 2014-02-19