(Re)install an IOS operating system on a Cisco 2960 switch
Prereqs
- a PC (BIOS/UEFI) running Linux Mint 21
- minicom terminal emulation software
- a valid Cisco IOS image
- a tFTP service
IOS transfer over serial (xmodem)
From IOS
Verify that there is enough space left on the Flash filesystem.
Set the baud rate to 115200 to speed up the transfer. You will lose the connection after the last command. Some gibberish characters can emerge.
Adjust the settings in your terminal emulation program to match the new baud rate. For minicom, press Ctrl+A and then Z. Type O and choose "Serial port setup". Change setting E and Enter twice. Exit.
Press Enter The connection is back. Initiate an xMODEM transfer. Confirm the destination filename. The switch will then prompt you to start the transfer from your terminal emulator.
For minicom, press Ctrl+A and then Z. Type S (Send files) and select "xmodem". Navigate your way to the new IOS file (here /home/guru/Downloads). Press Space to tag the file and press "Okay" to send.
Grab a coffee. This can take a long time depending on the size of the IOS image. Wait for the transfer to complete and then press Enter to quit.
Make the switch boot from the newly transferred IOS image, verify and reboot.
You have to adjust the settings in your terminal emulation program again, to match the default baud of 9600. Verify that the correct IOS image is loaded.
If all went well, it's save to remove the old IOS image (if existing). Enjoy your new IOS!
From ROMMON
First, start the switch in ROMMON-mode.
Initialize Flash manually.
Verify that there is enough space left on the Flash filesystem.
Set the baud rate to 115200 to speed up the transfer. You will lose the connection after the last command. Some gibberish characters can emerge.
Adjust the settings in your terminal emulation program to match the new baud rate. For minicom, press Ctrl+A and then Z. Type O and choose "Serial port setup". Change setting E and Enter twice. Exit.
Press Enter The connection is back. Initiate an xMODEM transfer. The switch will then prompt you to start the transfer from your terminal emulator.
For minicom, press Ctrl+A and then Z. Type S (Send files) and select "xmodem". Navigate your way to the new IOS file (here /home/guru/Downloads). Press Space to tag the file and press "Okay" to send.
Grab a coffee. This can take a long time depending on the size of the IOS image. Wait for the transfer to complete and then press Enter to quit.
Update the BOOT parameter to match the new IOS.
Set the BAUD rate back to the default (9600 bps). You have to adjust the settings in your terminal emulation program again. Press Enter The connection is back.
Finally, boot the switch manually.
Verify that the correct IOS image is loaded. Enjoy your new IOS!
IOS transfer over network protocol (tFTP)
Transfer using a network protocol is only possible from IOS, not from ROMMON-mode.
tFTP
Install a tFTP service on the LAB-PC. Copy a valid Cisco IOS image file to the tFTP directory where files are served from. Adjust permissions.
Configure an IP address and subnet mask on the switch. Verify.
Optional (in this case): ensure that the TFTP session is sourced from the correct interface (here: VLAN 1).
Copy the IOS image from the TFTP server to the switch's flash memory.
Make the switch boot from the newly transferred IOS image, verify and reboot.
If all went well, it's save to remove the old IOS image. Enjoy your new IOS!