Catalyst 9200, Upgrading IOS-XE 16.9.2 onward (Install Mode)

UPDATE! For 9200 when you get to 17.3.x Catalyst 9200, Upgrading IOS-XE Amsterdam 17.3.x (Install Mode)

For the 9300 upgrade procedure! Catalyst 9300 Upgrading IOS-XE 16.6.2 onward (Install Mode)

Want to be part of a monthly newsletter covering Cloud, Digital Transformation, and Web3? Check out Apronomics: December, 2022

If you would like to skip to the code used to upgrade the switch, scroll to Appendix A.

First, check to see what mode your switch is running in. The preferred mode is INSTALL mode. In my case, it is running in BUNDLE mode.

We will switch the running mode of the switch during the upgrade process.

Prepare the switch to accept the new IOS-XE image by freeing up some storage.

Step 1. Remove Unwanted Packages
C9200#install remove inactive

Step 2. Copy New Image to Flash
C9200#copy usbflash1:cat9k_lite_iosxexxx.bin flash:

Step 3. Set Boot Variable
C9200(config)#boot system flash:packages.conf
C9200(config)#end
C9200#wr
C9200#show boot system

Step 4. Software Install Image to Flash
C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate commit

After hitting ‘y’, you will be asked to confirm that you have changed the boot config to packages.conf. You should have done this in Step 3.

Confirm by hitting ‘y’. Your screen will produce a similar output and requires a reload.

It will take a couple of minutes to reload. After the reload, you can confirm your running mode, version and pkg files are in your flash directory.

Step 5. Verify New Packages and Image after reload
C9200#dir flash:*.pkg

Step 6. Check Version and New Bootloader
C9200#show version
C9200#show boot

Note: Previously the 9200 was running in BUNDLE mode. After the reload, it is running in INSTALL mode.

Step 7. Clean up
C9200#install remove inactive

Hope that this helps.

Mike

Appendix A
Step 1. Remove Unwanted Packages
C9200K#install remove inactive
Step 2. Copy New Image to Flash
C9200K#copy usbflash1:cat9k_lite_iosxexxx.bin flash:
Step 3. Set Boot Variable
C9200K(config)#boot system flash:packages.conf
C9200K (config)#end
C9200K#wr
C9200K#show boot system
Step 4. Software Install Image to Flash
C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate commit
Step 5. Verify New Packages and Image after reload
C9200K#dir flash:*.pkg
Step 6. Check Version and New Bootloader
C9200K#show version
C9200K#show boot

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9200/software/release/16-9/configuration_guide/sys_mgmt/b_169_sys_mgmt_9200_cg/performing_setup_configuration.html#id_57156

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9200/software/release/16-12/release_notes/ol-16-12-9200.html#id_67619

21 thoughts on “Catalyst 9200, Upgrading IOS-XE 16.9.2 onward (Install Mode)

  1. Hi,
    Great article!!!
    Any idea how Cisco would remove unwanted packages. I mean what is mechanism? Is it mandatory to execute this command in beginning What if new IOS does not goes well and this command already removed unwanted packages.

    Like

    1. Hi, thanks for the support!

      The ‘install remove inactive’ will never remove the image that the switch is currently booted to. This command is simply a macro. You can still delete the image from flash manually.

      Like

  2. so I have a bunch of 9500/9300/9200L coming into the environment with all kinds of images, I am looking on how to automate the image upgrade but it just seems that there’s so many variables, INSTALL MODE/BUNDLE MODE [some have no mode now on 17.x?], Is there a document somewhere that shows, from 16.x and onward use this method to ugprade, before that use this other method, or is there a default method?

    Like

    1. Hi Ed, I wouldn’t over think things here. Most if not all images are shipping with Install Mode on Cat9Ks. There is only one new command in 17.x. you can review the proceeedure below. In regards to automating the upgrades, open source tools like Ansible and Python. The alternative is Cisco DNA Center if it’s in your environment. I’m not aware of the “no mode” you mentioned. Could you post the source of that information for me to review?
      17.x upgrade – https://apronets.com/2021/08/31/catalyst-9200-upgrading-ios-xe-amsterdam-17-3-x-install-mode/

      Like

  3. Basir

    Hi
    C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate commit

    What if I don’t want it to RELOAD at that time, but later. Is it possible?

    Like

    1. Hi Basir,
      Yes, It’s possible to defer a reload. You will want to remove the ‘commit’ key word Step 4. of the syntax. So it should read as the below.

      Step 4. Software Install Image to Flash
      C9200K#install add file flash: cat9k_lite_iosxexxx.bin activate

      When you want to initiate the upgrade/reload you’ll execute the commit command
      C9200K#install commit

      Like

  4. Jared Abdul

    There should be no space between flash:cat9k_lite_iosxe.17.09.03.SPA.bin just thought I would throw that out there. It seems like the image shown has a space there and would cause a ^ to show up on start of the file name.

    Like

Leave a comment