Wednesday, November 23, 2011

Flashing IOS on a 1841

I recently bought a Cisco 1841 which was missing its CF card for $15. I found a small 64mg Sandisk replacement and needed to reload IOS. A quick Google search for a copy of 12.4 turned up a copy  and today I attempted to upload the flash. The router was stuck in rommon and after finding out a xmodem copy was going to take 4 hours, I quickly downloaded Solarwinds TFTP server and moved the copy of IOS to the C:/tftp root directory. I renamed it to c1841.bin.

Here are the basic steps I took:
1) Setup Hyperterminal to 9600 8-N-1
2) Set your network adapter to a static IP of 10.1.1.1
3) Start your TFTP server- make sure the service is added to your Windows 7 firewall or it will time out
4)Use a crossover cable, switch, or gigabit adapter which will allow auto negotiation.
5) At the rommon promp enter the following:

rommon 1> IP_ADDRESS=10.1.1.2
rommon 2 > IP_SUBNET_MASK=255.0.0.0
rommon 3 > DEFAULT_GATEWAY=10.1.1.254
rommon 4 > TFTP_SERVER=10.1.1.1
rommon 5 > TFTP_FILE=c1841.bin
rommon 6 > tftpdnld
(The next lines are the output from the console)

          IP_ADDRESS: 10.1.1.2
      IP_SUBNET_MASK: 255.0.0.0
     DEFAULT_GATEWAY: 10.1.1.254
         TFTP_SERVER: 10.1.1.1
           TFTP_FILE: c1841.bin
        TFTP_MACADDR: 00:18:ba:9f:24:96
        TFTP_VERBOSE: Progress
    TFTP_RETRY_COUNT: 18
        TFTP_TIMEOUT: 7200
       TFTP_CHECKSUM: Yes
             FE_PORT: 0
       FE_SPEED_MODE: Auto Detect

Invoke this command for disaster recovery only.
WARNING: all existing data in all partitions on flash will be lost!
Do you wish to continue? y/n:  [n]:  y

6) Select yes to load the new image.

Receiving c1841.bin from 10.1.1.1 !!!!!!!!
File reception completed.
Validating checksum.
Copying file c1841.bin to flash.
program load complete, entry point: 0x8000f000, size: 0xc100



Format: Drive communication & 1st Sector Write OK...
Writing Monlib sectors.
................................................................................
..................
Monlib write complete

Format: All system sectors written. OK...
Format: Operation completed successfully.

Format of flash: complete
program load complete, entry point: 0x8000f000, size: 0xc100

Initializing ATA monitor library.......



7) After it finishes copying, boot the new IOS.
rommon 7> boot

You should now be greeted by txt prompting you to start the initial config. :)


If your only option is to install via console here are some helpful instructions I found here:
LINK


To load an IOS onto a router using ROMmon mode via the Cisco console cable:
  1. Connect to the router using the light blue Cisco console cable (make sure the RJ-45 connector is plugged into the console port on the router) using the 9600-8-N-1 settings. The next two steps (changing the console baud rate) are optional.
  2. In ROMmon mode, change the baud rate to 15200 using the confreg command.
rommon 1>confreg
Configuration Summary
enabled are:
break/abort has effect
console baud: 9600
boot: the ROM monitor
¨ The router will guide you through changing the registry. You want to press y to chang the configuration. The only other change you need to make is the change to the console baud rate, set that to 7 (115200).
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]:
enable "load rom after netboot fails"? y/n [n]:
enable "use all zero broadcast"? y/n [n]:
disable "break/abort has effect"? y/n [n]:
enable "ignore system config info"? y/n [n]:
change console baud rate? y/n [n]: y
enter rate: 0 = 9600, 1 = 4800, 2 = 1200, 3 = 2400
4 = 19200, 5 = 38400, 6 = 57600, 7 = 115200 [0]: 7
change the boot characteristics? y/n [n]:

Configuration Summary
enabled are:
break/abort has effect
console baud: 115200
boot: the ROM Monitor
 do you wish to change the configuration? y/n [n]:
You must reset or power cycle for new config to take effect.
 rommon 2>

  1. When you reset the router in your console window you will see characters that you cannot read. You have to stop the session and set your baud rate to 115200. This will let you increase the speed that you use to transfer the file.
  2. At the rommon prompt enter xmodem -c {filename}
  3. When prompted, enter y to continue
  4. From your hyperterminal prompt, click on transfter then send file
  5. Select the IOS image then change the protocol to xmodem via the dropdown box then click send.
  6. After the IOS has been downloaded, change the boot order by using the confreg 0x2102 command.





No comments:

Post a Comment