Upgrade 2800 series router to support USB boot

A while ago we were faced with a 2800-series router with no software in its CF card. As all 2800-series routers have USB slots, I started investigating whether you could boot the IOS image from an USB flash token. The product documentation states you can't, but as always, reality changes quicker than documentation in Ciscosphere.

To support IOS boot from USB token, you need a newer version of 2800-series ROMMON which you'll get from the ROMMON download page (registered CCO users only). You need ROMMON release 12.4(13r)T (description: C2800 ROMMON Upgrade; adds boot from usb flash drive capability).

After you've downloaded the file onto a USB token, upgrade the router ROMMON with the upgrade rom-monitor file usbflash0:C2800NM_RM2.srec.124-13r.T command (requires router reboot).

Test the upgraded ROMMON with the dev command. You should see the USB flash devices:

rommon 1 > dev
Devices in device table:
id name
flash: compact flash
bootflash: boot flash
usbflash0: usbflash0
usbflash1: usbflash1
eprom: eprom

You can use USB token-resident IOS releases in two ways:

  • As an emergency boot mechanism when you have problems with the CF card. Remove the CF card, insert USB token, restart the router and use the boot rommon command, for example boot usbflash0:c2800nm-advipservicesk9-mz.124-11.T1.bin.

  • As a regular boot image. Use the boot system global configuration command to specify the USB token image to use, for example boot system usbflash0:c2800nm-advipservicesk9-mz.124-11.T1.bin. The router will not boot off USB token without the boot system command ... and, obviously, you should never remove the USB token from the router.

40 comments:

  1. Hi,

    I can't find the ROMMON-images on that page :-(

    http://www.cisco.com/cgi-bin/tablebuild.pl/2800rommon:
    "Cisco 2800 Series ROMMON Upgrades

    NOTE:
    There are currently no files for this type."

    ReplyDelete
  2. I just tested the link again and it shows me the files. Obviously what you see depends on your CCO user level; if you can't get the files on CCO, you'll have to contact your Cisco support partner.

    ReplyDelete
  3. Ok, thanks!

    ReplyDelete
  4. Hi,

    Like to clarify the Boot system usbflash command. I am using a notmal (non cisco) USB Flash Device) I do not get the USBFLASH option.

    Does this only work with Cisco USB Flash drives ?

    ReplyDelete
  5. I had a similar situation: The CLI help didn't show it (at least until I've upgraded ROMMON, not sure what happened afterwards), but it worked. However, if you use this setup before upgrading ROMMON, the FLASH image boots first and then it loads the USBFLASH image.

    ReplyDelete
  6. Ivan,

    Here is what I have:

    System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)

    Can access USBFLAHS0:

    Router#dir usbflash0:
    Directory of usbflash0:/

    1 ---- 0 Nov 13 2007 08:01:24 +00:00 Recycled
    2 -rw- 4096 Nov 13 2007 10:02:26 +00:00 ._.Trashes
    3 drw- 0 Nov 13 2007 10:02:26 +00:00 .Trashes
    4 drw- 0 Nov 13 2007 10:02:26 +00:00 .Spotlight-V100
    60 -rw- 28783540 Jan 22 2007 19:48:52 +00:00 c2801-advipservicesk9-mz.124-10b.bin
    61 -rw- 4096 Nov 15 2007 13:07:04 +00:00 ._c2801-advipservicesk9-mz.124-10b.bin

    128690176 bytes total (98965504 bytes free)

    Can not add to boot system ?

    Router(config)#boot system ?
    WORD TFTP filename or URL
    flash Boot from flash memory
    ftp Boot from a server via ftp
    mop Boot from a Decnet MOP server
    rcp Boot from a server via rcp
    rom Boot from rom
    tftp Boot from a tftp server

    Can I use any make or model or does it need tobe a Cisco specific USB Flash

    ReplyDelete
  7. Jacques, I've told you the boot system CLI help will NOT show you the usbflash: device. Just type the path in and test it.

    ReplyDelete
  8. Hello, I always get an error monitor: command "boot" not found"

    I made an exact copy of another flash card to the usbflash and I have all the files in it but when I try the boot system command, it throws me this error.

    I really need some help trying to make this router work because the flash card apparently disappeared.... so... would love an answer soon.

    Working on a 2811 ISR with the 12.4 version so I can "see" the usbflash

    ReplyDelete
  9. "boot system" is a router configuration command, not a ROMMON command. Try getting help in ROMMON and select the correct command to boot an IOS image.

    ReplyDelete
  10. someone put a link to download the ROMMON release 12.4 (13R) T ?

    ReplyDelete
  11. I always get this error:

    rommon 1 > dir usbflash0:
    program load complete, entry point: 0x8000f000, size: 0x3d240

    *** TLB (Load/Fetch) Exception ***
    Access address = 0x364
    PC = 0x8003d878, Cause = 0x8, Status Reg = 0x3040a803

    monitor: command "dir" aborted due to exception

    rommon 1 > boot usbflash0:c2800nm-advipservicesk9-mz.124-15.T7.bin
    program load complete, entry point: 0x8000f000, size: 0x3d240

    *** TLB (Load/Fetch) Exception ***
    Access address = 0x364
    PC = 0x8003d878, Cause = 0x8, Status Reg = 0x3040a803

    monitor: command "boot" aborted due to exception

    I upgraded to:

    ROM: System Bootstrap, Version 12.4(13r)T6, RELEASE SOFTWARE (fc1)

    Note: I am using a generic 256 MB flash drive and able to see the device and verified image when inserting the flash drive (while booting using compact flash) just when i restart it without CF, the usb flash won't work.

    ReplyDelete
  12. @Anonymous: You should open a case with Cisco TAC. This is definitely a weird error.

    ReplyDelete
  13. I'm using a generic 64mb usb and 12.4(13r)T5 and getting same result
    *** TLB (Load/Fetch) Exception ***
    Access address = 0x364
    PC = 0x8003d878, Cause = 0x8, Status Reg = 0x3040a803

    ReplyDelete
  14. Any chance on just copying from the non-Cisco flash drive to the internal flash?

    ReplyDelete
  15. Sure you can ... just insert the USB key and use the COPY command.

    ReplyDelete
  16. Ivan,

    Is there any specific formatting requirement for the USB drive? I know Cisco was moving toward FAT32 on flash devices.

    ReplyDelete
  17. I had heard that only Cisco-supplied USB drives would work. Maybe I could test it out today.

    ReplyDelete
  18. I've booted my 2811 OK from a non-Cisco USB stick. It didnt work when I formatted it with fkfs.msdos in Linux, but it worked fine when I formatted it in Windows, with the "DOS" option. So it is a little particular about the formatting.

    ReplyDelete
  19. Oops. I meant mkfs.msdos

    ReplyDelete
  20. Dear Ivan,

    While i was trying to upgrade the Rommon IOS via USB, I found the below error message.


    cisco#upgrade rom-monitor fileusbflash0:C2800NM_RM2.srec.124-13r.T
    %Error: srec file read failed

    Kindly advise

    BR
    Mohamed Ibrahim

    ReplyDelete
  21. Dear Mohamed!

    I cannot tell you what's wrong with your particular router or USB drive. Assuming you've typed in the command correctly and the ROMMON file is on the USB drive, it's best if you'd open a case with Cisco TAC (or your support partner).

    Best regards
    Ivan

    ReplyDelete
  22. Hello,

    I have a c871 router which has 128mb ram and 24mb flash and so I can only fit in the advsecurity IOS. I would like to run the advipservices version which requires 28mb of flash...do you think I could run it off a usb stick?

    Thanks

    ReplyDelete
  23. Apparently the 800 series can NOT boot from USB, despite what some documentation I have read states. Rommon does NOT support anything but xmodem, tftp, and flash booting...

    ReplyDelete
  24. Ivan,

    Were you ever able to pull the release notes for this version of ROMMON software? I have been looking all over the place for it.

    ReplyDelete
  25. Ivan Pepelnjak01 April, 2010 19:37

    Just tried. No luck.

    ReplyDelete
  26. Thanks. I've seen a new version which promises "C2800 ROMMON Upgrade: DRAM access optimization". It certainly would be nice to have some release notes to describe the functionality in greater detail.

    ReplyDelete
  27. @Anonymous
    the solution for this error
    rommon 1 > boot usbflash0:c2800nm-advipservicesk9-mz.124-15.T7.bin
    program load complete, entry point: 0x8000f000, size: 0x3d240

    *** TLB (Load/Fetch) Exception ***
    Access address = 0x364
    PC = 0x8003d878, Cause = 0x8, Status Reg = 0x3040a803

    monitor: command "boot" aborted due to exception


    IS the kind of flash it must support LINUX like ( KINGSTON )
    i have the same error and Chang it and all things go OK
    thanks for all
    :)

    ReplyDelete
  28. tcl script do not work after i use the usbflash and upgrade to CME 8.5 i do not what is the problem :'(

    ReplyDelete
  29. help pleaz !
    i have this message in my router when i tried to boot from usbflash0:

    rommon 1 > boot usbflash0:c2800nm-adventerprisek9-mz.124-24.T1(2).bin
    program load complete, entry point: 0x8000f000, size: 0x3d240

    usbflash0: contains unexpected values in partition table or boot sector.
    Device needs formatting before use!
    open(): Open Error = -66
    loadprog: error - on file open
    boot: cannot load "usbflash0:c2800nm-adventerprisek9-mz.124-24.T1(2).bin"

    ReplyDelete
  30. You might want to format the flash card as Fat first. Cisco doesn't understand ntfs.

    ReplyDelete
  31. Prabhjit Saini25 June, 2011 12:46

    Very good tutorial, Saved my life.....

    ReplyDelete
  32. This did not work for me on the 2801. After it upgrades the rommon, it hangs on reboot and does not upgrade the rommon.

    ReplyDelete
  33. nevermind. I got it to work

    ReplyDelete
  34. Hi,
    I have a router cisco 1841 I erased all inside :( I have de promt rommon1> I put this command " boot usbflash0:c2800nm-advipservicesk9-mz.124-11.T1.bin" and I can enter to my router normally but! how can i do to save my configuration in the router without using the flash.

    Copy running-config startup-config
    copy startup-config flash

    conf t
    boot system flash c2800nm-advipservicesk9-mz.124-11.T1.bin
    do wr

    reload
    the router is still booting in rommon>
    :(
    Help me please

    ReplyDelete
  35. You probably have to change the config register to 0x2102 (or something similar). Google for "config-register"

    ReplyDelete
  36. didnt work you assholes

    ReplyDelete
  37. Ivan Pepelnjak23 April, 2012 16:00

    Thank you, Bill! Much appreciated :-P

    ReplyDelete
  38. After upgrading my 2811 with the new ROMMON, I was still having problems like this:

    rommon 4 > dir usbflash0:
    program load complete, entry point: 0x8000f000, size: 0x3d240

    *** TLB (Load/Fetch) Exception ***
    Access address = 0x364
    PC = 0x8003d878, Cause = 0x8, Status Reg = 0x3040a803

    monitor: command "dir" aborted due to exception

    The rommon could see the usbflash0: device, but didn't like the filesystem.

    I fixed it by blowing away all of the partitions on the USB disk (a 128MB relic) and creating one large partition using fdisk on linux. Set they type to 6 (FAT 16). Then formatted the partition with 'sudo mkdosfs /dev/sdb1'

    Now the ROMMON is perfectly happy with the filesystem:

    System image file is "usbflash0:c2800nm-advipservicesk9-mz.151-4.M5.bin"


    Thanks, Ivan!

    ReplyDelete
  39. what file system do you use to format the USB Flash from a Computer before your upload the IOS?

    ReplyDelete
  40. on Windows, use 'FAT (Default)' and 'Default allocation size'. Untick quick format.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.