If, by some strange alignment of the stars and planets, both the primary and secondary flash images on a Foundry FastIron Edge switch happens to get erased, AND the switch happens to be rebooted before you catch the problem, it is possible to reinstall a flash image via TFTP from the boot monitor. Here's how to do it. You know, just in case it were to happen...speaking hypothetically, of course.
When the switch reboots without a flash image, it will enter boot monitor mode. You will know it is in boot monitor mode because the prompt will say...:
BOOT MONITOR>
First, you need to assign an IP address and, if necessary, a default gateway to the switch:
BOOT MONITOR>ip address 10.1.2.3/24
Load bootp-tftp image
ip address = 10.1.2.3, subnet mask = 255.255.255.0
BOOT MONITOR>ip default-gateway 10.1.2.1
ip default gateway = 10.1.2.1
BOOT MONITOR>
Next, verify that the IP address and default gateway have been set correctly:
BOOT MONITOR>show ip
IP address: 10.1.2.3
Subnet mask: 255.255.255.0
Default gateway: 10.1.2.1
BOOT MONITOR>
So far, so good. Now verify that you can reach the TFTP server (don't forget to start the TFTP server!):
BOOT MONITOR>ping 10.1.2.2
Received 1 replies from remote host
BOOT MONITOR>
If you can't ping the TFTP server, find out why before proceeding. Otherwise, boot the switch from TFTP:
BOOT MONITOR>boot system tftp 10.1.2.1 FES03500.bin
BOOT MONITOR>
At this point, the switch should be running the new image, but it hasn't stored the image in flash yet. Unfortunately, you can't just write the running image to the flash drive; you have to upload it from the TFTP server again:
FES2402 SWITCH>en
FES2402 SWITCH#config t
FES2402 SWITCH(config)#ip address 10.1.2.3/24
FES2402 SWITCH(config)#exit
FES2402 Switch#copy tftp flash 10.1.2.2 FES03500.bin primary
FES2402 Switch#Flash Memory Write (8192 bytes per dot)........................
............................................................................................................
............................................................................................................
...........................
TFTP to Flash Done.
FES2402 Switch#
You should have a nice, shiny, new image in flash now. But if something didn't go right (like, I don't know, maybe you forgot to set your IP address, or you set it wrong, perhaps?), you don't want to start over from the beginning. So, before you reboot the switch, verify that you have the new image in flash:
FES2402 Switch#show flash
Compressed Pri Code size = 2193091, Version 03.5.00Tc1 (FES03500.bin)
Sec Code Flash Empty
...
You will get a lot more output than this, but as you can see from the first line of output, Version 03.5.00Tc1 (FES03500.bin) is installed in the primary flash. As long as you see that your image has been stored in the primary flash, you can reboot the switch. If you don't see it, figure out what went wrong and try again.
Do you see the image in flash, now? Good. Let's reboot the switch:
FES2402 Switch#reload
Are you sure? (enter 'y' or 'n'): y
Could not verify if the Running Config data has been changed.
Do you want to continue the reload anyway? (enter 'y' or 'n'): y
Halt and reboot
FE Boot Monitor Version 03.5.00 (BLDR-Rev1a)
Enter 'b' to go to boot monitor ...
BOOT INFO: load monitor from code flash, size = 49021
BOOT INFO: load image from primary copy
BOOT INFO: bootparam at 000228e0, mp_flash_size = 002176e3
BOOT INFO: code decompression completed
BOOT INFO: branch to 00400100
........
Crossbar initialization Done
Parsing Config Data ...
INFO: empty config data in the primary area, try to read from backup
INFO: empty config data in the backup area also
SW: Version 03.5.00Tc1 Copyright (c) 1996-2006 Foundry Networks, Inc.
Compiled on Mar 01 2006 at 10:06:41 labeled as FES03500
(2193091 bytes) from Primary FES03500.bin
Boot Monitor: Version 03.5.00Tc4
...
FES2402 Switch>en
No password has been assigned yet...
FES2402 Switch#
WOOHOO! You dodged the bullet this time! Reload your configs on the switch, and next time, be more careful!!!
No comments:
Post a Comment