How to Use cisco show boot variable commit Command?
Selene Gong
The specific command cisco show boot variable commit is not officially documented in Cisco's command references. In Cisco IOS and IOS-XE environments, boot variables are typically managed using the boot system command and confirmed with show boot or show bootvar. Persistence is ensured by saving the configuration using write memory or copy running-config startup-config, rather than a dedicated commit subcommand.
This article explores how to view, modify, and troubleshoot Cisco boot variables, ensuring your device boots the correct image during restarts.
Understanding the Cisco Boot Variable
The boot variable instructs a Cisco device which IOS image(s) to load during startup. It may include multiple image paths, separated by semicolons, serving as fallback options in case the primary image fails.
To check the boot sequence or boot variables configured, use:
show boot
or
show bootvar
These commands show the current image(s) set to load at boot time. This is the most direct way to check your Cisco router’s boot sequence.
Example:
Router# show boot
BOOT variable = bootflash:cat4000-k8.7-6-6.bin;
CONFIG_FILE =
BOOTLDR =
Configuration register is 0x2102
show boot vs. show version
Feature
show boot / show bootvar
show version
Purpose
Displays configured boot image(s)
Shows currently running IOS image
Output example
BOOT variable = flash:ios-image.bin
System image file is "flash:c1900-universalk9..."
Use Case
Verifying what will boot on next reload
Verifying what is currently running
How to Show the Active Image in Cisco
To check which IOS image is actively running:
show version
Look for the line:
System image file is "flash:"
This confirms which image the router or switch booted into after the last reload.
How to Remove Boot Variable in Cisco
Boot variables can be removed using the following:
Enter configuration mode: configure terminal
Remove all boot system entries: no boot system
For Catalyst switches: no boot system switch all
Remove specific entries: no boot system flash bootflash:old-image.bin
Save the configuration: write memory
If you skip this step, changes will be lost on reboot.
Setting New Boot Variables
After cleaning existing entries or during an image upgrade, set new boot variables:
boot system flash:packages.conf
or for a specific image:
boot system flash bootflash:cat4500e-entservicesk9-mz.152-4.E7.bin
flash: vs. bootflash:
flash: — common in traditional IOS-based routers/switches
bootflash: — used in IOS-XE and modular systems (e.g., Catalyst 9000)
To list available storage:
dir /all
Saving the Configuration
Always save your changes after modifying boot settings:
end
write memory
or
copy running-config startup-config
Failing to do this means your device will revert to the previous boot settings on reload.
Cisco IOS Boot Process and Configuration Register
Boot variables work in conjunction with the configuration register (shown in show version). The default value 0x2102 instructs the device to use the boot system commands. Ensure it’s correctly set using:
show version | include Configuration register
If the boot variable is properly configured but not being used, verify the configuration register is not forcing ROMMON or ignoring the startup-config (0x2142).
How to Show Running Config on Cisco
To view the active configuration (including current boot system commands):
show running-config
Look for lines like:
boot system flash:packages.conf
This confirms the current boot variable within the live configuration.
FAQs about Cisco Boot Variables
Q1: How do I check the currently running IOS image on my Cisco device?
A: Use show version. The line “System image file is…” indicates the running image.
Q2: Why does my Cisco boot variable show multiple files?
A: Multiple entries allow fallback options. The device tries each listed file in order until one works.
Q3: What’s the difference between boot system flash: and boot system bootflash:?
A: The keyword reflects the storage naming convention. Use bootflash: on newer IOS-XE platforms.
Q4: Can I remove all boot system commands?
A: Yes. In global config mode, use no boot system. Don’t forget to save afterward.
Q5: What happens if I don’t save the configuration after editing boot variables?
A: The device will revert to its last saved configuration after a reboot, ignoring any unsaved changes.