Update IOS XE

Install mode is the recommended mode for booting a switch. This is due to the fact that bundle mode requires more memory, is slower to boot, and auto-upgrade for example isn’t supported in bundle mode.

Bundle mode is the legacy way of booting a switch using a .bin file which is referenced directly in the boot system command.

Install mode on the other hand expands (extracts) the bin file to flash ahead of booting. These .pkg files are then referenced in the packages.conf file which is the file we point to with the boot system command.

Install mode issues

When you want to upgrade a switch using install mode, you might see this error upon installation:

FAILED: switch local is not booted with provisioning file

The switch is probably booted in bundle mode which can be verified using a simple show version and looking for the switch model in the bottom of the output:

show version

Here we see that the switch has been booted using the INSTALL mode. But the above error should only manifest itself when usind BUNDLE mode.

The fix for the above error is to clean up flash, upload the new .bin file and expand it into flash. This is also known as converting from bundle mode to install mode.

Switch#dir | in \.bin|\.pkg|packages.conf
90116  -rw-        700524979  Jan 18 2019 23:23:04 +00:00  cat9k_iosxe.16.09.02.SPA.bin
147460  -rw-         27034568  Jan 19 2019 00:14:28 +00:00  cat9k-cc_srdriver.16.09.02.SPA.pkg
147461  -rw-         81007556  Jan 19 2019 00:14:28 +00:00  cat9k-espbase.16.09.02.SPA.pkg
147462  -rw-          1647556  Jan 19 2019 00:14:28 +00:00  cat9k-guestshell.16.09.02.SPA.pkg
90138  -rw-             7554  Jan 19 2019 00:16:45 +00:00  packages.conf
147463  -rw-        423424960  Jan 19 2019 00:14:28 +00:00  cat9k-rpbase.16.09.02.SPA.pkg
147469  -rw-         33273323  Jan 19 2019 00:14:49 +00:00  cat9k-rpboot.16.09.02.SPA.pkg
147464  -rw-         28881860  Jan 19 2019 00:14:28 +00:00  cat9k-sipbase.16.09.02.SPA.pkg
147465  -rw-         54854592  Jan 19 2019 00:14:28 +00:00  cat9k-sipspa.16.09.02.SPA.pkg
147466  -rw-         34788292  Jan 19 2019 00:14:28 +00:00  cat9k-srdriver.16.09.02.SPA.pkg
147467  -rw-         15836096  Jan 19 2019 00:14:28 +00:00  cat9k-webui.16.09.02.SPA.pkg
147468  -rw-             9152  Jan 19 2019 00:14:28 +00:00  cat9k-wlc.16.09.02.SPA.pkg
425987  -rw-         27022280   Nov 1 2018 19:15:53 +00:00  cat9k-cc_srdriver.16.09.01s.SPA.pkg
425988  -rw-         81015748   Nov 1 2018 19:15:53 +00:00  cat9k-espbase.16.09.01s.SPA.pkg
425989  -rw-          1647560   Nov 1 2018 19:15:53 +00:00  cat9k-guestshell.16.09.01s.SPA.pkg
425990  -rw-        422962116   Nov 1 2018 19:15:54 +00:00  cat9k-rpbase.16.09.01s.SPA.pkg
671746  -rw-         33257084   Nov 1 2018 19:16:14 +00:00  cat9k-rpboot.16.09.01s.SPA.pkg
655361  -rw-         28865476   Nov 1 2018 19:15:54 +00:00  cat9k-sipbase.16.09.01s.SPA.pkg
655362  -rw-         54825924   Nov 1 2018 19:15:54 +00:00  cat9k-sipspa.16.09.01s.SPA.pkg
655363  -rw-         34759620   Nov 1 2018 19:15:54 +00:00  cat9k-srdriver.16.09.01s.SPA.pkg
655364  -rw-         15815616   Nov 1 2018 19:15:54 +00:00  cat9k-webui.16.09.01s.SPA.pkg
671745  -rw-             9152   Nov 1 2018 19:15:54 +00:00  cat9k-wlc.16.09.01s.SPA.pkg
Switch#    

If the switch has been booted in bundle mode, only the .bin file is relevant. Therefore you can safely remove the above .pkg files and the packages.conf file.

Switch#delete /force flash:cat*.pkg
Switch#delete /force flash:packages.conf

How you should have a clean flash with only one software image - the .bin file your switch booted with. Now we should upload the new .bin file, delete any boot system strings, expand the new .bin file and make the system boot the packages.conf file:

Switch#copy ftp://hostname/file flash:
!!!!!!!!!!!
[OK]
Switch#conf t
Switch(config)#no boot system
Switch(config)#end
Switch#request platform software package expand switch all file flash:cat.new.file.bin
Switch#conf t
Switch(config)#boot system switch all flash:packages.conf
Switch(config)#end
Switch#wr
Switch#show boot system
---------------------------
Switch 1
---------------------------
Current Boot Variables:
BOOT variable = flash:packages.conf;

Boot Variables on next reload:
BOOT variable = flash:packages.conf;
Manual Boot = no
Enable Break = no
Boot Mode = DEVICE
iPXE Timeout = 0
Switch#reload

NOTE! Be sure to upload the .bin file to ALL switches in the stack. Also you should check the content of flash using dir and the content of the packages.conf file using the more flash:packages.conf to see that the expanded pkg files are in fact referenced in the packages file.

Install Mode upgrade

When you update a switch using install mode, the switch itself does all the expanding and updating of packages.conf for you. The procedure is this:

!
! Remove unused files in flash:
!
Switch#request platform software package clean switch all file flash:
Do you want to proceed? [y/n]y
!
! Upload new .bin file
!
Switch#copy ftp://hostname/file flash:
!!!!!!!!!!!
[OK]
!
! Install the new .bin file:
!
Switch#request platform software package install switch all file flash:cat3k_caa-universalk9.16.09.03.SPA.bin new auto-copy
Switch#dir | in .pkg|packages.conf
Switch#reload

That’s more or less it. Happy upgrading.

Jacob Zartmann avatar
Jacob Zartmann
Passionate Network Engineer thriving for challenges and knowledge.