Network Basics: Changing Device Boot-Up Configuration

By Edward Tetz

In order to install a new Internetwork Operating System (IOS) update or otherwise implement an altered boot configuration begins by interrupting the usual boot-up process. Within 60 seconds of starting or restarting the device, you need to press the Break key or Ctrl+C, depending on your hardware.

Changing the boot up configuration of a Cisco device is sometimes called recovering a device.

Doing so brings you to the ROM Monitor mode (ROMmon). ROMmon is a small OS that allows you to do a few basic tasks, such as copy a file to your device so that it can be used as the boot image. In the worst-case scenario, you can get into ROMmon and bring yourself back from the brink.

After you are in ROMmon, you can use a few basic commands to load an image from a TFTP server (192.168.1.3). Here is a sample of the process to load an IOS via ROMmon when you do not have an IOS loaded on the router, or you have loaded the wrong file and the system will not boot.

In the following example, the system is bootable, so this is just for illustration. Pay close attention to the question the ROMmon asks because it will erase all the contents of Flash, so any other files that you do not want to lose need to be backed up.

System Bootstrap, Version 12.2(8r) [cmong 8r], RELEASE SOFTWARE (fc1)
Copyright (c) 2003 by cisco Systems, Inc.
PC = 0xfff0ac3c, Vector = 0x500, SP = 0x680127d0
PC = 0xfff0ac3c, Vector = 0x500, SP = 0x680127c0
C2600 platform with 131072 Kbytes of main memory
PC = 0xfff0ac3c, Vector = 0x500, SP = 0x80004884
monitor: command "boot" aborted due to user interrupt
rommon 1 > dev
Devices in device table:
        id  name
    flash:  flash
rommon 2 > dir flash:
         File size           Checksum   File name
  23134968 bytes (0x16102f8)  0x9978    c2600-advipservicesk9-mz.123-4.T4.bin
      1885 bytes (0x75d)      0x454c    sdmconfig-26xx.cfg (deleted)
     16264 bytes (0x3f88)     0x1c9e    sdm.shtml
   3176448 bytes (0x307800)   0x1c34    sdm.tar (deleted)
      1462 bytes (0x5b6)      0x8c5e    home.html (deleted)
    216064 bytes (0x34c00)    0xf287    home.tar (deleted)
      1038 bytes (0x40e)      0xddd8    home.shtml
      1652 bytes (0x674)      0x6b5a    sdmconfig-26xx.cfg
    113152 bytes (0x1ba00)    0xac3e    home.tar
    234040 bytes (0x39238)    0x965b    attack-drop.sdf
   1007616 bytes (0xf6000)    0x1f57    common.tar
   4049920 bytes (0x3dcc00)   0xb4ce    sdm.tar
rommon 3 > IP_ADDRESS=192.168.1.1
rommon 4 > IP_SUBNET_MASK=255.255.255.0
rommon 5 > DEFAULT_GATEWAY=192.168.1.254
rommon 6 > TFTP_SERVER=192.168.1.3
rommon 7 > TFTP_FILE=c2600-advipservicesk9-mz.123-4.T4.bin
rommon 8 > TFTP_RETRY_COUNT=20
rommon 9 > sync
rommon 10 > tftpdnld
          IP_ADDRESS: 192.168.1.1
      IP_SUBNET_MASK: 255.255.255.0
     DEFAULT_GATEWAY: 192.168.1.254
         TFTP_SERVER: 192.168.1.3
           TFTP_FILE: c2600-advipservicesk9-mz.123-4.T4.bin
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
.....
Receiving c2600-advipservicesk9-mz.123-4.T4.bin from 192.168.1.3 
           !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
           !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
           !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
           !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
           !!!!!!!!!!!!!!!!!!!!!!
File reception completed.
Copying file c2600-advipservicesk9-mz.123-4.T4.bin to flash.
Erasing flash at 0x61380000
program flash location 0x609b0000
rommon 11 > reset

If you want to test an IOS image file prior to deploying but you do not have enough space on Flash to store it, you can use tftpdnld -r to load and run it from Dynamic Random Access Memory (DRAM).

This process would then completely restore the selected image to the Cisco device. If there were other files (such as the SDM or ASDM files, or other files you send to clients) on the device, you would need to restore them. Take note the last line in the preceding code, you restart the device with the reset command.