Share this page : facebooktwitterlinkedinmailfacebooktwitterlinkedinmail
I will use c2960s switch as an example:
Step 1: Make sure the IOS is on the Cisco USB Drive (TFTP)

For this, I am using a Lexar 4Gb drive with FAT format (fat16). Or else you will get message “%Error opening usbflash0:c2960s-universalk9-mz.152-2a.E1.bin (Invalid DOS media or no media in slot)”

Or you can copy it from tftp server, use tftpd32 as an tftp server, and copy image to the root folder.

Step 2: Insert drive in the USB port on the back of the switch

Once you are consoled into the switch, you can insert the USB drive into the back of the switch. There is only one place it will plug in. You will see “usbflash0: has been inserted” come up on the screen..

Step 3: Copy the IOS into Flash: on the switch

This is done with the following command:

USB drive:

copy usbflash0:c2960s-universalk9-mz.152-2a.E1.bin flash:

TFTP: 

copy tftp://192.168.4.200/c2960s-universalk9-mz.152-2a.E1.bin flash:

This will copy the .bin file into the flash memory of the switch. If you do a “sh flash:” on the switch, you will see both of them listed in there.

Directory of flash:/

2 -rwx 1919 Mar 29 2019 13:06:46 +11:00 private-config.text
 583 -rwx 5144 Mar 1 1993 11:01:24 +11:00 multiple-fs
 3 -rwx 556 Jul 10 2018 12:33:05 +10:00 vlan.dat
 4 -rwx 7255 Mar 29 2019 13:06:46 +11:00 config.text
 5 -rwx 16961536 Sep 5 2019 12:50:44 +10:00 c2960s-universalk9-mz.152-2a.E1.bin
 6 drwx 512 Mar 1 1993 11:12:50 +11:00 c2960s-universalk9-mz.122-53.SE2

 

Step 4: Tell switch to boot to the new IOS – and reboot

 

switch#config t
switch#(config)boot system c2960s-universalk9-mz.152-2a.E1.bin
switch#(config)exit
switch#reload
switch#(confirm) y

Step 5: Switch boots to new IOS – Remove Old IOS from Flash

Once the switch boots back up to the new IOS, you can delete the old one out of flash. This is done with the following command:

switch#delete /recursive /force flash:c2960s-universalk9-mz.122-53.SE2

Cisco 3K

 

Step 1blank.gif Make sure your tftp server is reachable from IOS .

Switch#show run | i tftp
ip tftp source-interface GigabitEthernet0/0
ip tftp blocksize 8192
Switch#
Switch#show run | i ip route vrf
ip route vrf Mgmt-vrf 5.0.0.0 255.0.0.0 5.30.0.1
Switch#
Switch#show run int GigabitEthernet0/0
Building configuration…
Current configuration : 115 bytes
!
interface GigabitEthernet0/0
vrf forwarding Mgmt-vrf
ip address 5.30.12.121 255.255.0.0
negotiation auto
end
Switch#
Switch#ping vrf Mgmt-vrf ip 5.28.11.250
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.28.11.250, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

Step 2blank.gif Copy the image from your tftp server to flash.

Switch#copy tftp://5.28.11.250/cat3k_caa-universalk9.16.01.01.SPA.bin flash:
Destination filename [cat3k_caa-universalk9.16.01.01.SPA.bin]?
Accessing tftp://5.28.11.250/cat3k_caa-universalk9.16.01.01.SPA.bin…
Loading cat3k_caa-universalk9.16.01.01.SPA.bin from 5.28.11.250 (via
GigabitEthernet0/0):!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!O!!!!!!!!!!!!!!!!!!!!!!!!!
[OK – 469677062 bytes]
469677062 bytes copied in 140.610 secs (3340282 bytes/sec)
Switch#

Step 3blank.gif Use the dir flash command to confirm that the image has been successfully copied to flash.

Switch#dir flash:*.bin
Directory of flash:/*.bin
77453 -rw- 469677062 Nov 30 2015 16:31:05 -08:00
cat3k_caa-universalk9.16.01.01.SPA.bin
3458338816 bytes total (2644488192 bytes free)
Switch#
Software Install Image to Flash

Step 4blank.gif Use the software install command with the ‘new’ and ‘force’ options to expand the target image to flash. You can point to the source image on your TFTP server or in flash if you have it .

Without new force, you may get an error message:

% Candidate package compatibility checks failed because the following
 package dependencies were not satisfied. Operation aborted.

copied to flash.

Switch#software install file flash:cat3k_caa-universalk9.16.01.01.SPA.bin new force
Preparing install operation…
[4]: Copying software from active switch 4 to switches 1,2,3
[4]: Finished copying software to switches 1,2,3
[1 2 3 4]: Starting install operation
[1 2 3 4]: Expanding bundle flash:cat3k_caa-universalk9.16.01.01.SPA.bin
[1 2 3 4]: Copying package files
[1 2 3 4]: Package files copied
[1 2 3 4]: Finished expanding bundle flash:cat3k_caa-universalk9.16.01.01.SPA.bin
[1 2 3 4]: Verifying and copying expanded package files to flash:
[1 2 3 4]: Verified and copied expanded package files to flash:
[1 2 3 4]: Starting compatibility checks
[1 2 3 4]: Bypassing peer package compatibility checks due to ‘force’ command option
[1 2 3 4]: Finished compatibility checks
[1 2 3 4]: Starting application pre-installation processing
[1 2 3 4]: Finished application pre-installation processing
[1]: Old files list:
Removed cat3k_caa-base.SPA.03.07.02E.pkg
Removed cat3k_caa-drivers.SPA.03.07.02E.pkg
Removed cat3k_caa-infra.SPA.03.07.02E.pkg
Removed cat3k_caa-iosd-universalk9.SPA.152-3.E2.pkg
Removed cat3k_caa-platform.SPA.03.07.02E.pkg
Removed cat3k_caa-wcm.SPA.10.3.120.0.pkg
[2]: Old files list:
Removed cat3k_caa-base.SPA.03.07.02E.pkg
Removed cat3k_caa-drivers.SPA.03.07.02E.pkg
Removed cat3k_caa-infra.SPA.03.07.02E.pkg
Removed cat3k_caa-iosd-universalk9.SPA.152-3.E2.pkg
Removed cat3k_caa-platform.SPA.03.07.02E.pkg
Removed cat3k_caa-wcm.SPA.10.3.120.0.pkg
[3]: Old files list:
Removed cat3k_caa-base.SPA.03.07.02E.pkg
Removed cat3k_caa-drivers.SPA.03.07.02E.pkg
Removed cat3k_caa-infra.SPA.03.07.02E.pkg
Removed cat3k_caa-iosd-universalk9.SPA.152-3.E2.pkg
Removed cat3k_caa-platform.SPA.03.07.02E.pkg
Removed cat3k_caa-wcm.SPA.10.3.120.0.pkg
[4]: Old files list:
Removed cat3k_caa-base.SPA.03.07.02E.pkg
Removed cat3k_caa-drivers.SPA.03.07.02E.pkg
Removed cat3k_caa-infra.SPA.03.07.02E.pkg
Removed cat3k_caa-iosd-universalk9.SPA.152-3.E2.pkg
Removed cat3k_caa-platform.SPA.03.07.02E.pkg
Removed cat3k_caa-wcm.SPA.10.3.120.0.pkg
[1]: New files list:
Added cat3k_caa-rpbase.16.01.01.SPA.pkg
Added cat3k_caa-srdriver.16.01.01.SPA.pkg
Added cat3k_caa-wcm.16.01.01.SPA.pkg
Added cat3k_caa-webui.16.01.01.SPA.pkg
[2]: New files list:
Added cat3k_caa-rpbase.16.01.01.SPA.pkg
Added cat3k_caa-srdriver.16.01.01.SPA.pkg
Added cat3k_caa-wcm.16.01.01.SPA.pkg
Added cat3k_caa-webui.16.01.01.SPA.pkg
[3]: New files list:
Added cat3k_caa-rpbase.16.01.01.SPA.pkg
Added cat3k_caa-srdriver.16.01.01.SPA.pkg
Added cat3k_caa-wcm.16.01.01.SPA.pkg
Added cat3k_caa-webui.16.01.01.SPA.pkg
[4]: New files list:
Added cat3k_caa-rpbase.16.01.01.SPA.pkg
Added cat3k_caa-srdriver.16.01.01.SPA.pkg
Added cat3k_caa-wcm.16.01.01.SPA.pkg
Added cat3k_caa-webui.16.01.01.SPA.pkg
[1 2 3 4]: Creating pending provisioning file
[1 2 3 4]: Finished installing software. New software will load on reboot.
[1 2 3 4]: Committing provisioning file
[1 2 3 4]: Do you want to proceed with reload? [yes/no]: yes
[1 2 3 4]: Reloading
Clean up
request platform software package clean switch all

 

This operation may take several minutes…
Running command on switch 1
Cleaning up unnecessary package files
No path specified, will use booted path flash:packages.conf
Cleaning flash:
Scanning boot directory for packages … done.
Preparing packages list to delete …
cat3k_caa-guestshell.16.01.01.SPA.pkg
File is in use, will not delete.
cat3k_caa-rpbase.16.01.01.SPA.pkg
File is in use, will not delete.
cat3k_caa-rpcore.16.01.01.SPA.pkg
File is in use, will not delete.
cat3k_caa-srdriver.16.01.01.SPA.pkg
File is in use, will not delete.
cat3k_caa-webui.16.01.01.SPA.pkg
File is in use, will not delete.
packages.conf
File is in use, will not delete.
done.

The following files will be deleted:
[switch 1]:
/flash/cat3k_caa-base.SPA.03.07.02SE.pkg
/flash/cat3k_caa-drivers.SPA.03.07.02SE.pkg
/flash/cat3k_caa-infra.SPA.03.07.02SE.pkg
/flash/cat3k_caa-iosd-universalk9.SPA.150-1.EZ5.pkg
/flash/cat3k_caa-platform.SPA.03.07.02SE.pkg
/flash/cat3k_caa-universalk9.16.01.01.SPA.bin
/flash/cat3k_caa-wcm.SPA.10.1.150.0.pkg
/flash/packages.conf.00-

Do you want to proceed? [y/n]y

[switch 1]:
Deleting file flash:cat3k_caa-base.SPA.03.07.02SE.pkg … done.
Deleting file flash:cat3k_caa-drivers.SPA.03.07.02SE.pkg … done.
Deleting file flash:cat3k_caa-infra.SPA.03.07.02SE.pkg … done.
Deleting file flash:cat3k_caa-iosd-universalk9.SPA.150-1.EZ5.pkg … done.
Deleting file flash:cat3k_caa-platform.SPA.03.07.02SE.pkg … done.
Deleting file flash:cat3k_caa-universalk9.16.01.01.SPA.bin … done.
Deleting file flash:cat3k_caa-wcm.SPA.10.1.150.0.pkg … done.
Deleting file flash:packages.conf.00- … done.