Cisco Router Fails To Boot Flash

Carlosinfl

Loves the juice
Joined
Sep 25, 2002
Messages
6,633
I have an older Cisco 2600 series router than was power cycled and now for some reason gets an error while booting:

Code:
loadprog: bad file magic number:      0x0

boot: cannot load "flash:"

I don't know what caused it but for some reason this machine is not booting. It loads to the 'rommon 1' prompt and from there I have tried changing the config register first to 0x2102. After I rebooted, it still didn't boot from flash. I then tired the following:

Code:
rommon 2 > confreg

Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: the ROM Monitor

do you wish to change the configuration? y/n [n]: y
enable "diagnostic mode"? y/n [n]:
enable "use net in IP bcast address"? y/n [n]:
disable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
enable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]:
change the boot characteristics? y/n [n]: y
enter to boot:
0 = ROM Monitor
1 = the boot helper image
2-15 = boot system
[0]: 2

Configuration Summary
enabled are:
load rom after netboot fails
console baud: 9600
boot: image specified by the boot system commands
or default to: cisco2-C2600

do you wish to change the configuration? y/n [n]: n
You must reset or power cycle for new config to take effect

After I rebooted the router, it made no difference. Anyone know what I can do to get this thing back working? :(
 
1. Can you run "sh ver"?

2. Did you try "sh log" and see if you got any errors?

3. Did you check flash to make sure that there were no crashes?

4. You didn't press the PAUSE button during boot, right?

You might have to do Ronmon Recovery Mode:http://www.cisco.com/en/US/products/hw/routers/ps259/products_tech_note09186a0080094a0b.shtml

Otherwise, you might need to reload the IOS (maybe it got corrupted): http://www.cisco.com/en/US/products/hw/routers/ps259/products_tech_note09186a00801fc986.shtml


Maybe someone else in the forum can provide more information.
 
Because it's not booting from flash, the normal IOS commands don't work.

Code:
rommon 1 > sh ver


monitor: command "sh" not found
 
I am looking at link to try and get this thing operational. Am I looking at the correct documentation?
 
when it boots to rommon type. dir flash:
if it shows that the image is there try
boot flash:image.name.here

If you dont have anything listed in the flash its time for disaster recovery.
Here in the lab we use:
IP_ADDRESS=xxx.xxx.xxx.xxx
IP_SUBNET_MASK=xxx.xxx.xxx.xxx
DEFAULT_GATEWAY=xxx.xxx.xxx.xxx
TFTP_SERVER=xxx.xxx.xxx.xxx
TFTP_FILE= the file you want to load (with the extension)
sync
tftpdnld
 
Yup. Looks like the image.bin file is missing. All I have saved in flash in my config file. Sadly it too is not backed up on this particular router. I logged into Smartnet and downloaded a new IOS image but realized that when I load it via TFTP, the config file saved in flash will be erased. Is there any possible way to copy / view / save that config before I use 'tftpdnld'?
 
Do tftpdnld -r

This will download IOS directly to RAM and boot it. Then, it will load your config and you can copy the IOS image to flash using IOS.
 
Yeah, didn't know about that bit. Last time I had to reload the IOS, I was able to copy the config on a USB drive that was connected to the router.
 
Did it work? I'm curious because I didn't know about that little trick either. I think the last time I did an image recovery it was over xmodem on a switch. Had to let it run overnight. :D

Trying this today, Got caught up in VLAN nightmare yesterday and didn't have time to work on this.
 
OK...

I ran the following and came up with an issue that there is not enough RAM on the system for the image :confused:

Code:
rommon 9 > tftpdnld -r


          IP_ADDRESS: 10.1.10.200

      IP_SUBNET_MASK: 255.255.255.0

     DEFAULT_GATEWAY: 10.1.10.1

         TFTP_SERVER: 10.1.10.50

           TFTP_FILE: ios.bin



Receiving ios.bin from 10.1.10.50 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

File reception completed.

program load complete, entry point: 0x80008000, size: 0xf57258

Self decompressing the image : ##################################################################################################################################################################################################################################################################### [OK]



Smart Init is enabled

smart init is sizing iomem

  ID            MEMORY_REQ                 TYPE

000091          0X0008B800 C2600 single Ethernet

0000D6          0X000D8A10 Fast Ethernet Port Module, 0FE2W

                0X00098670 public buffer pools

                0X00211000 public particle pools

TOTAL:          0X0040D880


If any of the above Memory Requirements are 

"UNKNOWN", you may be using an unsupported

configuration or there is a software problem and

system operation may be compromised.

Rounded IOMEM up to: 5Mb.


 [B][COLOR="Yellow"]Not enough memory in the system to run this image[/COLOR][/B]

 Required pmem/iomem: 55599530/524288

*** System received a Software forced crash ***

signal= 0x17, code= 0x200, context= 0x80005f7c

PC = 0xffffffff, Vector = 0x200, SP = 0xffffffff

Any suggestions?
 
Last edited:
Add more ram, or wipe the config or see if you have a smaller ios to run just to get it up and running.
Also a handy little tidbit.. If you have to xmodem a switch bump the BAUD rate. xmodem doesn't take to long at 115600 baud (well vs 9600 anyway)
 
Downloaded a smaller IOS version labeled 'IP' rather than 'Enterprise Basic' & it worked. It loaded the IOS and then right when it was completed it loaded into the IOS and automatically read my config. My question is now do I need to do anything to save the IOS into flash? How would I go about doing this?
 
Downloaded a smaller IOS version labeled 'IP' rather than 'Enterprise Basic' & it worked. It loaded the IOS and then right when it was completed it loaded into the IOS and automatically read my config. My question is now do I need to do anything to save the IOS into flash? How would I go about doing this?


Can you output a sho version and dir on the flash disk/s?
 
Yes, it's just in RAM. It did not put it into flash. Do the following:

copy tftp:imagename.bin flash:
Address of host: (same as before)
Dest name: <enter>

sh run | i boot sys
(if anything come back, remove these in conf mode by placing a no in front)

then still in config mode:
boot system flash flash:imagename.bin
config-register 0x2102

copy ru st

reload (if you want to test.. not necessary)
 
Yes, it's just in RAM. It did not put it into flash. Do the following:

copy tftp:imagename.bin flash:
Address of host: (same as before)
Dest name: <enter>

sh run | i boot sys
(if anything come back, remove these in conf mode by placing a no in front)

then still in config mode:
boot system flash flash:imagename.bin
config-register 0x2102

copy ru st

reload (if you want to test.. not necessary)

So I already successfully TFTP'd the IOS to RAM with the previous configuration I posted above. Now I don't really understand what parameters I need to enter with your suggestion since the IOS is loaded in RAM. I am no longer booting (ROMMON) mode. I can successfully enter enable mode but I suspect as you noted that it's because I am loading the IOS from RAM and not Flash.

So I need to start up my TFTP server again and copy the IOS from the server using the 'copy' command?

I am guessing the address of host is my TFTP server IP.

Destination name I assume has to be the IOS.bin file name, correct?
 
When you boot a Cisco router w/0x2102, the first thing it does is look at your bootvar to determine which image to boot. Once it finds it, it loads the entire thing into RAM and never accesses it from flash again until next reboot. When you did tftpdnld -r, you changed the source of where it loaded the image into RAM. Does this make sense now?

The commands I gave you are IOS commands. I'll type in some prompts if that will make more sense. And when you hit enter after dest file name, it will use the filename displayed in the [] brackets unless you specify otherwise. Start up your TFTP server again and do this:

Router#copy tftp:imagename.bin flash:
Address of host: (your TFTP server)
Dest name: [imagename.bin] <enter>

Router#sh run | i boot sys
(if anything come back, remove these in conf mode by placing a no in front)
Router#conf t
Router(config)#no boot system flash flash:imagesomething.xyz

then still in config mode:
Router(config)#boot system flash flash:imagename.bin
Router(config)#config-register 0x2102
Router(config)#^Z

Router#copy ru st

Router#reload (if you want to test.. not necessary)

Oh, and alternatively.. you could skip all of the boot system stuff because it looks like you already have "boot system flash flash:". We never do this in prod, but it's up to you.
 
Oh, and alternatively.. you could skip all of the boot system stuff because it looks like you already have "boot system flash flash:". We never do this in prod, but it's up to you.

I have reloaded the router several times and she is coming up fine each and every time. The only thing I notice when the machine comes alive again is:

Code:
00:00:21: %SNMP-5-COLDSTART: SNMP agent on host riptide is undergoing a cold start

Can I simply disable this with out impacting any routing features?
 
Thanks all. The router is up and running perfect! Just out of curiosity if the device has two serial CSU/DSU interfaces. I no longer need 'serial 0/0' on this machine so I went into the router config and did the following:

Code:
# config t
# interface serial 0/0
# no shutdown

After I save that, I still see an amber LED on the CSU/DSU card which I assume is AL (ALARM) since the interface is not hooked up. Is there anything else I need to do or is 'no shutdown' it?
 
Code:
router (config-if)#no shutdown
turned it on

Code:
router (config-if)#shutdown
turns it off

the alarm light on an unpatched T1 port is normal... just ignore it
 
Back
Top