A remote xmodem IOS upgrade…

 | 29 Mar 2006 01:30

Right, it’s loading and due to the baud rate of 115200 currently at 13% so I’ve got some time to write this little “note to self”. If anyone else finds this useful then I hope you’re not working away like me at 0:48 in the night.

A little background

A remote router upgrade failed for some strange reason, ok I was stupid enough not to verify the downloaded image while I noticed the download had finished quicker then expected. But the file size was ok and a colleague saw the image increase in size on flash:. Anyway the router did not return to a normal state.

Recovery setup
A connected switch which had been connected into the (ethernet) uplink path earlier today provided connectivity to a test machine connected to the console of the switch. Oh how I love backup paths, as long as I can use them. I was able to SSH to my test machine’s secondary interface and access the switch’s console. Noticed that the router’s interfaces were up so it was powered on. Luckily someone was found who was able to move the console cable from the switch to the router.

ROMMON

And as expected the router was happy to see me in ROMMON, issuing the boot command revealed a magic cooky to be missing/wrong/… . So I put my first bet on tftpdnld and installed it through 2 SSH hops on another server in the same Ethernet segment. Setting the right settings and firing up tftpdnld… It failed: monitor: command “tftpdnld” not found, time to try something else.

Xmodem

Minicom is capable of sending files, and lucky me it supports xmodem (others too but I wasn’t interested in those). Changed the console speed to 115200 instead of the default 9600. Alt-Z, S, file not found? Pulled the IOS image from the earlier installed tftp server to the ‘console’ machine and tried again. Als-z, S, select file, “Retry 0: Got 01 for sector ACK”. Right something clearly was not going well. Client was waiting, server was trying to send but no go.

CRC-16

The solution was to add -r to the command in ROMMON: xmodem -c . It adds a CRC check which minicom sets by default on sx -used for x/ymodem (etc) transfers. So now I’m waiting for this 27Mb file to finish and see if it will boot. Ahh, it’s at 20Mb now so only 7Mb to go and then I’ll still have to wait for the erasing and programming of the flash. Oh well time to read a book maybe.

Someone please wake me up when this router is done…

No Responses to “A remote xmodem IOS upgrade…”