Search This Blog


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 system flash (directory of 1st IOS to load)
boot system flash (directory of 2nd IOS to load)

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:

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.

Explanation of bootldr

loading a new image from rommon

After deleting old ios version you might need to run the squeeze command to free space.

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 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

No comments:

Post a Comment