I have a new 7206 router that I will put in place soon.
In the meantime, I would like to take the opportunity to experiment with using the flash disk.
I have looked at the document on Cisco's site, but it is very basic.
I have a couple of questions:
1. My understanding is the boot image can be on onboard flash or the compact flash and by default the router will check on board flash first, then the compact flash, is this correct?
2. What are the most common usage for the flash disk?
3. Below is from another 7206 in production:
BOOT variable = disk0:c7200-jk9o3s-mz.123-14.T7.bin,12;
CONFIG_FILE variable does not exist
BOOTLDR variable does not exist
Configuration register is 0x2102
Open device slot0 failed (No such device)
It looks like there is no onboard flash on this router and everything is located on disk0:
Directory of disk0:/
1 -rw- 1807 Jan 20 2005 21:20:58 -05:00 home.shtml
2 -rw- 26792036 Apr 03 2006 13:32:22 -04:00 c7200-jk9o3s-mz.123-14.T7.
3 -rw- 93095 Jan 20 2005 21:20:58 -05:00 attack-drop.sdf
4 -rw- 270848 Jan 20 2005 21:21:00 -05:00 home.tar
5 -rw- 1187840 Jan 20 2005 21:21:02 -05:00 ips.tar
6 -rw- 3885056 Jan 20 2005 21:21:10 -05:00 sdm.tar
7 -rw- 1463 Jan 20 2005 21:07:42 -05:00 home.html
4. Did anything have to be done to this router for the router to boot (other than modify bootvar) or is this default behavior?
5. What is the upgrade procedure if I need to put an upgrade image larger than what this disk can hold?
1) Yes by default
2) Storing the IOS image if it will fit on the internal flash.
3) try "dir /all" to see all your filesystems but yes your IOS is on disk0:
4) See 1 but also you can specify which image to boot with "boot system flash disk0:c7200..." in the running config.
5) Get a bigger compact flash card or delete some of the existing files if it just a lack of available space.
Is there a step by step procedure (maybe one someone has done themselves) that I could use to upgrade the 7206?
I have a new 7206 and thought of saving existing image, downgrading it and then upgrading to original image to try it a couple of time and maybe document what works well, but I am not sure the exact procedure.
It makes me nervous to do something on a production router or switch.
I understand your nervousness but it is quite simple to upgrade. It is basically a question of
1) download a new image to either the onboard flash or the compact flash via tftp
2) Ideally if possible you want to keep the old image in case you need to revert to that one. If you have to delete the old image to load the new one then you don't need to do step 3.
3) Once you have your new image you can then set the "boot sytem flash.." variable eg. lets say you have just downloaded a new image onto disk0:
7206(config)# boot system flash disk0:c7200-js-mz.123-14.T4.bin
Double check to make sure you have entered the image name correctly, wr mem and then reload the router.
You may get some warning messages on reboot about certain commands not being compatable with your new IOS image but you can usually just ignore them.
4) When the router has reloaded do "wr mem" and you will get a warning about the config you are about save being with a previous IOS image. It's fine to just save the new config.
what are the commands to copy the image to the compact flash?
and how do I do the format to recover the disdk spaceas stated below?
what is the procedure to swap out for a larger flash card and can it be done while the router is online?
"5) Get a bigger compact flash card or delete some of the existing files if it just a lack of available space."
BTW: Often different formatting options exist for flash. Using the older ("erase"), deleting files doesn't recover space. Using the newer ("format") does reuse space.
As Jon correctly notes, flash is most commonly used for containing the IOS image, but it can be used for other functions, such as add on features, e.g. SDM, or TFTP server, etc.
What is the procedure to delete the existing files?
What if the boot image is the only large file on the flash?
You cannot delete the image that is running on the router can you?
See the response(s) inline.
""What is the procedure to delete the existing files?""
delete disk0: (follow the prompt to delete the files that you no longer want) You may have to issue the squeeze command to free up the space if the router doesn't free up the memory space even after you delete the image.
""What if the boot image is the only large file on the flash?""
see the next response.
""You cannot delete the image that is running on the router can you?""
If you can delete any unwanted files in disk0 and make enough room for the new image that would be the way to go. However, if you have delete the actual IOS image to make room then technically you should be able to delete the IOS image on disk0 even if the router is currently using it. However, after you delete the image but you haven't loaded the new image the router reboots then it would fail to boot and go into rommon mode. So just be careful there and not let the router reboot before new image is loaded and boot system command is pointed to the new image.
I have a new 7206 and wanted to try this procedure a few times.
Is there a safe way to downgrade the router to an earlier image, save the existing image and go throught the upgrade process afew times?
Also, what are your thoughts on upgrading IOS images?
Do you upgrade as soon as the latest revision comes out?
An as far as the T train,GD, LD ED releases,
Is the GD always more desirable that the ED relaease?
Do you have to always put a T train on a T train relase?
No problem Richard.
Here's a CCO link that should help you go through the upgrade process.
Since you want to downgrade the code the new (older) code mightn't accept some commands if it doesn't support those features. Make sure the downgrade code that you pick supports all the features that you are currently using. Use the Feature Navigator tool to pick the correct IOS image you need based on the features you are using. Here's the link for the Feature Navigator.
GD code is considered more stable code. T code supports newer features that you mayn't find with GD code of the same version. If you can find a GD code that supports all the features you are looking for then go with GD code. If you end up picking the T code then go with the highest release in the T code. I have responded to the other post about upgrading the IOS.
"delete disk0: (follow the prompt to delete the files that you no longer want) You may have to issue the squeeze command to free up the space if the router doesn't free up the memory space even after you delete the image."
Good point about usage of squeeze command. However, I recall squeeze command wasn't supported on some of the older devices/images. Shouldn't be an issue on a 7200. Further, hopefully the flash is already in the newer format that doesn't require squeeze to reclaim space.
Another point that might have been missed, bootvar only needs to be set if not having it doesn't select the image you desire. (The default is the first acceptable[?] IOS image on the default boot device.) Further, I believe, bootvar can point to just a device, where it will also select the first image on that device.
Thanks for the information, from the below taken from a 6509 switch, would this be a good assumption:
I can copy an upgrade image to the compact flash disk. It shows nothing on it and should be plenty of space. This will also allow me to keep the existing image in place.I could then change the bootvar to point to the compact disk image.
If I run into trouble, remove the bootvar command and reload, this will boot back to the original image.
Does all of that sould like a working plan?
Also, is there anything else that needs to be done?
This also means that I could copy the new image at any time I want?
Directory of system:/
2 dr-x 0
1 -rw- 135584
12 dr-x 0
No space information available
Directory of tmpsys:/
6 drw- 0
5 drw- 0
4 drw- 0
1 dr-- 0
No space information available
Directory of flexwan-fpd:/
No space information available
Directory of disk0:/
No files in directory
63840256 bytes total (63840256 bytes free)
Directory of sup-bootflash:/
1 -rwx 41860100 Oct 14 2006 02:47:22 -04:00 s72033-ipservicesk9-mz.122
65536000 bytes total (23675772 bytes free)
Directory of sup-microcode:/
1 -r-- 18353238
2 -r-- 6168850
3 -r-- 7402166
4 -r-- 315100
5 -r-- 376572
6 -r-- 309342
7 -r-- 375196
8 -r-- 356782
9 -r-- 692510
10 -r-- 681982
11 -r-- 746718
12 -r-- 846046
13 -r-- 1009326
14 -r-- 65318
15 -r-- 60490
37759636 bytes total (0 bytes free)
Directory of const_nvram:/
1 -rw- 4636
129004 bytes total (124368 bytes free)
Directory of nvram:/
1918 -rw- 135540
1919 ---- 24
1920 -rw- 135540
1 ---- 4
2 ---- 35
3 -rw- 0
1964024 bytes total (1825336 bytes free)
Directory of bootflash:/
1 -rw- 17891428 Apr 17 2004 00:25:52 -04:00 c6msfc3-pk9sv-mz.122-17a.S
2 -rw- 351438 Jan 31 2006 14:43:43 -05:00 crashinfo_20060131-194343
3 -rw- 346449 Sep 24 2006 01:07:36 -04:00 crashinfo_20060924-050736
4 -rw- 348970 Sep 24 2006 00:12:46 -04:00 crashinfo_20060924-041246
65536000 bytes total (45181192 bytes free)
Yes you can place the new image in disk0: and then set the "boot system flash disk0:
Bear in mind that you can enter multiple "boot system flash .." commands into the running-config and they will appear in the running-config in the order you add them on the command line.
What would I do without you guys?
One last question on this,
What would be the reason to put mutliple entries of "boot system flash"?
The switch would always boot to the image which is first in the config correct?
And what would be the result with no entry in the bootvar?
I use it for testing purposes and also in case i make a typo and then it just fails through to the next one.
Yes the switch will always try and boot the first one in the running-config if you have specified it.
Would have to run quick test with 6500. Certainly with no bootvar it would load image in sup-bootflash but not sure it there wasn't one there it would move onto disk0:
Perhaps someone else knows for sure ?
Besides testing, you can use multiple different bootvars to help support quick device recovery. Especially handy on devices that contains multiple flash devices, especially removables.
boot system flash disk1:intended_image.bin
boot system flash disk1:
boot system flash disk0:
If the first boot var isn't found, it continues down the list. Assume there's a major problem with disk1:intended_image.bin, We can very quickly boot into an image on disk0 just by pulling the disk1 device or swap disk1 media and reload. Neither requires changing the config.
Sometimes very handy when the device is remote and there's no local support staff and you've lost connectivity to the box. You can usually talk an admin person through pulling a compact flash module (or swapping it with another) and power cycling the system.
Sorry for this, but
Are you saying the you usually have more than one image loaded and as in the upgrade example?
You put both entries in the boot var, for instance in my case,
I load the new image onto compact flash and that is the first entry in bootvar, I leave the other image in the sup flash, if I have a typo, the switch will boot to the old image?
Also on the location of the images, does it matter that if I leave it in the compact flash?
I do not understand why it has not been used, or is it possible to move the image from one place to another (compact flash to sup flash) during operation?
Also, I see there is an image in bootflash (an earlier image) and one in sup bootflash, there are three locations to load an image?
No need to apologize.
Some images will not fit on the bootflash or the sup-bootflash and so you have no choice but to boot off a compact flash card.
In addition it's important to remember that if the only image you have is on compact disk then someone can simply remove the disk. Next time the switch reloads it won't have an inmage to boot.
If i had the space i would try and ensure the image i wanted to use would be on internal flash.
You can copy the image around between compact flash and sup flash, again subject to space considerations, but the switch will not move it itself.
Excellent points everyone.
So, what I could do since the switch is booting from sup flash:
Load the new image onto cpmpact flash, while adjusting the bootvar to boot to both with the new image being the first to try (from compact flash).
Once I am sure the new image is a good one, I could erase the old image off of sup flash and copy the new upgrade image onto sup flash in a second location.
Then adjust the boot var accordingly.
This way, if the flash gets removed or corrupted in some way, upon reboot, I am booting to my upgraded image from supflash also.
Does that sound like a working plan?
By the way, I appreciate all of the assistance. I could never read the documents and get as good an understanding as I do when you guys help with the real works conditions.
It is greatly appreciated.
Sounds like a very sound plan of action.
As for assistance, without presuming to speak for everyone, i think we all enjoy helping others out and thanks for all the ratings which shows your appreciation.
One last hint, not uncommon to run out of space on flash with newer IOSs or larger feature set versions. If the device supports external flash, usually easy to obtain a larger one. But if internal flash isn't large enough, how might it be used?
I've often loaded an older or reduced feature set IOS that fits on the internal flash and run the current IOS from external flash. This often then allows a "backup" IOS if something goes wrong with the current external version. (Often much nicer to deal with than ROMMON.)
Sorry missed this bit
"This also means that I could copy the new image at any time I want?"
Yes you can copy it onto disk0: anytime and it will not affect the normal operation of the switch.
You had some queries earlier in this thread. See my response(s) inline. May be this would address Richard's concern as well with regard to the upgrade process.
""Would have to run quick test with 6500. Certainly with no bootvar it would load image in sup-bootflash but not sure it there wasn't one there it would move onto disk0:""
No it won't look for an image on disk0 if no valid image couldn't be found in the sup-bootflash. Anytime you want the switch to boot from an external flash card you certainly need the boot system commands configured.
""I use it for testing purposes and also in case i make a typo and then it just fails through to the next one.
Yes the switch will always try and boot the first one in the running-config if you have specified it.""
I believe it will try 3 or 4 times to boot from the 1st image in the boot statement and if it fails it would attempt to boot from the next image in the list (top-down).
Thanks for confirming that, couldn't remember how it worked if there was only an IOS on compact flash but no boot variable.
I will post that one tomorrow.
One thing I forgot to ask on the flash:
Suppose something goes wrong and I boot to rommon,
I have two images, but the switch only tries the first one and then boots to rommon,
Can I remove the first line in the start config to boot to the second image while in rommon?
I hope nothing goes wrong for you with this upgrade.
If it does follow the rommon recovery procedures listed in this document.
As you can see in this document you would use the boot bootflash:<2nd_image_name> command in the rommon mode to make the switch boot from that image.