cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
89266
Views
18
Helpful
36
Replies

USB Flash boot

blackladyJR
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

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.

View solution in original post

36 Replies 36

Edison Ortiz
Hall of Fame
Hall of Fame

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
Hall of Fame
Hall of Fame

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.

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

"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$$!

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?

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? :)

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

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. :)

Step1:


switch: boot usbflash0:c3750e-universalk9-mz.150-2.SE1.bin


Loading "usbflash0:c3750e-universalk9-mz.150-2.SE1.bin"...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Step2:

After that please check wether IOS file is there in flash: or not

Switch#dir
Directory of flash:/

5 -rwx 2835 Mar 30 2011 01:29:37 +00:00 config.text
2 -rwx 1916 Mar 30 2011 01:29:37 +00:00 private-config.text
3 -rwx 3096 Mar 30 2011 01:29:37 +00:00 multiple-fs

if IOS not there follow step3.
If IOS is there follow Step4

Step3:

If IOS is not there , we have to copy IOS fro USB to flash.

Switch#copy usbflash0: tf
Switch#copy usbflash0: flash:
Source filename []? c3750e-universalk9-mz.150-2.SE1.bin
Destination filename [c3750e-universalk9-mz.150-2.SE1.bin]?
Copy in progress...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
20354176 bytes copied in 60.088 secs (338739 bytes/sec)
Switch#dir
Directory of flash:/

5 -rwx 2835 Mar 30 2011 01:29:37 +00:00 config.text
2 -rwx 1916 Mar 30 2011 01:29:37 +00:00 private-config.text
3 -rwx 3096 Mar 30 2011 01:29:37 +00:00 multiple-fs
4 -rwx 20354176 Mar 30 2011 01:33:36 +00:00 c3750e-universalk9-mz.150-2.SE1.bin


Step4:

Then set the Boot variable

Switch(config)#boot system flash:c3750e-universalk9-mz.150-2.SE1.bin


Switch#reload
Proceed with reload? [confirm]y

reload

Leo Laohoo
Hall of Fame
Hall of Fame

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
Hall of Fame
Hall of Fame

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.

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.

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

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco