Courseiva
SystemGlobal Config

boot system flash [filename]

Specifies the IOS image file on flash memory to load at next system boot, overriding the default boot sequence.

Definition: boot system flash [filename] is a Cisco IOS global config command. Specifies the IOS image file on flash memory to load at next system boot, overriding the default boot sequence.

Overview

The 'boot system flash [filename]' command is a global configuration command used on Cisco IOS devices to specify a particular IOS image file stored in flash memory that the router should load during the next boot cycle. This command overrides the default boot sequence, which typically loads the first valid IOS image found in flash. It is essential for network engineers who need to control which IOS version runs on a device, especially when multiple images are present, such as during an upgrade or rollback scenario.

The command directly affects the boot variable in the startup configuration, ensuring that the specified image is used persistently across reboots. This is critical in production environments where specific IOS versions are required for feature support, bug fixes, or compatibility with other network devices. Without this command, the router may boot an unintended image, leading to unexpected behavior or outages.

The command is typically used in conjunction with 'show flash' to list available images and 'show version' to verify the running image. It is also a key step in the IOS upgrade process, where after copying a new image to flash, you set it as the boot image and reload. The command requires global configuration mode, which is accessed from privileged EXEC mode (enable).

Changes take effect only after a reload, and the running configuration is not affected until the next boot. It is important to note that if the specified file does not exist or is corrupted, the router will fall back to the default boot sequence, which may cause boot failure if no valid image is found. Therefore, always verify the filename and ensure the image is intact using 'verify /md5 flash:[filename]'.

The command is part of the broader system configuration that includes boot system commands for other media like tftp or rom, but 'boot system flash' is the most common for local storage. Understanding this command is fundamental for CCNA and CCNP candidates as it appears in both exam topics and real-world network maintenance tasks.

Syntax·Global Config
boot system flash [filename]

When to Use This Command

  • Upgrading to a new IOS version by pointing to the new image file
  • Rolling back to a previous stable IOS version after a failed upgrade
  • Booting from a backup image when the primary image is corrupted
  • Selecting a specific IOS image for testing or compatibility requirements

Parameters

ParameterSyntaxDescription
filenameflash:filename.binSpecifies the IOS image file name stored in flash memory. The filename must include the full path (e.g., flash:c2960-lanbasek9-mz.150-2.SE11.bin). Common mistakes include omitting the 'flash:' prefix or misspelling the filename, which causes the router to ignore the command and use the default boot sequence.

Command Examples

Specify a single IOS image to boot

boot system flash c2960-lanbasek9-mz.150-2.SE11.bin

This command sets the router/switch to load the specified IOS image from flash on next boot. No immediate output is shown; the configuration is stored in running-config.

Configure multiple fallback boot images

boot system flash c2960-lanbasek9-mz.150-2.SE11.bin boot system flash c2960-lanbasek9-mz.122-55.SE12.bin

Multiple boot system commands can be entered. The device tries the first image; if it fails, it attempts the next. This provides redundancy.

Understanding the Output

This command does not produce immediate output. To verify the boot configuration, use 'show running-config | include boot system' or 'show boot'. The 'show boot' output displays the current boot path, the image to boot, and whether the configuration is saved.

A valid configuration shows the expected filename; missing or incorrect filenames will cause boot failure.

Configuration Scenarios

Upgrading IOS on a Cisco 4321 Router

A network engineer needs to upgrade the IOS on a Cisco 4321 router from version 16.3 to 16.9. After copying the new image to flash, they must configure the router to boot the new image on the next reload.

Topology

R1 (Single router, no topology needed)

Steps

  1. 1.Step 1: Verify the new image is in flash: Router# show flash:
  2. 2.Step 2: Enter global configuration mode: Router# configure terminal
  3. 3.Step 3: Set the boot image: Router(config)# boot system flash:isr4300-universalk9.16.09.06.SPA.bin
  4. 4.Step 4: Exit configuration mode: Router(config)# exit
  5. 5.Step 5: Save the configuration: Router# write memory
  6. 6.Step 6: Reload the router: Router# reload
Configuration
! Enter global config
configure terminal
! Specify boot image
boot system flash:isr4300-universalk9.16.09.06.SPA.bin
! Exit and save
end
write memory

Verify: After reload, use 'show version' to confirm the new image is running. Expected output includes 'System image file is "flash:isr4300-universalk9.16.09.06.SPA.bin"'.

Watch out: Forgetting to save the configuration with 'write memory' before reload will cause the router to boot the old image, as the boot command is stored in the startup config.

Rolling Back to a Previous IOS on a Catalyst 2960 Switch

After an IOS upgrade, a switch experiences instability. The engineer needs to roll back to the previous stable IOS image that is still present in flash.

Topology

SW1 (Single switch, no topology needed)

Steps

  1. 1.Step 1: List images in flash: SW1# show flash:
  2. 2.Step 2: Identify the old image (e.g., c2960-lanbasek9-mz.150-2.SE11.bin)
  3. 3.Step 3: Enter global config: SW1# configure terminal
  4. 4.Step 4: Remove the current boot statement: SW1(config)# no boot system flash:new-image.bin
  5. 5.Step 5: Add the old image: SW1(config)# boot system flash:c2960-lanbasek9-mz.150-2.SE11.bin
  6. 6.Step 6: Exit and save: SW1(config)# end; SW1# write memory
  7. 7.Step 7: Reload: SW1# reload
Configuration
! Remove current boot entry
configure terminal
no boot system flash:new-image.bin
! Set old image
boot system flash:c2960-lanbasek9-mz.150-2.SE11.bin
end
write memory

Verify: After reload, use 'show version' to verify the old image is running. Also check 'show boot' to see the configured boot variables.

Watch out: If the old image was deleted during the upgrade, the rollback will fail. Always keep at least one backup image in flash before upgrading.

Troubleshooting with This Command

When troubleshooting boot issues, the 'boot system flash' command is often the first place to look. Healthy output from 'show boot' or 'show running-config | include boot system' will show a single boot statement pointing to a valid image. Problem indicators include multiple boot statements (which can cause confusion), a missing boot statement (meaning the router uses default behavior), or a boot statement pointing to a non-existent file.

Common symptoms that this command helps diagnose include the router booting into ROMmon (ROMMON) mode, which indicates no valid IOS image was found. In such cases, check the boot variable using 'show bootvar' or 'show boot'. If the boot statement is incorrect, correct it from ROMMON by manually booting the correct image using 'boot flash:[filename]' and then reconfigure the boot system command.

Another symptom is the router loading an unexpected IOS version; this often happens when multiple boot statements exist and the first one fails, causing the router to try the next. To fix, remove all boot statements and add only the desired one. A step-by-step diagnostic flow: 1) Check the current boot configuration with 'show running-config | include boot system'. 2) Verify the image exists in flash with 'show flash:'. 3) If the image is missing, copy it to flash via tftp or usb. 4) If the image exists but the boot statement is wrong, correct it. 5) Save and reload.

Correlate with 'show version' to see the running image and 'dir flash:' to list files. Debug commands like 'debug boot' can provide real-time boot process details but are rarely needed. Always ensure the image is not corrupted by using 'verify /md5 flash:[filename]' and comparing the hash with the Cisco download page.

In summary, the 'boot system flash' command is a critical troubleshooting tool for ensuring the correct IOS loads, and its misconfiguration is a common cause of boot failures.

CCNA Exam Tips

1.

Remember that 'boot system flash' overrides the default boot sequence; if the specified file is missing, the device may not boot.

2.

The command is entered in global configuration mode; changes take effect after 'copy running-config startup-config' and reload.

3.

CCNA may test the difference between 'boot system flash' (specific file) and 'boot system flash' without filename (first valid image).

4.

Know that multiple 'boot system' commands create a fallback list; order matters.

Common Mistakes

Typing the filename incorrectly (case-sensitive on some platforms) causing boot failure.

Forgetting to save the configuration with 'copy running-config startup-config' before reload.

Using 'boot system flash' without a filename when intending to specify a particular image.

boot system flash [filename] vs reload

These two commands are commonly confused because both influence which IOS image runs on the next boot, but they operate at different stages: one configures the boot path, the other triggers the actual reboot that uses that configuration.

Aspectboot system flash [filename]reload
ScopeSets next boot image in flashTriggers immediate or scheduled reboot
Configuration modeGlobal configurationPrivileged EXEC
PersistenceSaved to startup-config (if 'write memory' issued)Does not change configuration; ephemeral action
PrecedenceOverrides default boot sequence if presentUses current boot parameters; no effect on boot order
Typical usePrepare device to load a specific IOS after next reloadRestart device to apply new config or boot image

Use boot system flash [filename] when you need to permanently change the IOS image loaded at the next startup, overriding the default.

Use reload when you want to restart the device immediately or at a scheduled time to apply a new configuration or switch to a different boot image.

Platform Notes

In IOS-XE (e.g., on ISR 4000 series), the command syntax is identical, but the flash file system may be named 'flash0:' or 'flash1:' on dual-flash systems. Use 'show file systems' to identify the correct flash device. On NX-OS (e.g., Nexus switches), the equivalent command is 'boot nxos bootflash:[filename]' in global configuration mode.

For example: 'boot nxos bootflash:nxos.7.0.3.I7.8.bin'. On ASA firewalls, the command is 'boot system disk0:/[filename]' or 'boot system flash:/[filename]' depending on the model. In IOS-XR (e.g., ASR 9000), the boot variable is set differently using 'boot system [location] [filename]' in admin configuration mode.

There are no significant differences between IOS 12.x, 15.x, and 16.x for this command, but in newer versions, the 'boot system' command may also support URLs for remote images. Always check the specific platform documentation for exact syntax.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions