USB Flash boot

Answered Question
Apr 3rd, 2009

Hi, I have 1841, 2800 and 3800 routers and need to do IOS upgrade to all of them. Existing routers do not have enough flash to hold 2 IOS images.

Question: if the router has 12.4.13r ROM IOS, will I be able to boot the ISR router via Cisco brand USB? That means in case something goes wrong while I am uploading new IOS to the router via WAN and something wrong, now router in ROMMON mode. If a local site person has a Cisco USB with an IOS in it, can he just stick it to the router and reboot the router and router will go out of rommon and go into normal mode? After it is working, then I can put the running IOS onto the exisitng CF card so now I can remove the USB and the CF card has a good IOS and reboot the router again.

I am just trying to find a safe way to upgrade the site when they don't have big enough flash to hold 2 IOS at the same time. The local person is not technical so asking him to setup tftp server and put the IOS in the computer and so I can do tftpdnld while in rommon mode to grab the IOS from his tftp will be difficult to have the local person to set it up.

If ISR can boot off of the IOS in USB only, then I assume the requiremetn is the ROM IOS needs to be 12.4.13r. Then what is a safe way to upgrade the ROM IOS to this then? I never upgrade ROM IOS before so don't know what kind of problem I may run into and whether it's higher risk to upgrade this than upgrading the regular ios? If it is, then all my routers won't have this ROM IOS version, so that means I can't use USB to boot then? Will that means I am down to tftp server option? ( I heard xmodem won't work as it will time out before the ios can load via the slow dialup link into the router to rescue it from rommon mode).

thanks.

I have this problem too.
0 votes
Correct Answer by Leo Laohoo about 7 years 8 months ago

Hi Joyce,

"so will that mean even copying IOS from pc to USB directly is still bad?" < --- Files written by a PC can't be read by Cisco appliance because Cisco is using Unix OS.

However I have read about the FAT32 format but I have yet to try it. If you have tried it and it worked, then go ahead with it. :)

"In Plan B Step 4, is there any chance that we can screw up this rommon upgrade and then now my router is really dead and need hardware replacement?"

If the ROMmon file is invalid, the router will reject the upgrade. This is also one reason why I'm reluctant to try the FAT32-format option because I don't want to have a dead piece of brick in my hands. :)

"But do I still have any risk doing Step 4 when I perform that remotely in the remote office to upgrade their rommon?"

Purely optional. Besides, the file verification process won't take 5 minutes to complete.

"For #8 above, I guess I can copy the IOS via the WAN to the old CF if needed, like you said, I only have one slot."

You may have only one CF slot but the 2800/3800 ISR have 2 USB slots.

"The problem is there are many of my 40 routers has 12.1, 12.2 and 12.3 today" < --- How's that possible??? ISR's don't have 12.1 or maybe 12.2 IOS available.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.3 (3 ratings)
Loading.
Edison Ortiz Fri, 04/03/2009 - 16:06

Hi Joyce,

You are unable to boot from the USB file system as described on this document:

http://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/usb_flash_keys_ps6350_TSD_Products_Configuration_Guide_Chapter.html

If you are transferring the image over the WAN and you are concerned about the image being valid after the reboot, I suggest running the verify command as instructed on this URL:

http://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/cf_md5_ps6350_TSD_Products_Configuration_Guide_Chapter.html

If you are concerned about losing the connection during the file transfer, you can always start the process again as long as you don't reboot the router.

__

Edison.

Leo Laohoo Fri, 04/03/2009 - 17:43

Hi Joyce,

ROMmon IOS v12.4(13r)T is described as "adds boot from USB flash drive capability" but ever since I've been upgrading the ROMmon, I've always choosen v12.4(13r)T10.

So you have a Compact Flash which could not hold more than 2 IOS. So why not get another CF with bigger memory from your nearest electronics/camera shop. Just note that new ISR routers and chassis switches can read up to a MAXIMUM of 2Gb.

If you don't have this particular Bootstrap, USB support is found in the 12.4 IOS.

A few months ago, we rolled out a number of 2850 and 3845 routers only to realize that they were running the wrong IOS and feature. Unfortunately, I was told by the client not to push the IOS on the WAN. So I shipped the IOS and the bootstrap on my crusty old 256mb USB drive ... yup only ONE USB to upgrade 24 sites. In case the ISR's won't read the USB because of older firmware, part of my package contained a 512mb Compact Flash card (it was the smallest I've found) with a 12.4 IOS and bootstrap (just in case). Worked 100% for me and much to the chagrin of my client and office mates (who never knew how to use the USB).

Hope this helps.

blackladyJR Mon, 04/06/2009 - 06:17

Hi Leo,

Thanks for your response.

I have tried to boot from USB (non-cisco brand) and didn't work (I mean there is no boot system command to choose USB as the option). The router has 12.4.13r ROmmon IOS. So that leaves me to believe I need a cisco-brand USB to boot it but I don't have it to test. The non-cisco brand USB did get recognized by the router that I can see the IOS in the USB and I can copy into the CF so it works as a file storage, just not as bootable feature.

So have you tried to boot from USB then (when there is no CF)? And did it work?

Even if it works, then to do this, i need to upgrade the rommon ios which is same issue how would I do it ""remotely"" without risk?

thanks,

Joyce

Leo Laohoo Mon, 04/06/2009 - 15:00

"So have you tried to boot from USB then (when there is no CF)? And did it work?"

Yes.

I forgot to mention that before using the a spare USB/Compact Flash, you need to format it from the router. Insert the USB/Compact Flash and invoke the command "format flash:" if formating the Compact Flash and "format usbflash0:" if formating a USB drive plugged into USB Slot0.

After the IOS has been transfered to the USB, go into configuration mode and use the command "boot system usbflash0:". Exit the configuration mode and save the configuration.

Note: "boot system usbflash0:", particularly the "usbflash0:" bit will not appear as an option so you need to enter the entire word in.

Have a look below:

Router#dir

Directory of flash:/

1 -rw- 30331404 Nov 12 2008 15:33:12 +00:00 c2800nm-spservicesk9-mz.124-3i.bin

64016384 bytes total (28999680 bytes free)

Router#dir usb

Router#dir usbflash0:

Directory of usbflash0:/

1 -rw- 34518464 May 14 2008 05:48:46 +00:00 c3845-advipservicesk9-mz.124-7g.bin

2 -rw- 1623191 Sep 5 2008 00:38:12 +00:00 C2800NM_RM2.srec.124-13r.T6

3 -rw- 18749384 Oct 27 2008 05:17:04 +00:00 c1841-advsecurityk9-mz.124-7g.bin

4 -rw- 20404320 Mar 7 2008 06:29:28 +00:00 c2800nm-advsecurityk9-mz.124-7g.bin

5 -rw- 1690523 Oct 3 2008 01:16:02 +00:00 C1841_RM2.srec.124-13r.T5

6 -rw- 34124956 May 14 2008 05:44:34 +00:00 c2800nm-advipservicesk9-mz.124-7g.bin

7 -rw- 21818492 Mar 1 2002 00:27:16 +00:00 c870-advipservicesk9-mz.124-24.T.bin

257187840 bytes total (123949056 bytes free)

Router#sh run | i boot system

boot system usbflash0:c2800nm-advipservicesk9-mz.124-7g.bin

Router uptime is 1 minute

System returned to ROM by reload at 22:57:24 UTC Mon Apr 6 2009

System image file is "usbflash0:c2800nm-advipservicesk9-mz.124-7g.bin"

DISCLAIMER: Use NON-Cisco certified USB/Compact Flash cards at your own risk. The author is not responsible for any use of NON-Cisco certified USB/Compact Flash cards incorrectly, inappropriately and will not take responsibility if your appliance(s) fail because of it. I was forced to use NON-Cisco certified USB/Compact Flash cards because my employer is a tight-a$$!

blackladyJR Tue, 04/07/2009 - 09:19

Hi Leo,

Thanks for your help. I didn't realize we can still put the boot system usbflash0: even when we don't see it in the "option" when put in ?. I will try that.

But now it is still back to my problem. My problem is my CF in the remote site cannot hold 2 IOS. And no technical person onsite. So the concern is when I want to do the IOS upgrade remotely, after I erase the existing IOS from CF, then load new IOS to CF which can take 5-10 mins or more over the WAN, and if there is any power outage or the local person kick the power cord...etc, then now the router has not finished receving the new IOS completely and went to power down. So it will be in rommon mode when it boots up. So I am trying to see what we can do to prevent that.

Well, the USB is the great solution in case that happens, then the local person plug the USB and boot the router off of it and router is up and we can copy the image to CF at that point and we are all good.

BUT, the problem for the above is that it requires rommon ios 12.4.13rT. So all my routers do not have that, so now that we have a plan to upgrade the main IOS. But it relies on upgrading the rommon ios first. So same problem, how can I upgrade the rommon ios "remotely" and "safely"?

So that kinda put me to forget about USB boot option since it's even higher risk to upgrade rommon ios if that fails and the hardware will need to be replaced.

So I am thinking what is my alternate plan?

1) Ask my client to buy a few Cisco CF and preload with new IOS and ship to few sites. So all we need to do just a local person to pull out the existing CF and swapped with new CF and reboot, done. If it fails, then just put the existing CF back and reboot. So this is 100% safe way and easiest and something local non-technical person can do.

However my customer said they don't have a few CF, all they have are a few Cisco USB sticks that they can ship to the sites to use. Well, it's better than nothing, we can preloaded the new IOS in the USB stick and ship to site and then I can do the upgrade via USB port rather than pushing the new IOS over the wire over the WAN. So hopefully doing that transfer will take less than a few mins and hope no power outage. it is better than going over the WAN but it still has the risk. So I am thinking if customer needs to have zero risk, either they buy a few Cisco CF as above, or let the non-technical local ppl to learn to install tftp server on their pc and download the new IOS to the pc and so in case router run in rommon mode, then I can still issue tftpdnld from the rommon mode to copy an IOS to the router to rescue it.

What do you think?

Leo Laohoo Tue, 04/07/2009 - 14:49

Hi Joyce,

"So same problem, how can I upgrade the rommon ios "remotely" and "safely"?"

Glad you asked. What I did in my situation was copy the IOS from the USB to the CF and only then do you upgrade the ROMmon. After all, after the IOS has been copied over, you need to boot right?

Again, if you will try to use the USB option, make sure your USB contains the IOS version you require and the ROMmon too.

I have successfully upgraded the ROMmon and IOS (in the guise of upgrading the IOS only) several times using the method.

Regarding getting Cisco-certified CF ... I don't know how many routers and Sup720/Sup32 I've deployed with NON-Cisco CF.

Remember this: There is a minimum of 12.4(5) IOS where USB is supported on the routers. Sup32/Sup720 do NOT support USB.

Does this answer your question or alleviate your doubts? :)

blackladyJR Tue, 04/07/2009 - 16:11

Hi Leo,

Little confused, you said you copy the IOS from USB to CF (which IOS? Main IOS or the rommon ios)? I guess you mean you have the new rommon ios 12.4.13rT10 in your USB and you plug USB to router and copy that rommon IOS from USB to existing CF first. After that you then do the "upgrade rom-monitor file flash:" to upgrade the rommon IOS from the CF file? Is that correct?

If non-Cisco CF works, then it seems the easiest and safest is just ask the local person in each country to go buy a CF card from their camera store (it must be so cheap). Then I can post the new main IOS in an extranet server so they can download it to their pc and copy it from their pc on the CF card. Doing this probably is easiest too that there is no need to upgrade rommon ios or provide cisco usb stick. I guess shipping the cisco usb stick of the shipping cost is more than buying a non-cisco CF from a local store :)

So what I will do is after the local person buys the CF and download IOS and put in the CF card, then swap the existing CF with new CF to the router and reboot. If somehow fails, then put old CF back and reboot, then it should be back to what it was before. So Zero Risk.

Question, if success, now the router has new IOS with new CF card, if I want to Cisco old CF card to put back to the router, so I take out the new CF card from router and put old Card back. Is there command where I can "copy" running IOS into flash? If not, then I will just have the local person to put the old CF to the pc and copy via the downloaded new IOS from pc to the old CF card with new IOS and then put it back to the router and reboot one more time to make sure it's good. So now we are done and the non-Cisco CF is not needed anymore and it won't violate the smartnet contract with a 3rd party card in the router, what do you think?

Well, for my own testing and learning, since i have a few lab routers, so I will still test to put the new rommon IOS in USB and copy that from USB to CF and then upgrade rommon ios. AFter that, then try the USB boot to test that.

What is the typical size of the rommon IOS for the 12.4.13rT10? I hope my existing CF can hold existing IOS + the rommon IOS.

thanks again,

Joyce

Leo Laohoo Tue, 04/07/2009 - 16:39

Hi Joyce,

Boy, you have alot of questions!!!

"copy the IOS from USB to CF" < --- Only the new IOS. You can get the ROMmon to read from the USB.

"the easiest and safest is just ask the local person in each country to go buy a CF card from their camera store" <--- I wouldn't go for that. There are a number of CF's from different brands. If you go and get one, format it, and it works, then you can send out your copy. At least you know that it works. I mean what if you tell me to go and get a CF. I grudgingly get one put it in and only to be told that it doesn't work. However, if you go and get one test it and get more of the same brand from the same shop and format, load the files and ship them out (internal mail or Post), then the risk is minimized. Did I answer your question on this part?

So, your CF arrives at the site, what happens now? You tell the local support to swap out the existing Cisco CF with this new one that arrived. Boot from the new CF with the new IOS that you want. Viola!

Typical ROMmon IOS is not large, around 5-6mb. If you have to go and get one, make sure you get <2Gb and FORMAT the USB and/or CF before loading any files into it. Because of the size of the USB and/or CF you need, I'm sure you'll find some very, very cheap.

A word of warning for some USB. Some USB sticks have very short sockets I'd stay away from those.

Hope my answer eases your doubts. :)

Leo Laohoo Fri, 04/03/2009 - 18:17

Before I forget, the command to upgrade the ROMmon is:

upgrade rom-monitor file ?

archive: SREC file to use

cns: SREC file to use

flash: SREC file to use

ftp: SREC file to use

http: SREC file to use

https: SREC file to use

null: SREC file to use

nvram: SREC file to use

rcp: SREC file to use

scp: SREC file to use

system: SREC file to use

tar: SREC file to use

tftp: SREC file to use

tmpsys: SREC file to use

xmodem: SREC file to use

ymodem: SREC file to use

Leo Laohoo Tue, 04/07/2009 - 16:51

Joyce,

If you have some routers to test, I'll make a process shorter for you.

1. Purchase a CF and a USB stick. Size has to be LESS THAN 2Gb.

NOTE: Did the router accept the USB? If yes, then proceed to #2, if not, this particular USB is not compatible.

2. Insert the USB stick first and issue the command "format usbflash0:".

3. Copy the files you need into the USB. Please make sure you verify that the files are not corrupted. Command: verify usbflash0:

4. Insert the new generic CF into the slot.

NOTE: Did the router accept the CF? If yes, then proceed to #5, if not, this particular CF is not compatible.

5. Format the CF. Command: Format flash:

6. Copy the files you need from the USB to the CF (Command: copy usbflash0:* flash:). Please make sure you verify that the files are not corrupted. Command: verify flash:

7. To test, boot the router from the USB. Boot the router again from the CF.

8. If all successfull, purchase more CF and/or USB and repeat steps 1 to 7.

9. Ship out the CF and/or USB to remote users.

Hope this works.

blackladyJR Wed, 04/08/2009 - 11:19

Hi hi,

Thanks very much and appreciate all your time!

Believe it or not, I still have some questions.

Which steps will I insert the rommon ios? I imagine after Step 6 when I copy the new IOS and new rommon ios from USB to CF, my Step 6.5 is to upgrade the router with the new rommon ios? You have metioned in previous post that the rommon ios can be in USB? I have never done rommon ios upgrade yet.

So what do you mean by leaving the rommon ios in USB? I guess you mean I can just leave the rommon ios in USB and then issue the upgrade rom-monitor command to point to the USB for the file. And once it is upgraded, it does not need to have a copy in USB nor flash anymore as it's in the internal memory in the router, is that right?

Here are my new plans:

Plan A: With CF

1. Purchase a CiscoCF . (customer probably won't go for non-cisco CF).

2. Format the CF.

3. Take out the CF from router and put in pc. From PC, copy the new IOS to CF.

4. Take out CF from pc and put in router. Verify the file

5. To test, boot the router from this new CF with new IOS in it.

6. If success, buy more and repeat Step 1 to 5 and ship it out to remote sites. (probably I will only have 2-3 as customer won't buy more).

7. Now, all we need remote users to do after receiving the new CF is just to swap the CF and reboot the router. Done. If fails, the put old CF back and reboot.

8. If it is success, then put the old CF to router and I will issue to wipe the old CF clean, and then copy the new IOS on the old CF and now this old CF is ready to ship from one remote office to another remote office to use.

8.5 If the next remote office has different router platform, then after wiping the old CF clean, then ask the user to copy the new different IOS from their pc to the old CF (I will upload that different new IOS on a secure server for remote user to download onto their pc).

Plan A seems to be easiest and safest, just deal with CF and no need to change rommon ios.

Now, I know my client already told me they have half a dozen Cisco USB sticks in their hands and can use to ship out to remote sites. hm...so now I do need to create a plan if they don't want to buy CF since they already have a bunch of cisco USB.

Well, we do need 12.4.5 I guess for router to recognize USB (not boot, but just to recognize it). So for those remote sites that it is 12.3T, then it seems there is no other choice but to go with Plan A ONLY.

So for those sites that do have 12.4.5 above, I will go with Plan B.

Plan B in separate message since it run over 4000 char.

blackladyJR Wed, 04/08/2009 - 11:20

So Plan B: with cisco USB

1. Plug the cisco USB to lab router and format

2. Remove USB from router and plug in pc. From pc, copy the new IOS + rommon IOS to USB.

3. Take out USB from pc and plug back to router. Verify both files

4. Upgrade rommon ios, so without copying the rommon ios to existing CF, issue command .

5. Now that router has new rommon ios. Test the USB boot feature by removing existing CF from lab router. Now boot the router that I assume it will automatically search and eventually find an IOS in USB and boot from it. If it works, great. If it doesn't, well then dont' know.

6. Put existing CF back to router, erase old IOS from CF, copy the new IOS from USB to CF. HOpe no power outage during this few mins. Even if there is power outage, it's fine since we know the router can boot off of USB alone in Step 5 so we just redo-Step 5 and 6 after the power comes back.

7. Now remove USB and boot router again with CF.

8. If it's good, then the USB is prepped good and can ship to remote sites.

9. Remote user will plug the received USB to router and perform Step 4,5,6,7 on remote router.

If Step 5 doesn't work when doing Step 9 for remote router, then I guess we will need local user to setup tftp server to put the new IOS in remote pc so in case router in rommon mode when we do Step 6 in Step 9.

Does Plan A and B sound good to you? anything that is wrong and/or good to add?

thanks again,

Joyce

Leo Laohoo Wed, 04/08/2009 - 14:56

Hi Joyce,

"3. Take out the CF from router and put in pc. From PC, copy the new IOS to CF." < --- This will not work. Copy the IOS and ROMmon from your PC to the router's new CF using the command "copy tftp: flash:" or "copy tftp: usbflash0:". Take note that PC and Cisco file systems are totally different. Stick your PC USB into an ISR and the router will not be unable to read any files.

The reason why I recommend copying to the USB first is to make your USB the "master" copy. If you need to make a number of CF, then all you have to do is replace the CF but you use the command "copy usbflash0:* flash:".

"8. If it is success, then put the old CF to router and I will issue to wipe the old CF clean, and then copy the new IOS on the old CF and now this old CF is ready to ship from one remote office to another remote office to use."

Can't do this either. How can you copy from one CF to another when there is only one CF slot? This is also another reason why the USB comes in. Copy the files from the USB to the old CF by using the command "copy usbflash0: flash:"

If there is no need to replace the CF, then, in my humble opinion, I'd stick with Plan "B" (USB) because it's cheaper and faster. Cisco has a number of USB available and I believe the largest is 512mb.

blackladyJR Thu, 04/09/2009 - 06:08

Hi Joe again,

Based on your comment #3 above, so will that mean even copying IOS from pc to USB directly is still bad? (i.e. not just pc to CF). In that case in Plan B Step 2 is bad too then. I know I had tried in the past to format USB from pc directly(FAT16) and then copy IOS from pc to USB. After that I plugged that (non-cisco USB) back to router and router recognize the IOS on it and I can copy it from USB to CF. I didn't need to do tftp from the router to grab the IOS into USB nor CF at that time. But then I think doing your way is better and it's guaranteed by doing tftp.

In Plan B Step 4, is there any chance that we can screw up this rommon upgrade and then now my router is really dead and need hardware replacement? I mean we will do Step 3 to verify and check the md5 to make sure the downloaded IOS is good. But do I still have any risk doing Step 4 when I perform that remotely in the remote office to upgrade their rommon? Is there any minimum IOS or rommon IOS verson requirement in order we can "upgrade" the rommon IOS?

In Plan B Step 5 if somehow it didn't work to boot from USB after upgrading rommon, then what can possibly be wrong or need to do?

For #8 above, I guess I can copy the IOS via the WAN to the old CF if needed, like you said, I only have one slot. But at that time doing it over the WAN is fine because I have the new CF that has been tested and booted from remote router and know it worked, so now copy the new IOS to the old CF (just so this old CF can now ship to next remote office to use) now has no risk even power outage as I have the other CF to swap out when needed.

As for stick with Plan B. The problem is there are many of my 40 routers has 12.1, 12.2 and 12.3 today, so I think there is a minimum IOS prerequisite for router to recognize USB, I think it's something like 12.3.14T. So for those routers that do not have 12.3.14T or above, then I don't have a choice but to go with Plan A since it won't recognize USB. And yes, there is no need to replace CF in any of those sites.

You have been super great and giving me lots of good tips and insight. It has been really helpful. Very appreciate Joe.

Correct Answer
Leo Laohoo Thu, 04/09/2009 - 18:25

Hi Joyce,

"so will that mean even copying IOS from pc to USB directly is still bad?" < --- Files written by a PC can't be read by Cisco appliance because Cisco is using Unix OS.

However I have read about the FAT32 format but I have yet to try it. If you have tried it and it worked, then go ahead with it. :)

"In Plan B Step 4, is there any chance that we can screw up this rommon upgrade and then now my router is really dead and need hardware replacement?"

If the ROMmon file is invalid, the router will reject the upgrade. This is also one reason why I'm reluctant to try the FAT32-format option because I don't want to have a dead piece of brick in my hands. :)

"But do I still have any risk doing Step 4 when I perform that remotely in the remote office to upgrade their rommon?"

Purely optional. Besides, the file verification process won't take 5 minutes to complete.

"For #8 above, I guess I can copy the IOS via the WAN to the old CF if needed, like you said, I only have one slot."

You may have only one CF slot but the 2800/3800 ISR have 2 USB slots.

"The problem is there are many of my 40 routers has 12.1, 12.2 and 12.3 today" < --- How's that possible??? ISR's don't have 12.1 or maybe 12.2 IOS available.

Leo Laohoo Thu, 04/09/2009 - 18:58

Joyce,

Thanks for the rating.

Before I upgraded the IOS (and ROMmon) from my router, I actually "broke" a number of routers, mostly because the IOS were corrupted or I did something wrong. This was easily fixed by moving CF from one router to another and, thanks to Cisco, a ROMmon command called "tftpdnld".

Anyway, back to my scenario, I set up a testlab and I hammered together a step-by-step proceedure of what I should be doing. One of which was "REMOVE the USB before formating the CF. This is to prevent wiping out your USB due to a type-o." (Hey, accidents do happen!)

After a few gos, I was able to get the procedures correctly and made some minor revisions during the early implementation stages and now I can do the same process without looking at my cheat sheet. :)

Have a Happy Easter!

Leo Laohoo Thu, 04/09/2009 - 19:44

I've created a small procedure for you. The procedure presumes the following:

a. You have a CF and a USB which is less than 2Gb which contains IOS and ROMmon file for the specific model of router.

b. The router is running on an IOS which does NOT support USB or even USB boot.

Procedure:

1. Remove the old CF and insert the new 2Gb CF.

2. Command: dir flash: < --- Make sure the correct filename is present. You can also OPTIONALLY run the command "verify flash:" just to make sure.

3. Go to enable mode and remove the old boot variables (if necessary).

4. Still in configuration mode, type the command "boot system flash:"

5. Exit and save config.

NOTE: If you want to upgrade the ROMmon, go to Step #6 otherwise, reload/reboot the appliance and proceed to Step #8.

6. Upgrade the ROMmon using the command "upgrade rom-monitor file flash:"

7. The router will auto-reload.

8. When the router comes up, you can perform the necessary checks to your system. You can also verify that you are running the correct IOS.

9. Remove 2Gb CF and replace with old CF.

10. Command: erase flash:

-or -

You can also do "format flash:". Before entering this command, make sure the USB is NOT inserted and the 2Gb CF is NOT in the slot.

11. Insert the USB into slot 0 (aka usbflash0:).

12. Command: sh logs. You want to verify in the logs that the router has seen the USB.

13. Copy the new IOS from the USB to the CF. Command: copy usbflash0: flash:

14. Change the boot variable in configuration mode.

Commands:no boot system usbflash0:

Commands:boot system flash:

15. Exit and save config.

16. Remove USB and 2Gb CF and send back to you.

17. You can also OPTIONALLY run the command "verify flash:" just to make sure.

Let us know how it goes.

blackladyJR Fri, 04/10/2009 - 05:54

Thanks Leo. This procedure clearly is the best with an USB and CF shipped to the site to use. At the end the USB and swapped out CF can ship to the next site to repeat the procedure. I just hope I will have a big enough (256M) USB so it can hold 3 new IOS for 1841, 2801, 2811/21/51 (64M each for 12.4.15T8 that I plan to put in). And another 256M USB to hold 3825/3845 12.4.15T8.

So two master copy USB with all my possible versions I need for these 7 types of ISR in my client's network.

I will test out the procedure including the procedure to prep the USB and CF as well in lab routers.

Customer probably don't have many CF to ship out or take too long to wait for one site finish to ship the CF to next site for 40 sites worldwide.

Since they have half a dozen Cisco USB, most likely they will just ship all the USB to multiple sites at the same time.

Without CF , just with USB (for those sites that can recognize USB), it probably will be okay but will need to upgrade rommon first so to enable the USB boot feature before copying the new IOS from USB to CF to avoid the risk of something goes wrong during the transfer. As if that do happen, the router is fine since it can just boot off from USB without CF at that point so we have no risk. So I guess the only risk is upgrade rommon. You've mentioned the router rommon won't upgrade if the rommon IOS is corrupted? So you mean the router won't do anything if the new rommon ios is not good?

What about if the rommon ios is good and while the few mins that it is upgrading, then power outage at the exact moment, will the router has half the rommon ios and now "dead" really? I mean i know I cannot equate "upgrading rommon ios" with "transferring regular ios to CF".

I mean if we have a blank CF and we transfer IOS to CF, it has a window of few mins to transfer. And so if power outage during those few mins, now CF has not received the entire IOS or if the IOS is corrupted. So after reboot or boot up from power outage, router will be in rommon mode and at that point we need "tftpdnld" to rescue the router.

What about "upgrade rommon ios" scenario? Now that we have the new rommon ios in CF let's say. Now we issue "upgrade rom-monitor file ", now I assume this will take a min or two for it to complete. So during this minute, if there is a power outage, will the router be dead, i mean real dead, corrupted eeprom? hardware replacement? Or will the router won't have any problem and just back to existing rommon ios as if nothing has happened? I am trying to see what risk do I have to upgrade rommon IOS. I dont' really want to simulate the power outage in my lab router as if it will really go real dead, then I will be in trouble to replace the lab router.

thanks again,

Joyce

Leo Laohoo Fri, 04/10/2009 - 19:27

"You've mentioned the router rommon won't upgrade if the rommon IOS is corrupted?" < --- If you try to load the wrong ROMmon file, the router will reject it after the reboot.

"So after reboot or boot up from power outage, router will be in rommon mode and at that point we need "tftpdnld" to rescue the router." <--- That's why you have the USB, remember? :)

"I assume this will take a min or two for it to complete." < --- It would take around 10 seconds for the ROMmon file to be loaded and the "upgrade" will start after the router does a complete reload. I have never experienced a power outage in the midst of a ROMmon outage. But I would presume that in the span of 10 seconds, anything can go wrong. And if the ROMmon image wasn't loaded properly the router will just load the old image it got.

Happy Easter.

blackladyJR Sat, 04/11/2009 - 05:51

Happy Easter to you too Leo.

So it sounds like there is no "risk" to upgrade rommon ios then as if we load something bad, the router will reject and the old image is not "replaced" so it can still boot from old image. So in that case, I will upgrade rommon ios then.

You mean if i am in rommon mode with bad IOS or power outage during ios transfer, I don't need local user to setup tftp server in his pc and plug to router for me to do "set" with ip address, DG, tftp server ip address, file? I can use different command (while in rommon mode) to download the IOS from USB into router? If so what command? That means we don't need to rely on IOS being 12.3.14T or above to "recognize" USB at all while in rommon mode? so while in rommon mode, what is the minimum requiremdent for it to recognize USB?

I will be getting a cisco usb coming thursday so I can test everything out with lab router on friday before deployment to client's network.

thanks,

Joyce

Leo Laohoo Sun, 04/12/2009 - 00:17

"You mean if i am in rommon mode with bad IOS or power outage during ios transfer, I don't need local user to setup tftp server in his pc and plug to router for me to do "set" with ip address, DG, tftp server ip address, file? " < --- If during the IOS file transfer from USB to the old CF fails, then eject the OLD CF and insert the 2Gb CF and boot from this.

"If so what command?" < --- copy usbflash0: flash:

"so while in rommon mode, what is the minimum requiremdent for it to recognize USB?" < --- Minimum IOS (not ROMmon) is 12.4(4). ROMmon IOS v12.4(13r)T is described as "adds boot from USB flash drive capability".

blackladyJR Mon, 04/13/2009 - 04:00

For the second question above, so IOS will need to be 12.4.4 in order to recognize USB while router in rommon mode, is that correct? I mean if I have bad main IOS, router reboot, now i am in rommon mode. That means i don't have any main IOS anymore in this router. So how does 12.4.4 matter to the router then if router now is in rommon mode with no main IOS? So that's makes me wonder what is the requirement at that time for router to recognize USB? In this situation, will it be rommon IOS needs to be certain level to recognize USB (not boot, just recognize)?

Back to my first question above, if I don't have new CF, just USB at remote site with old CF let's say and power outage during transfer so now old CF has bad/no IOS on it, router reboot and in rommon mode. Assume router do not have 12.4.3rT rommon ios either so router cannot boot from USB. In this situation, (based on the answer of the second question of minimum requirement for router to recognize usb during rommon mode), then 2 scenarios:

1. Router recognize usb during rommon mode: what is the command to now copy new ios from USB to old CF while in rommon mode? I don't see "copy" command available in rommon mode. What command to use?

2. Router do not recognize usb during rommon mode: then i guess set up tftp server at remote user pc is the only choice to rescue at that time, do you agree?

thanks again,

Joyce

Leo Laohoo Mon, 04/13/2009 - 15:59

"For the second question above, so IOS will need to be 12.4.4 in order to recognize USB while router in rommon mode, is that correct? " < --- IOS 12.4(4), I believe, is the IOS where USB support started. This is where you can start getting the command "dir usbflash0:" and stuff. Not in ROMmon.

"I mean if I have bad main IOS, router reboot, now i am in rommon mode. That means i don't have any main IOS anymore in this router. " < --- That's why you have a USB or a CF. If the OLD CF has a corrupted IOS, then insert the 2-Gb CF and boot from it. Remember that the USB and 2-Gb CF is there for a reason other than to transfer files.

ROMmon and IOS are two separate OS. I can't explain it but ROMmon has it's own firmware and IOS is another. Just because the IOS recognize USB does not mean that ROMmon will too. It's not reciprocal.

1. If the router does not have ROMmon 12.4.3rT, then in ROMmon mode, the router will not be able to detect that you have a USB.

2. Correct. "tftpdnld" is your ownly way out. And this requires someone to be type in the command.

I avoided this scenario by shipping both a CF with all the IOS/ROMmon in it and a USB with all the IOS/ROMmon in it. Never had I once asked someone to plug his/her laptop to the console port.

blackladyJR Wed, 04/22/2009 - 06:12

Hi Leo,

I ordered a Cisco USB online and I end receiving a 3rd party USB and didn't work. It's a 128M and they said they have tested it in their lab and worked. But I tried it on a 2811 and didn't work for me. When I pull out the CF card and just plug the USB with the same IOS that I copied from the CF to USB. The router recognize the USB and can copy file back and forth but when I reboot, it goes to rommon mode and the "light" is off on USB.

here is the lab router details below, do you know I still need to upgrade the rommon ios and try again?

sat-ce-r21-2811>sh ver

Cisco IOS Software, 2800 Software (C2800NM-ADVENTERPRISEK9-M), Version 12.4(21), RELEASE SOFTWARE (fc1)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2008 by Cisco Systems, Inc.

Compiled Thu 10-Jul-08 02:21 by prod_rel_team

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

sat-ce-r21-2811 uptime is 22 hours, 18 minutes

System returned to ROM by power-on

System image file is "flash:c2800nm-adventerprisek9-mz.124-21.bin"

This product contains cryptographic features and is subject to United

States and local country laws governing import, export, transfer and

use. Delivery of Cisco cryptographic products does not imply

third-party authority to import, export, distribute or use encryption.

Importers, exporters, distributors and users are responsible for

compliance with U.S. and local country laws. By using this product you

agree to comply with applicable laws and regulations. If you are unable

to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:

http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to

[email protected].

Cisco 2811 (revision 53.51) with 772096K/14336K bytes of memory.

Processor board ID

6 FastEthernet interfaces

2 Serial(sync/async) interfaces

1 Virtual Private Network (VPN) Module

DRAM configuration is 64 bits wide with parity enabled.

239K bytes of non-volatile configuration memory.

255488K bytes of ATA CompactFlash (Read/Write)

Configuration register is 0x2102

thanks,

Joyce

Leo Laohoo Wed, 04/22/2009 - 14:44

Hi Joyce,

You're running the correct ROMmon v12.4(13r)T for USB support. The router, on bootup. is looking at the CF for the IOS. Can you try changing the boot statement and point it to the USB? Take note that "boot system usbflash0:", particularly the "usbflash0:" bit is, ahem, hidden.

Hope this helps.

blackladyJR Wed, 04/22/2009 - 14:54

Hi Leo,

Yes i have added the boot system as the first choice to use usbflash0: with boot system flash as the second line. And i plug in USB with CF in it. and I put a different IOS in the USB. so that when I reboot, I hope I will see the show version to show the new IOS being running but to my disappointment, it shows the CF version of IOS running. So that prompt me to just remove the CF and see, then I am in rommon mode.

So i guess it's just a non-compliance USB. they already sent me a 2nd one, and they said they have tested the 2nd one and they said it worked. I just don't know why it didn't work for me. Well, I guess I need to pay the big buck to buy the cisco genuine USB then.

Leo Laohoo Wed, 04/22/2009 - 16:02

Hi Joyce,

Before you put files into the USB, did you format the USB (from the router)?

If the USB is inserted, what do you see when you do a "dir usbflash0:"?

When you insert the USB, do you see anything in the router's logs confirming that a USB has been inserted?

blackladyJR Wed, 04/22/2009 - 16:10

Hi Leo,

yes I have formatted the USB from the router, not from pc. then from show file system or show version, both indicates it recognize the USB such as it shows 128M of size and indicate it's USB.

I then copy the file from CF to USB via the router. I also did the verify command on the IOS to ensure it's good in USB.

Leo Laohoo Thu, 04/23/2009 - 14:16

So when you insert the USB to the router, did it show up in the "sh logs"?

When the USB has been inserted and you do the "dir usbflash0:", what was the result?

blackladyJR Thu, 04/23/2009 - 14:26

when I insert the USB, it says "USBflash1 is added"...something like that.

then I do show version and it shows up. It also shows up in show file systems and I can do show usbflash1: to see the file there and do verify command as well.

I have returned the two USB back to vendor so I can't try for the dir usbflash1 command.

But for all the commands I can do and it certainly recognize the USB to copy file back and forth. I have also upgraded the rommom from T to T6 latest for 2811 but still won't boot from USB when I remove the CF card and added the boot system usbflash:

Just need to find another usb that will work....

rbill1967 Fri, 08/17/2012 - 12:16

I am kind of stuck at the same point, and I have tried the commands of usbflash.  It keeps telling me "bad device name", and I am stuck in rommon mode.  I am attempting to bring this 2821 back to life and can't get anything copied to it.  I even did a direct crossover cable from laptop and router.  I did the tftpdnld and it terminated because it timed out.

Any suggestions?

Leo Laohoo Fri, 08/17/2012 - 18:19
I am kind of stuck at the same point, and I have tried the commands of usbflash.  It keeps telling me "bad device name",

Your syntax is incorrect.  It should be "dir usbflash:".  You forgot the ":".  Hence, the response of "bad device name".

NOTE:  Good grief.  I thought this thread would've long dead. 

johnlloyd_13 Tue, 08/20/2013 - 04:12

hey leo,

interesting thread. sorry for bringing up this "dead" thread again, but i ended up performing a tftpdnld on my 1841.

could you help me check what i'm doing wrong here? i want to copy the IOS from USB to CF but when i tried swapping the 32 MB CF with a 64 MB one, it only hanged even if i put the boot command.

i've used a generic usb drive and an orig Cisco CF. thanks pre!

Router>show version

Cisco IOS Software, 1841 Software (C1841-IPBASE-M), Version 12.4(12a), RELEASE SOFTWARE (fc3)

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 1986-2007 by Cisco Systems, Inc.

Compiled Thu 22-Feb-07 15:10 by prod_rel_team

ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1)   <<< ROMMON IOS

Router#    

*Aug 20 07:37:10.647: %USB_HOST_STACK-6-USB_DEVICE_CONNECTED: A Full speed USB device has been inserted in port 0.

*Aug 20 07:37:11.291: %USBFLASH-5-CHANGE: usbflash0 has been inserted!

Router#format ?

  flash:      Filesystem to be formatted

  usbflash0:  Filesystem to be formatted

Router#format usbflash0:

Format operation may take a while. Continue? [confirm]

Format operation will destroy all data in "usbflash0:".  Continue? [confirm]

Format: Drive communication & 1st Sector Write OK...

Format: All system sectors written. OK...

Format: Total data sectors in formatted partition: 3947999

Format: Total data bytes in formatted partition: 2021375488

Format: Operation completed successfully.

Router#

*Aug 20 07:39:49.603: %USB_HOST_STACK-6-USB_DEVICE_DISCONNECTED: A USB device has been removed from port 0.

*Aug 20 07:39:49.707: %USBFLASH-5-CHANGE: usbflash0 has been removed!  // COPY IOS TO USB IN PC

Router#

*Aug 20 07:44:47.167: %USB_HOST_STACK-6-USB_DEVICE_CONNECTED: A Full speed USB device has been inserted in port 0.

*Aug 20 07:44:47.807: %USBFLASH-5-CHANGE: usbflash0 has been inserted!

Router#dir usbflash0:

Directory of usbflash0:/

    1  ----           0  Aug 20 2013 07:39:20 +00:00  SYSTEM

    2  -rw-    40529832  Jul 14 2013 10:08:04 +00:00  c1841-adventerprisek9-mz.124-24.T2.bin

2021359616 bytes total (1972666368 bytes free)

Router#verify usbflash0:c1841-adventerprisek9-mz.124-24.T2.bin

%Filesystem does not support verify operations

Verifying file integrity of usbflash0:c1841-adventerprisek9-mz.124-

24.T2.bin.........................................................................................................

..................................................................................................................

.................................................................................................................

....................................................................................................Done!

Embedded Hash   MD5 : D4265070CE2266CB3C7F459A49C1EFAA

Computed Hash   MD5 : D4265070CE2266CB3C7F459A49C1EFAA

CCO Hash        MD5 : B7C09EB264EA1D50E0E8254DB8DFF429

Signature Verified

Router#

*Aug 20 07:48:28.951: %FILESYS-5-CF: External CompactFlash removed   // SWAPPED 32 MB TO 64 MB CF

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

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 2006 by cisco Systems, Inc.

PLD version 0x10

GIO ASIC version 0x127   // HANGED

----

Router(config)#boot system usbflash0:c1841-adventerprisek9-mz.124-24.T2.bin

Router(config)#do wr

Router(config)#^Z

Router#

*Aug 20 10:55:02.051: %SYS-5-CONFIG_I: Configured from console by console

Router#

*Aug 20 10:55:48.631: %FILESYS-5-CF: External CompactFlash removed

Router#

*Aug 20 10:56:17.411: %USB_HOST_STACK-6-USB_DEVICE_CONNECTED: A Full speed USB device has been inserted in port 0.

*Aug 20 10:56:18.055: %USBFLASH-5-CHANGE: usbflash0 has been inserted!

Router#reload

Proceed with reload? [confirm]

*Aug 20 10:56:44.747: %SYS-5-RELOAD: Reload requested  by console. Reload Reason: Reload Command.

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

Technical Support: http://www.cisco.com/techsupport

Copyright (c) 2006 by cisco Systems, Inc.

PLD version 0x10

GIO ASIC version 0x127     <<< HANGED, DOESN'T BOOT FROM USB

Actions

This Discussion