10

Today I was updating IOS on a Cisco 877 router, and a problem came up: the installed flash memory wasn't enough to hold both the old and the new IOS images, so the new one couldn't be uploaded unless the old one was deleted first.

This of course means that, as soon as the old image was deleted, any problem while installing the new one would have rendered the router unbootable; F.E. a power loss would have been especially nasty. Of course, the inherent slowness of a TFTP upload to flash memory didn't help.

Any workaround for this, other than installing a bigger flash card? The two images were both only sligthly bigger than 50% of the total flash memory size, thus even a little space saving would have been enough; I'm thinking about file compression or something similar.

Massimo
  • 68,714
  • 56
  • 196
  • 319
  • 1
    `new one would have rendered the router unbootable` - For most cisco routers you can still boot into a mode that permits you to upload the image via a serial connection, or tftp. It is a big pain to do this though. Plus it pretty much requires that you be physically connected to the console port of the router to fix it. – Zoredache Feb 18 '14 at 19:52
  • Yes, of course there is *some* way to save the device. But as you said, it's a big pain, and it would be nice to not even risk having to do that. – Massimo Feb 18 '14 at 19:59
  • It sounds trite, but this is a major reason I decided to replace my older Cisco units when they required an IOS update to perform some newer function, or they wouldn't be supported on their current IOS. – DanBig Feb 18 '14 at 20:39

2 Answers2

5

There isn't really a solution, from a file compression standpoint, that you can use. The router's bootloader decompresses the IOS image and, since you can't alter the bootloader adding support for new compression algorithms isn't possible.

Having an out-of-band management connection would the best techncal means to safely handle these situations. In the case of a remote device (one where you can't just walk over to it and plug in your console cable), unfortunately, you could be talking about expensive things like serial terminal servers.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
1

It's possible your images are already compressed. Exact naming conventions vary by major version, but this guide is still pretty good. If that's the case, you're in a spot of trouble. You can upgrade your flash space or take the risk and go through the recovery procedure (which really isn't that bad, depending on your patience for TFTP transfers)

If the image isn't compressed, you may be able to compress it. Cisco only recommends using the UNIX 'compress' command, and I wouldn't test them on that. However, I'm not entirely certain you can compress your own images for a Cisco 800 series router. I strongly suspect you can, but I haven't been able to identify that absolutely. Put plainly, I'm more confident that the upgrade will go well than I am that you can load a self-compressed IOS image.

Deotronic
  • 111
  • 2