At the time of writing, the latest IOS for a Cisco 1941 router is c1900-universalk9-mz.SPA.157-3.M8.bin
I'll use that version for the examples.
IOS transfer over serial (xmodem)
From IOS
Verify that there is enough space left on the Flash filesystem to add an (additional) IOS. In this example, I will simulate a missing IOS by deleting it. Do not reload!
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#line console 0
Router(config-line)#speed 115200
C�
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.
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Rout+-----------------+---------[Comm Parameters]----------+----------------+
Rout| A - Serial De| | |
C� | B - Lockfile Loc| Current: 9600 8N1 | |
| C - Callin Pro| Speed Parity Data | |
| D - Callout Pro| A: <next> L: None S: 5 | |
| E - Bps/Par/B| B: <prev> M: Even T: 6 | |
| F - Hardware Flo| C: 9600 N: Odd U: 7 | |
| G - Software Flo| D: 38400 O: Mark V: 8 | |
| H - RS485 En| E: 115200 P: Space | |
| I - RS485 Rts | | |
| J - RS485 Rts A| Stopbits | |
| K - RS485 Rx Du| W: 1 Q: 8-N-1 | |
| L - RS485 Termi| X: 2 R: 7-E-1 | |
| M - RS485 Delay | | |
| N - RS485 Delay | | |
| | Choice, or <Enter> to exit? | |
| Change which +------------------------------------+ |
+-----------------------------------------------------------------------+
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.
Switch(config-line)#end
Switch#copy xmodem: flash:c2960-lanbasek9-mz.150-2.SE11.bin
Destination filename [c2960-lanbasek9-mz.150-2.SE11.bin]? <----- press ENTER
Begin the Xmodem or Xmodem-1K transfer now...
CCC
For minicom, press Ctrl+A and then Z. Type S (Send files) and select "xmodem". Navigate your way to the new IOS file (here /srv/tftp). Press Space to tag the file and enter "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.
There is nu such thing as "boot system flash:/..." like with a Cisco 2960 switch. Just reload the router and it will find the IOS on flash.
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. Enjoy your new IOS!
Switch#show version
Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 15.0(2)SE11, RELEASE SOFTWARE (fc3)
...
...
System returned to ROM by power-on
System image file is "flash:/c2960-lanbasek9-mz.150-2.SE11.bin"
...
...
Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C2960+24TC-L 15.0(2)SE11 C2960-LANBASEK9-M
Configuration register is 0xF
Switch#
From ROMMON
Unlike with a Cisco 2960 switch, to my knowledge, it is not possible to use xmodem from the router in ROMMON-mode.
IOS transfer over network protocol
Unlike with a Cisco 2960 switch, transfer using a network protocol is possible from IOS and from ROMMON-mode.
From IOS
tFTP
Verify that there is enough space left on the Flash filesystem to add an (additional) IOS. In this example, I will simulate a missing IOS by deleting it.
<TODO COPY AND PERMISSIONS>
guru@lab:~$ ls -lh /srv/tftp/
total 852M
...
-rw-r--r-- 1 guru guru 82M sep 2 2021 c1900-universalk9-mz.SPA.157-3.M8.bin
...
guru@lab:~$
Show the name of the network interface on the LAB-PC (in this case: enp0s25)
Configure an temporary IP address and subnet mask.
guru@lab:~$ sudo ip link show
[sudo] password for guru:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 90:1b:0e:18:b9:8e brd ff:ff:ff:ff:ff:ff
guru@lab:~$ sudo ip address add 192.168.1.101/24 dev enp0s25
guru@lab:~$ ip a
...
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 90:1b:0e:18:b9:8e brd ff:ff:ff:ff:ff:ff
inet 192.168.1.101/24 scope global enp0s25
valid_lft forever preferred_lft forever
Configure an IP address and subnet mask on the router. Verify.
rommon 6 > tftpdnld
IP_ADDRESS: 192.168.1.84
IP_SUBNET_MASK: 255.255.255.0
DEFAULT_GATEWAY: 192.168.1.254
TFTP_SERVER: 192.168.1.101
TFTP_FILE: c1900-universalk9-mz.SPA.157-3.M8.bin
TFTP_MACADDR: d8:b1:90:63:85:60
TFTP_DESTINATION: flash0:
GE_PORT: Ge0/0
TFTP_MEDIA_TYPE: Copper
TFTP_VERBOSE: Progress
TFTP_RETRY_COUNT: 20
TFTP_TIMEOUT: 7200
TFTP_CHECKSUM: Yes
GE_SPEED_MODE: Auto Detect
Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n: [n]: y
Receiving c1900-universalk9-mz.SPA.157-3.M8.bin from 192.168.1.101 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
File reception completed.
IOS Image Load Test
___________________
Digitally Signed Release Software
Validating checksum.
Copying file c1900-universalk9-mz.SPA.157-3.M8.bin to flash0:.
program load complete, entry point: 0x80803000, size: 0x1b340
Format: All system sectors written. OK...
Format: Total sectors in formatted partition: 510944
Format: Total bytes in formatted partition: %llu
Format: Operation completed successfully.
program load complete, entry point: 0x80803000, size: 0x1b340
rommon 7 >