08-27-2015 08:15 AM - edited 03-05-2019 02:10 AM
hi guys,
i would like to clarify some of the Configuration Register codes please.
Router bootup process, as far I understand consists of 3 stages :
1. POST is performed first, next the bootstrap program is loaded from ROM in to RAM for CPU execution. Main tasks of bootstrap are locating the IOS and Startup Configuration.
2. The bootstrap program searches for the IOS file (peer default on Flash). If it fails it will load a limited IOS.
3. Next the bootstrap program searches for the Startup Config file ( default location NVRAM) . If it fails to locate it, it will enter Setup Mode.
This happens (if got it right ,if not please free to correct me if wrong) when the Configuration Register value is set to 0x2101.
Now when I look at the following document http://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/50421-config-register-use.html
I don't understand for example the code 0x2101 and it's meaing :
what does it mean "Boots into bootstrap" ? Next they say "Boots into ROM if initial boot fails" so if the router won;t be able to boot into bootstrap it will boot into ROM (do they mean the limited IOS) ?
please assist
Thank you and best regards
Adam
Solved! Go to Solution.
08-28-2015 02:18 AM
Hi Adam,
1). If ROMMON fails to locate / load the IOS from Flash the device returns to ROMMON. So in case this happens it will not look for (and load) the startup configuration, correct ?
Correct. ROMMON is not an IOS and in general, it does not understand the configuration commands in the startup-config.
2). Is there anyway to configure the Configuration Register settings so, that in case we fail to locate / load the IOS from Flash it will search (as an alternative) say a TFTP Server for the IOS ? From looking at the codes i would say no, but just asking maybe there is anyway to achieve this.
I believe that this depends both on the configuration register whose boot field must be from 2 to F inclusive, and on the configuration of the boot system commands in the configuration file. Some ROMMONs perhaps have access to the startup-config to at least interpret these commands, some other ROMMONs I am sure of store this setting in a separate environment variable that is set whenever you do copy running-config startup-config and which is accessible to ROMMON. I believe that the docs I've referenced in my previous post are mentioning a possibility of defining a list of IOSes that are to be attempted to be loaded, and if one fails, perhaps the ROMMON will try to load the next one including TFTP if the boot system says so.
But I do not remember seeing real routers set to their default configuration attempting to contact TFTP when the IOS load has failed. My personal experience (which is not to be taken as a rule!) is that these routers simply give up trying to load the IOS from FLASH and fall back to ROMMON.
3). While in ROMMON is there any way that i can manually force /re-try to load the IOS ?
Commands boot and reset can be used for that.
Best regards,
Peter
08-27-2015 10:31 AM
Hi Adam,
1. POST is performed first, next the bootstrap program is loaded from ROM in to RAM for CPU execution. Main tasks of bootstrap are locating the IOS and Startup Configuration.
Instead of calling it a "bootstrap" even though that might be an official Cisco name, I would rather call it simply ROM Monitor, or ROMMON. The "bootstrap" has a rather specific meaning which, however, is not clearly used even in Cisco documentation itself - they use it to describe different and differing pieces of software related to booting a device. It's a mess.
This is probably the best explanation of the different boot <something> names I've found;
2. The bootstrap program searches for the IOS file (peer default on Flash). If it fails it will load a limited IOS.
Yes, however, on many recent platforms, there is no limited IOS present on a device. If loading IOS from FLASH fails, the router will drop back into ROMMON mode (this is the basic environment stored in ROM but it is not IOS - you could compare it to BIOS in a certain way).
3. Next the bootstrap program searches for the Startup Config file ( default location NVRAM) . If it fails to locate it, it will enter Setup Mode.
Usually, this is not done by bootstrap (or whatever that is) but rather by the IOS that has booted. I'd describe the sequence for recent platforms as follows:
what does it mean "Boots into bootstrap" ? Next they say "Boots into ROM if initial boot fails" so if the router won;t be able to boot into bootstrap it will boot into ROM (do they mean the limited IOS) ?
That text is outdated. It was valid for very old platforms such as Cisco 2500 series routers that ran IOS directly from their FLASH instead of copying it into RAM and unpacking it, and that had a special limited IOS (called RxBoot) stored directly in their ROM. During normal operation, the IOS in the FLASH could not be upgraded because its code was constantly accessed. To upgrade the IOS on these platforms, you had to reboot using the configuration register value of 0x2101 where the RxBoot IOS was loaded, leaving the FLASH unused. You could then upgrade the IOS in the FLASH, put the register back to 0x2102, reload, and start the new IOS from the FLASH.
See here:
http://www.cisco.com/c/en/us/support/docs/routers/2500-series-routers/10252-13.html
On newer platforms, there is no RxBoot nor any other IOS stored in the ROM. Setting the configuration register to 0x2101 usually tells these routers to boot the first IOS in the FLASH they can find, and values from 0x2102 up to 0x210F direct the routers to observe the boot system commands in the configuration file.
If you want your head to start spinning, read this:
Best regards,
Peter
08-28-2015 01:41 AM
Hi Peter,
Thank you taking time to answer my question and yes in fact, it's a mess (in netacad they call it bootstrap) but I got the understanding for it now.
Just let me ask you this.
1). If ROMMON fails to locate / load the IOS from Flash the device returns to ROMMON. So in case this happens it will not look for (and load) the startup configuration, correct ?
2). Is there anyway to configure the Configuration Register settings so, that in case we fail to locate / load the IOS from Flash it will search (as an alternative) say a TFTP Server for the IOS ? From looking at the codes i would say no, but just asking maybe there is anyway to achieve this.
3). While in ROMMON is there any way that i can manually force /re-try to load the IOS ?
ok, your link provide the answer already :)
Best regards and have a great day Peter !
Adam
08-28-2015 02:18 AM
Hi Adam,
1). If ROMMON fails to locate / load the IOS from Flash the device returns to ROMMON. So in case this happens it will not look for (and load) the startup configuration, correct ?
Correct. ROMMON is not an IOS and in general, it does not understand the configuration commands in the startup-config.
2). Is there anyway to configure the Configuration Register settings so, that in case we fail to locate / load the IOS from Flash it will search (as an alternative) say a TFTP Server for the IOS ? From looking at the codes i would say no, but just asking maybe there is anyway to achieve this.
I believe that this depends both on the configuration register whose boot field must be from 2 to F inclusive, and on the configuration of the boot system commands in the configuration file. Some ROMMONs perhaps have access to the startup-config to at least interpret these commands, some other ROMMONs I am sure of store this setting in a separate environment variable that is set whenever you do copy running-config startup-config and which is accessible to ROMMON. I believe that the docs I've referenced in my previous post are mentioning a possibility of defining a list of IOSes that are to be attempted to be loaded, and if one fails, perhaps the ROMMON will try to load the next one including TFTP if the boot system says so.
But I do not remember seeing real routers set to their default configuration attempting to contact TFTP when the IOS load has failed. My personal experience (which is not to be taken as a rule!) is that these routers simply give up trying to load the IOS from FLASH and fall back to ROMMON.
3). While in ROMMON is there any way that i can manually force /re-try to load the IOS ?
Commands boot and reset can be used for that.
Best regards,
Peter
08-28-2015 05:17 AM
Thank you Peter !
Your answers helped me a lot !
Best Regards
Adam
08-28-2015 05:22 AM
Adam,
Always a pleasure!
Best regards,
Peter
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide