![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rebooting and Reloading - Configuring Image Loading Characteristics
![]() |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contents
Rebooting and Reloading - Configuring Image Loading CharacteristicsLast Updated: November 30, 2011
The basic processes completed by a Cisco device (such as a router) when it reboots can be specifically configured to improve function and performance by using the ROM monitor. Finding Feature InformationYour software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Rebooting and Reloading Procedures
Restrictions for Rebooting and Reloading Procedures
Information About Rebooting and Reloading Procedures
Determination of Configuration File the Router Uses for StartupOn all platforms except Class A Flash file system platforms:
On Class A Flash file system platforms:
Problems can include a bad checksum for the information in NVRAM or an empty NVRAM with no configuration information. For more information on environment variables, refer to the "Setting the BOOTLDR Environment Variable " section. Determination of Image File the Router Uses for StartupWhen a router is powered on or rebooted, the following events happen:
When the boot field is 0x102 through 0x10F, the router goes through each bootsystem command in order until it boots a valid image. If bit 13 in the configuration register is set, each command will be tried once (bit 13 is indicated by the position occupied by b in the following hexadecimal notation: 0xb 000). If bit 13 is not set, the bootsystem commands specifying a network server will be tried up to five more times. The timeouts between each consecutive attempt are 2, 4, 16, 256, and 300 seconds. If the router cannot find a valid image, the following events happen:
When looking for a bootable file in Flash memory:
The figure below illustrates the basic booting decision process. How the Router Uses the Boot FieldThe lowest four bits of the 16-bit configuration register (bits 3, 2, 1, and 0) form the boot field. The following boot field values determine if the router loads an operating system and where it obtains the system image:
When loading a default system image from a network server, the router uses the configuration register settings to determine the default system image filename for booting from a network server. The router forms the default boot filename by starting with the word cisco and then appending the octal equivalent of the boot field number in the configuration register, followed by a hyphen (-) and the processor type name (cisconn-cpu). See the appropriate hardware installation guide for details on the configuration register and the default filename. Hardware Versus Software Configuration Register Boot FieldsYou modify the boot field from either the hardware configuration register or the software configuration register, depending on the platform. Most platforms have use a software configuration register. Refer to your hardware documentation for information on the configuration register for your platform. The hardware configuration register can be changed only on the processor card with dual in-line package (DIP) switches located at the back of the router. For information on modifying the hardware configuration register, refer to the appropriate hardware installation guide. Environment VariablesBecause many platforms can boot images from several locations, these systems use special ROM monitor environment variables to specify the location and filename of images that the router is to use. In addition, Class A Flash file systems can load configuration files from several locations and use an environment variable to specify startup configurations:
BOOT Environment VariableThe BOOT environment variable specifies a list of bootable system images on various file systems. After you save the BOOT environment variable to your startup configuration, the router checks the variable upon startup to determine the device and filename of the image to boot. The router tries to boot the first image in the BOOT environment variable list. If the router is unsuccessful at booting that image, it tries to boot the next image specified in the list. The router tries each image in the list until it successfully boots. If the router cannot boot any image in the BOOT environment variable list, the router attempts to boot the boot image. If an entry in the BOOT environment variable list does not specify a device, the router assumes the device is tftp. If an entry in the BOOT environment variable list specifies an invalid device, the router skips that entry. BOOTLDR Environment VariableThe BOOTLDR environment specifies the Flash file system and filename containing the boot image that the ROM monitor uses if it cannot find a valid system image. In addition, a boot image is required to boot the router with an image from a network server. You can change the BOOTLDR environment variable on platforms that use a software boot image rather than boot ROMs. On these platforms, the boot image can be changed without having to replace the boot ROM. This environment variable allows you to have several boot images. After you save the BOOTLDR environment variable to your startup configuration, the router checks the variable upon startup to determine which boot image to use if the system cannot be loaded.
CONFIG_FILE Environment VariableFor Class A Flash file systems, the CONFIG_FILE environment variable specifies the file system and filename of the configuration file to use for initialization (startup). Valid file systems can include nvram:, bootflash:, slot0:, and slot1:. Refer to the "Managing Configuration Files" chapter for more information on devices. After you save the CONFIG_FILE environment variable to your startup configuration, the router checks the variable upon startup to determine the location and filename of the configuration file to use for initialization. The router uses the NVRAM configuration during initialization when the CONFIG_FILE environment variable does not exist or when it is null (such as at first-time startup). If the router detects a problem with NVRAM or a checksum error, the router enters setup mode. Controlling Environment VariablesAlthough the ROM monitor controls environment variables, you can create, modify, or view them with certain commands. To create or modify the BOOT, BOOTLDR, and CONFIG_FILE environment variables, use the bootsystem, bootbootldr, and bootconfig global configuration commands, respectively. Refer to the "Specify the Startup System Image in the Configuration File" section in the "Loading and Maintaining System Images" book for details on setting the BOOT environment variable. Refer to the "Specify the Startup Configuration File" section in the "Managing Configuration Files" chapter of this document for details on setting the CONFIG_FILE variable. You can view the contents of the BOOT, BOOTLDR, and the CONFIG_FILE environment variables by issuing the showbootvar command. This command displays the settings for these variables as they exist in the startup configuration as well as in the running configuration if a running configuration setting differs from a startup configuration setting. Use the morenvram:startup-config command to display the contents of the configuration file pointed to by the CONFIG_FILE environment variable. Manually Loading a System Image from ROM MonitorIf your router does not find a valid system image, or if its configuration file is corrupted at startup, or the configuration register is set to enter ROM monitor mode, the system enters ROM monitor mode. From this mode, you can manually load a system image from the following locations:
You may only boot from a location if the router can store an image there. Therefore, not all platforms can manually load from these locations. You can also enter ROM monitor mode by restarting the router and then pressing the Break key or issuing a "send break" command from a telnet session during the first 60 seconds of startup. Aliasing ROM Monitoring CommandsThe ROM monitor supports command aliasing modeled on the aliasing function built into the Korn shell. The alias command is used to set and view aliased names. This allows the user to alias command names to a letter or word. Aliasing is often used to shorten command names or automatically invoke command options. Aliases are stored in NVRAM and remain intact across periods of no power. These are some of the set aliases:
The following example shows a pre-aliased menu-type list for ROMMON commands:
> ?
$ state Toggle cache state (? for help)
B [filename] [TFTP Server IP address | TFTP Server Name]
Load and execute system image from ROM or from TFTP server
C [address] Continue execution [optional address]
D /S M L V Deposit value V of size S into location L with modifier M
E /S M L Examine location L with size S with modifier M
G [address] Begin execution
H Help for commands
I Initialize
K Stack trace
L [filename] [TFTP Server IP address | TFTP Server Name]
Load system image from ROM or from TFTP server, but do not
begin execution
O Show configuration register option settings
P Set the break point
S Single step next instruction
T function Test device (? for help)
Deposit and Examine sizes may be B (byte), L (long) or S (short).
Modifiers may be R (register) or S (byte swap).
Register names are: D0-D7, A0-A6, SS, US, SR, and PC
If your options appear in the above menu-type format, you can use the listed aliased commands. To initialize the router or access server, enter the i command. The i command causes the bootstrap program to reinitialize the hardware, clear the contents of memory, and boot the system. To boot the system image file, use the b command. The ROM monitor software characteristics will vary depending on your platform. For further details on ROM monitor mode commands, refer to the appropriate hardware installation guide, or perform a search on Cisco.com. How to Configure Rebooting and Reloading Procedures
Displaying Boot InformationTo display information about system software, system image files, and configuration files, complete the tasks in this section: DETAILED STEPS Modifying the Configuration Register Boot FieldTo modify the configuration register boot field to determine whether the router loads an operating system image, and if so, where it obtains this system image, complete the tasks in this section: DETAILED STEPS
ExamplesIn the following example, the showversion command indicates that the current configuration register is set so that the router does not automatically load an operating system image. Instead, it enters ROM monitor mode and waits for user-entered ROM monitor commands. The new setting instructs the router to a load a system image from commands in the startup configuration file or from a default system image stored on a network server. Router1# show version Cisco IOS (tm) Software 4500 Software (C4500-J-M), Version 11.1(10.4), RELEASE SOFTWARE Copyright (c) 1986-1997 by Cisco Systems, Inc. Compiled Mon 07-Apr-97 19:51 by lmiller Image text-base: 0x600088A0, data-base: 0x60718000 ROM: System Bootstrap, Version 5.1(1), RELEASE SOFTWARE (fc1) FLASH: 4500-XBOOT Bootstrap Software, Version 10.1(1), RELEASE SOFTWARE (fc1) Router1 uptime is 6 weeks, 5 days, 2 hours, 22 minutes System restarted by error - a SegV exception, PC 0x6070F7AC System image file is "c4500-j-mz.111-current", booted via flash cisco 4500 (R4K) processor (revision 0x00) with 32768K/4096K bytes of memory. Processor board ID 01242622 R4600 processor, Implementation 32, Revision 1.0 G.703/E1 software, Version 1.0. Bridging software. SuperLAT software copyright 1990 by Meridian Technology Corp). X.25 software, Version 2.0, NET2, BFE and GOSIP compliant. TN3270 Emulation software (copyright 1994 by TGV Inc). Basic Rate ISDN software, Version 1.0. 2 Ethernet/IEEE 802.3 interfaces. 2 Token Ring/IEEE 802.5 interfaces. 4 ISDN Basic Rate interfaces. 128K bytes of non-volatile configuration memory. 8192K bytes of processor board System flash (Read/Write) 4096K bytes of processor board Boot flash (Read/Write) Configuration register is 0x2100 Router1# configure terminal Router1(config)# config-register 0x210F Router1(config)# end Router1# reload Setting the BOOTLDR Environment VariableTo set the BOOTLDR environment variable, complete the tasks in this section: ExamplesThe following example sets the BOOTLDR environment to change the location of the boot helper image from internal Flash to slot 0: Router# dir bootflash: -#- -length- -----date/time------ name 1 620 May 04 1995 26:22:04 rsp-boot-m 2 620 May 24 1995 21:38:14 config2 7993896 bytes available (1496 bytes used) Router# configure terminal Router (config)# boot bootldr slot0:rsp-boot-m Router (config)# end Router# copy system:running-config nvram:startup-config [ok] Router# show bootvar BOOT variable = slot0:rsp-boot-m CONFIG_FILE variable = nvram: Current CONFIG_FILE variable = slot0:router-config Configuration register is 0x0 Scheduling a Reload of the System ImageTo schedule a reload of the system image to occur on the router at a later time (for example, late at night or during the weekend when the router is used less) or to synchronize a reload network-wide (for example, to perform a software upgrade on all routers in the network), complete the task in this section.
DETAILED STEPS
ExamplesThe following example illustrates how to use the reload command to reload the software on the router on the current day at 7:30 p.m.:
Router# reload at 19:30
Reload scheduled for 19:30:00 UTC Wed Jun 5 1996 (in 2 hours and 25 minutes)
Proceed with reload? [confirm]
The following example illustrates how to use the reload command to reload the software on the router at a future time:
Router# reload at 02:00 jun 20
Reload scheduled for 02:00:00 UTC Thu Jun 20 1996 (in 344 hours and 53 minutes)
Proceed with reload? [confirm]
Displaying Information about a Scheduled ReloadTo display information about a previously scheduled reload or to determine if a reload has been scheduled on the router, complete the task in this section: DETAILED STEPS
Cancelling a Scheduled ReloadEntering ROM Monitor ModeDuring the first 60 seconds of startup, you can force the router to stop booting. The router will enter ROM monitor mode, where you can change the configuration register value or boot the router manually. To stop booting and enter ROM monitor mode, complete the tasks in this section: DETAILED STEPS
What to Do NextIf you are planning to use ROM monitor mode on a regular basis, or wish users to load using ROM monitor commands, you can configure the system to default to ROMMON. To automatically boot your system in ROM monitor mode, reset the configuration register to 0x0 by using the config-register0x0configuration command. The new configuration register value, 0x0, takes effect after the router or access server is rebooted with the reload command. If you set the configuration to 0x0, you will have to manually boot the system from the console each time you reload the router or access server. To exit ROMMON mode, use the continue command. If you have changed the configuration, use the copyrunning-configstartup-configcommand and then issue the reload command to save your configuration changes. Manually Booting from Flash Memory in ROMMONTo manually boot from Flash memory, complete the tasks in Step 1, 2, and 3, and then one of the commands in Step 4:
DETAILED STEPS
ExamplesIn the following example, a router is manually booted from Flash memory. Because the optional filename argument is absent, the first valid file in Flash memory is loaded.
> boot flash
F3: 1858656+45204+166896 at 0x1000
Booting gs7-k from flash memory RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR [OK -
1903912/13765276 bytes]
F3: 1858676+45204+166896 at 0x1000
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
In the following example, the bootflashcommand is used with the filename gs7-k--the name of the file that is loaded:
> boot flash gs7-k
F3: 1858656+45204+166896 at 0x1000
Booting gs7-k from flash memory RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
RRRRRRRRRRRRRR [OK - 1903912/13765276 bytes]
F3: 1858676+45204+166896 at 0x1000
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
System Bootstrap, Version 4.6(1012) [mlw 99], INTERIM SOFTWARE
Copyright (c) 1986-1992 by cisco Systems
RP1 processor with 16384 Kbytes of memory
The following command instructs the ROM monitor to boot the first file in the first partition of internal Flash memory:
>
boot flash:
This command instructs the ROM monitor to boot the first file in the second partition of the Flash memory card in slot 0:
>
boot slot0:2:
In this example, the ROM monitor boots the file named image name from the third partition of the Flash memory card in slot 0:
>
boot slot0:3:imagename
The following command fails to specify a valid device type (flash:, slot0:, or slot1:), so the ROM monitor invokes the boot helper to boot a system image.
>
boot flash
Manually Booting from a Network File in ROMMON
SUMMARY STEPS
DETAILED STEPS
Manually Booting from ROM in ROMMON
SUMMARY STEPS
DETAILED STEPS
Manually Booting Using MOP in ROMMONYou can interactively boot system software using MOP. Typically, you do this to verify that system software has been properly installed on the MOP boot server before configuring the router to automatically boot the system software image. To manually boot the router using MOP, complete the task in this section: DETAILED STEPS
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R) Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. © 2011 Cisco Systems, Inc. All rights reserved.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||