Search This Blog

2010-07-08

Changing Boot Order of Cisco IOS (Backup IOS)

It's always a good idea to have a backup IOS on your cisco device in case anything does go wrong and you want something to easily revert back to. Also, if the device fails in production you always have something to fall back on and will make the reinstall/fix process a whole lot easier.

To change the boot sequence you use a boot-start-marker and boot-end-marker. These commands basically form an ordered list in which the IOSes should load.

The following commands will create a boot list:

boot-start-marker
boot system flash (directory of 1st IOS to load)
boot system flash (directory of 2nd IOS to load)
boot-end-marker

The next step is to change the config-register to tell it to use the boot variable from the list you just created:
config-register to 0x2102

Write the config to apply changes:
wr OR copy run start

In some IOSes/devices you can check to see if the boot variables are set properly using the command:
show boot var

Once finished:
reload

Once reload is done, you can check to make sure you're running the correct IOS by doing a:
show ver

After deleting old ios version you might need to run the squeeze command to free space.
http://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/23233-sw-upgrade-highendrouters-23233.html

Explanation of bootldr
https://supportforums.cisco.com/discussion/11263696/diff-bw-boot-system-and-boot-bootldr-command

loading a new image from rommon
http://www.cisco.com/c/en/us/td/docs/ios/12_2/configfun/command/reference/ffun_r/frf010.html

After deleting old ios version you might need to run the squeeze command to free space.
http://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/23233-sw-upgrade-highendrouters-23233.html

Show bootvar will show you all the information that is stored in config to tell the device how it will boot up next time.

blrlab-ubr10k#show bootvar
BOOT variable = ubr10k2-k9p6u2-mz.122-33.SCC6.bin,1;ubr10k2-k9p6u2-mz.122-33.SCE2.bin,1;
CONFIG_FILE variable does not exist
BOOTLDR variable = bootflash:c10k2-eboot-mz.123-7.XI10a.bin
Configuration register is 0x2102

Standby is not up.


Example configuration:

boot-start-marker
boot system flash ubr10k2-k9p6u2-mz.122-33.SCC6.bin
boot system flash ubr10k2-k9p6u2-mz.122-33.SCE2.bin
boot bootldr bootflash:c10k2-eboot-mz.123-7.XI10a.bin
boot-end-marker

No comments:

Post a Comment