Cisco 1800 Series Software Configuration
Troubleshooting and Maintenance: Upgrading the System Image
Downloads: This chapterpdf (PDF - 407.0KB) | Feedback

Upgrading the System Image

Table Of Contents

Upgrading the System Image

Contents

Platforms Supported by This Document

Restrictions for Upgrading the System Image

Information About Upgrading the System Image

Why Would I Upgrade the System Image?

Which Cisco IOS Release Is Running on My Router Now?

How Do I Choose the New Cisco IOS Release and Feature Set?

Where Do I Download the System Image?

How to Upgrade the System Image

Saving Backup Copies of Your Old System Image and Configuration

Examples

Ensuring Adequate DRAM for the New System Image

Prerequisites

What to Do Next

Ensuring Adequate Flash Memory for the New System Image

Prerequisites

What to Do Next

Copying the System Image into Flash Memory

Using TFTP or Remote Copy Protocol to Copy the System Image into Flash Memory

Using the ROM Monitor to Copy the System Image over a Network

Using a PC with a CompactFlash Card Reader to Copy the System Image into Flash Memory

Using Console Download (xmodem) in ROM Monitor to Copy the System Image into Flash Memory

Loading the New System Image

Loading the New System Image from the Cisco IOS Software

Loading the New System Image from ROM Monitor Mode

Saving Backup Copies of Your New System Image and Configuration

Examples

Additional References

Related Documents and Websites

Technical Assistance


Upgrading the System Image


This document describes how to upgrade the Cisco IOS software system image on your router.

Contents

Platforms Supported by This Document

Restrictions for Upgrading the System Image

Information About Upgrading the System Image

How to Upgrade the System Image

Additional References

Platforms Supported by This Document

Cisco 1800 series routers

Cisco 2800 series routers

Cisco 3800 series routers

Restrictions for Upgrading the System Image

Cisco 3800 series routers, Cisco 2800 series routers, and Cisco 1800 series routers support only external compact flash memory cards. Internal flash memory is not supported. For more details, see Using CompactFlash Memory Cards.

Information About Upgrading the System Image

To upgrade the system image on your router, you should understand the following concepts:

Why Would I Upgrade the System Image?

Which Cisco IOS Release Is Running on My Router Now?

How Do I Choose the New Cisco IOS Release and Feature Set?

Where Do I Download the System Image?

Why Would I Upgrade the System Image?

System images contain the Cisco IOS software. Your router already has an image on it when you receive it. Nevertheless, you may want to load a different image onto the router at some point. For example, you may want to upgrade your software to the latest release, or you may want to use the same Cisco IOS release for all the routers in a network. Different system images contain different sets of Cisco IOS features.

Which Cisco IOS Release Is Running on My Router Now?

To determine which Cisco IOS release is currently running on your system, and the filename of the system image, enter the show version command in user EXEC or privileged EXEC mode.

How Do I Choose the New Cisco IOS Release and Feature Set?

To determine which Cisco IOS releases and feature sets support your platform and required features, go to Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

For more detailed information on choosing the new Cisco IOS release and feature set, see the How to Choose a Cisco IOS Software Release tech note.

Where Do I Download the System Image?

You must have an account on Cisco.com to use the following websites. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box, and follow the instructions that appear.

If you know which Cisco IOS release and feature set you want to download, go to the Download Software Area at http://www.cisco.com/kobayashi/sw-center/index.shtml.

If you want more information before selecting the Cisco IOS release and feature set, go to the Software Center at http://www.cisco.com/kobayashi/sw-center/index.shtml.

How to Upgrade the System Image

This section provides information about performing the following tasks:

Saving Backup Copies of Your Old System Image and Configuration

Ensuring Adequate DRAM for the New System Image

Ensuring Adequate Flash Memory for the New System Image

Copying the System Image into Flash Memory

Loading the New System Image

Saving Backup Copies of Your New System Image and Configuration

Saving Backup Copies of Your Old System Image and Configuration

To avoid unexpected downtime if you encounter serious problems using your new system image or startup configuration, we recommend that you save backup copies of your current startup configuration file and Cisco IOS software system image file on a server.

For more detailed information, see the "Managing Configuration Files" chapter and the "Loading and Maintaining System Images" chapter of the Cisco IOS Configuration Fundamentals and Network Management Configuration Guide.

To save backup copies of the startup configuration file and the system image file, complete the following steps.

SUMMARY STEPS

1. enable

2. copy nvram:startup-config {ftp: | rcp: | tftp:}

3. dir flash:

4. copy flash: {ftp: | rcp: | tftp:}

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

copy nvram:startup-config {ftp: | rcp: | tftp:}

Example:

Router# copy nvram:startup-config ftp:

Copies the startup configuration file to a server.

The configuration file copy can serve as a backup copy.

Enter the destination URL when prompted.

Step 3 

dir flash:

Example:

Router# dir flash:

Displays the layout and contents of a flash memory file system.

Learn the name of the system image file.

Step 4 

copy flash: {ftp: | rcp: | tftp:}

Example:

Router# copy flash: ftp:

Copies a file from flash memory to a server.

Copy the system image file to a server. This file can serve as a backup copy.

Enter the flash memory partition number if prompted.

Enter the filename and destination URL when prompted.

Examples

The following examples show how to copy a startup configuration to a TFTP server and how to copy from flash memory to an FTP server.

Copying the Startup Configuration to a TFTP Server: Example

The following example shows the startup configuration being copied to a TFTP server:

Router# copy nvram:startup-config tftp: 

Remote host[]? 192.0.0.1 

Name of configuration file to write [rtr2-confg]? rtr2-config-b4upgrade 
Write file rtr2-confg-b4upgrade on host 192.0.0.1?[confirm] <cr> 
![OK] 

Copying from Flash Memory to a TFTP Server: Example

The following example uses the dir flash: command in privileged EXEC mode to learn the name of the system image file and the copy flash: tftp: command in privileged EXEC mode to copy the system image (c2800-2is-mz) to a TFTP server. The router uses the default username and password.

Router# dir flash: 

System flash directory:
File Length Name/status
1 4137888 c2800-image-mz
[4137952 bytes used, 12639264 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)\

Router# copy flash: tftp: 

IP address of remote host [255.255.255.255]? 192.0.0.1 
filename to write on tftp host? c2800-image-mz 
writing c2800-image-mz !!!!...
successful ftp write. 

Ensuring Adequate DRAM for the New System Image

This section describes how to check whether your router has enough DRAM for upgrading to the new system image.

Prerequisites

Choose the Cisco IOS release and system image to which you want to upgrade. See the "Information About Upgrading the System Image" section.

SUMMARY STEPS

1. Select the system image in the Download Software Area at the following URL:

http://www.cisco.com/kobayashi/sw-center/index.shtml.

2. Write down the minimum memory requirements for the image, as displayed in the File Download Information table.

3. show version

4. Add the memory sizes that are displayed in the show version command output to calculate your router's DRAM size.

5. Compare the calculated DRAM size with the minimum memory requirements from Step 2.

a. If the DRAM is equal to or greater than the new system image's minimum memory requirements, then proceed to the "Ensuring Adequate Flash Memory for the New System Image" section.

b. If the DRAM is less than the new system image's minimum flash requirements, then you must upgrade your DRAM. See the hardware installation guide for your router.

DETAILED STEPS


Step 1 Select the system image in the Download Software Area at the following URL:

http://www.cisco.com/kobayashi/sw-center/index.shtml.

You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

Step 2 Write down the minimum memory requirements for the image, as displayed in the File Download Information table.

Step 3 show version

Use this command to display the router processor and memory (shown in bold text in the following sample output):

Router# show version 

Cisco IOS Software, 2800 Software (C2800-IPBASE-M), Version 12.3(2), [fc3]
Copyright (c) 2004 by Cisco Systems, Inc.
Compiled Thu 11-Aug-04 18:15

ROM: System Bootstrap, Version 12.3(2)

Router1 uptime is 1 day, 23 hours, 15 minutes
System returned to ROM by reload at 13:11:44 UTC Fri Mar 12 2004
Running default software

Cisco 2800(revision 2.0) with 231424K/30720K bytes of memory.
Processor board ID FHH0746C042
2 Gigabit Ethernet interfaces
2 Serial interfaces
2 Channelized E1/PRI ports
2 Channelized T1/PRI ports
DRAM configuration is 64 bits wide with parity enabled.
479K bytes of NVRAM.
125440K bytes of ATA System CompactFlash (Read/Write)

Configuration register is 0x820

Router#

Step 4 Add the memory sizes that are displayed in the show version command output to calculate the amount of DRAM in your router.

For example, in the sample show version command output shown in Step 3, you would add 231424 KB and 30720 KB for a total of 262144 KB, or 256 MB, of DRAM.


Tip To convert from kilobytes (KB) to megabytes (MB), divide the number of kilobytes by 1024.


Step 5 Compare the amount of DRAM in the router to the minimum memory requirements from Step 2.

a. If the DRAM is equal to or greater than the new system image's minimum memory requirements, proceed to the "Ensuring Adequate Flash Memory for the New System Image" section.

b. If the DRAM is less than the new system image's minimum memory requirements, you must upgrade your DRAM. See the hardware installation guide for your router.


What to Do Next

Proceed to the "Ensuring Adequate Flash Memory for the New System Image" section.

Ensuring Adequate Flash Memory for the New System Image

This section describes how to check whether your router has enough flash memory to upgrade to the new system image and, if necessary, how to properly delete files in flash memory to make room for the new system image. For more information, see Using Compact Flash Memory Cards.

Prerequisites

Choose the Cisco IOS release and system image to which you want to upgrade. See the "Information About Upgrading the System Image" section.

Select the system image in the Download Software Area at:

http://www.cisco.com/kobayashi/sw-center/index.shtml.

You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.

From the File Download Information table, write down the minimum flash requirements for the image.

SUMMARY STEPS

1. enable

2. (Class B file systems only) squeeze flash:

3. dir flash:

4. From the displayed output of the dir flash: command, compare the number of bytes available to the minimum flash requirements for the new system image.

a. If the available memory is equal to or greater than the new system image's minimum flash requirements, proceed to the "Copying the System Image into Flash Memory" section.

b. If the available memory is less than the new system image's minimum flash requirements, proceed to Step 5.

5. From the displayed output of the dir flash: command, compare the number of bytes total to the size of the system image to which you want to upgrade.

a. If the total memory is less than the new system image's minimum flash requirements, you must upgrade your compact flash memory card. See the hardware installation guide for your router.

b. If the total memory is equal to or greater than the new system image's minimum flash requirements, proceed to Step 6.

6. dir /all flash:

7. From the displayed output of the dir /all flash: command, write down the names and directory locations of the files that you can delete.

8. (Optional) copy flash: {tftp | rcp}

9. (Optional) Repeat Step 8 for each file that you identified in Step 7.

10. delete flash:directory-path/filename

11. Repeat Step 10 for each file that you identified in Step 7.

12. (Class B file systems only) squeeze flash:

13. dir flash:[partition-number:]

14. From the displayed output of the dir flash: command, compare the number of bytes available to the size of the system image to which you want to upgrade.

a. If the available memory is less than the new system image's minimum flash requirements, then you must upgrade your compact flash memory card to a size that can accommodate both the existing files and the new system image. See the hardware installation guide for your router.

b. If the available memory is equal to or greater than the new system image's minimum flash requirements, proceed to the "Copying the System Image into Flash Memory" section.

DETAILED STEPS


Step 1 enable

Use this command to enter privileged EXEC mode. Enter your password if prompted. For example:

Router> enable 
Password:
Router#

Step 2 (Class B file systems only) squeeze flash:


Note The squeeze command is only applicable for Class B flash file systems. It is not needed for Class C flash file systems. For more details on supported flash file systems, see Using CompactFlash Memory Cards.


Use this command to reclaim the memory space of previously deleted files:

Router# squeeze flash: 

Squeeze operation may take a while. Continue? [confirm]
squeeze in progress...
sssssssssssssssssssssssseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Rebuild file system directory...
Squeeze complete

Step 3 dir flash:

Use this command to display the layout and contents of flash memory:

Router# dir flash: 

Flash CompactFlash directory:
File  Length   Name/status
   1   6458208  c38xx-i-mz.tmp [deleted]
   2   6458208  c38xx-i-mz
[12916544 bytes used, 3139776 available, 16056320 total]
15680K bytes of ATA CompactFlash (Read/Write)

Step 4 From the displayed output of the dir flash: command, compare the number of bytes available to the minimum flash requirements for the new system image.

If the available memory is equal to or greater than the new system image's minimum flash requirements, proceed to the "Copying the System Image into Flash Memory" section.

If the available memory is less than the new system image's minimum flash requirements, proceed to Step 5.

Step 5 From the displayed output of the dir flash: command, compare the number of bytes total to the size of the system image to which you want to upgrade.

If the total memory is less than the new system image's minimum flash requirements, you must upgrade your compact flash memory card. See the hardware installation guide for your router.

If the total memory is equal to or greater than the new system image's minimum flash requirements, proceed to Step 6.

Step 6 dir /all flash:

Use this command to display a list of all files and directories in flash memory:

Router# dir /all flash:

Directory of flash:/

    3  -rw-     6458388   Mar 01 1993 00:00:58  c38xx-i-mz.tmp
 1580  -rw-     6462268   Mar 06 1993 06:14:02  c38xx-i-mz.2800ata

63930368 bytes total (51007488 bytes free)

Step 7 From the displayed output of the dir /all flash: command, write down the names and directory locations of the files that you can delete. If you cannot delete any files, you must upgrade your compact flash memory card. See the hardware installation guide for your router.


Note Do not delete the system image that the router already uses. If you are not sure which files can be safely deleted, either consult your network administrator or upgrade your compact flash memory card to a size that can accommodate both the existing files and the new system image. See the hardware installation guide for your router.


Step 8 copy flash:{tftp | rcp}

(Optional) Copy a file to a server before deleting the file from flash memory. When prompted, enter the filename and the server's hostname or IP address:

Router# copy flash tftp 
 
   

Step 9 (Optional) Repeat Step 8 for each file that you identified in Step 7.

Step 10 delete flash:directory-path/filename

Use this command to delete a file in flash memory:

Router# delete flash:c38xx-i-mz.tmp

Delete filename [c38xx-i-mz.tmp]? <cr> 
Delete flash:c38xx-i-mz.tmp? [confirm] <cr> 

Step 11 Repeat Step 10 for each file that you identified in Step 7.

Step 12 (Class B file systems only) squeeze flash:

Use this command to reclaim the memory space of previously deleted files, for example:

Router# squeeze flash:

Squeeze operation may take a while. Continue? [confirm]
squeeze in progress...
sssssssssssssssssssssssseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Rebuild file system directory...
Squeeze complete

Step 13 dir flash:

Use this command to display the layout and contents of flash memory:

Router# dir flash:

Flash CompactFlash directory:
File  Length   Name/status
   1   6458208  c38xx-i-mz.tmp [deleted]
   2   6458208  c38xx-i-mz
[12916544 bytes used, 3139776 available, 16056320 total]
15680K bytes of ATA CompactFlash (Read/Write)

Step 14 From the displayed output of the dir flash: command, compare the number of bytes available to the size of the system image to which you want to upgrade.

If the available memory is less than the new system image's minimum flash requirements, you must upgrade your compact flash memory card to a size that can accommodate both the existing files and the new system image. See the hardware installation guide for your router.

If the available memory is equal to or greater than the new system image's minimum flash requirements, proceed to the "Copying the System Image into Flash Memory" section.


What to Do Next

Proceed to the "Copying the System Image into Flash Memory" section.

Copying the System Image into Flash Memory

This section describes how to copy the system image into the compact flash memory card for your router. Choose one of the following methods:

Using TFTP or Remote Copy Protocol to Copy the System Image into Flash Memory

Using the ROM Monitor to Copy the System Image over a Network

Using a PC with a CompactFlash Card Reader to Copy the System Image into Flash Memory

Using Console Download (xmodem) in ROM Monitor to Copy the System Image into Flash Memory

Using TFTP or Remote Copy Protocol to Copy the System Image into Flash Memory

This section describes how to use TFTP or Remote Copy Protocol (RCP) to upgrade the system image. This is the recommended and most common method of upgrading the system image.

Prerequisites

Install a TFTP server or an RCP server application on a TCP/IP-ready workstation or PC. Many third-party vendors provide free TFTP server software, which you can find by searching for "TFTP server" in a web search engine.

If you use TFTP:

Configure the TFTP application to operate as a TFTP server, not a TFTP client.

Specify the outbound file directory to which you will download and store the system image.

Download the new Cisco IOS software image into the workstation or PC. See the "Where Do I Download the System Image?" section.

Establish a console session to the router. We recommend that you connect your PC directly to the router console port. See the quick start guide that shipped with your router.

Verify that the TFTP or RCP server has IP connectivity to the router. If you cannot successfully ping between the TFTP or RCP server and the router, do one of the following:

Configure a default gateway on the router.

Make sure that the server and the router each have an IP address in the same network or subnet. See the tech note, Determining IP Addresses: Frequently Asked Questions.


Tip For more detailed information on how to perform the prerequisites, see the Software Installation and Upgrade Procedure tech note.


SUMMARY STEPS

1. enable

2. copy tftp flash
or
copy rcp flash

3. When prompted, enter the IP address of the TFTP or RCP server.

4. When prompted, enter the filename of the Cisco IOS software image to be installed.

5. When prompted, enter the filename as you want it to appear on the router.

6. If an error message appears that says, "Not enough space on device," do one of the following, as appropriate:

If you are certain that all the files in flash memory should be erased, enter y twice when prompted to erase flash before copying.

If you are not certain that all files in flash memory should be erased, press Ctrl-Z and follow the instructions in the "Ensuring Adequate Flash Memory for the New System Image" section.


Note Cisco 1841 and Cisco 2801 routers only support DOSFS (Class C) flash memory file systems. If there is not enough space, you will not be prompted to erase flash memory. Instead, the operation aborts and you will need to erase some files manually to make enough space for the image.


7. If the error message does not appear, enter no when prompted to erase the flash memory before copying.

DETAILED STEPS


Step 1 enable

Use this command to enter privileged EXEC mode. Enter your password if prompted:

Router> enable 
Password: <password> 
Router#

Step 2 copy tftp flash
or
copy rcp flash

Use one of these commands to copy a file from a server to flash memory:

Router# copy tftp flash 

Step 3 When prompted, enter the IP address of the TFTP or RCP server:

Address or name of remote host []? 10.10.10.2 

Step 4 When prompted, enter the filename of the Cisco IOS software image to be installed:

Source filename []? c2600-i-mz.121-14.bin 


Note The filename is case sensitive.


Step 5 When prompted, enter the filename as you want it to appear on the router. Typically, the same filename is entered as was used in Step 4:

Destination filename []? c2600-i-mz.121-14.bin 

Step 6 If an error message appears that says, "Not enough space on device," do one of the following as appropriate:

If you are certain that all the files in flash memory should be erased, enter y when prompted twice to confirm that flash memory will be erased before copying:

Accessing tftp://10.10.10.2/c2600-i-mz.121-14.bin...
     Erase flash: before copying? [confirm] y 
     Erasing the flash filesystem will remove all files! Continue? [confirm] y 
     Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

If you are not certain that all the files in flash memory should be erased, press Ctrl-Z and follow the instructions in the "Ensuring Adequate Flash Memory for the New System Image" section.

Step 7 If the error message does not appear, enter no when prompted to erase the flash memory before copying:

Accessing tftp://10.10.10.2/c2600-i-mz.121-14.bin...
     Erase flash: before copying? [confirm] no 


Troubleshooting Tips

See theCommon Problems in Installing Images Using TFTP or an RCP Server tech note.

What to Do Next

Proceed to the "Loading the New System Image" section.

Using the ROM Monitor to Copy the System Image over a Network

This section describes how to download a Cisco IOS software image from a remote TFTP server to the router flash memory by using the tftpdnld ROM monitor command.

Before you can enter the tftpdnld ROM monitor command, you must set the ROM monitor environment variables.

Prerequisites

Connect the TFTP server to a fixed network port on your router.

Restrictions

The LAN ports on network modules or interface cards are not active in ROM monitor mode. Therefore, only a fixed port on your router can be used for TFTP download. This can be either a fixed Ethernet port on the router or one of the Gigabit Ethernet ports on routers equipped with them.


Note You can use this command only to download files to the router. You cannot use tftpdnld to get files from the router.


SUMMARY STEPS

1. Enter ROM monitor mode

2. Set the IP_ADDRESS=ip_address configuration variable.

3. Set the IP_SUBNET_MASK=ip_address configuration variable.

4. Set the DEFAULT_GATEWAY=ip_address configuration variable.

5. Set the TFTP_SERVER=ip_address configuration variable.

6. Set the TFTP_FILE=[directory-path/]filename configuration variable.

7. (Optional) Set the GE_PORT=[0 | 1 ] configuration variable.

8. (Optional) Set the MEDIA_TYPE=[0 | 1] configuration variable.

9. (Optional) Set the TFTP_CHECKSUM=[0 | 1] configuration variable.

10. (Optional) Set the TFTP_RETRY_COUNT=retry_times configuration variable.

11. (Optional) Set the TFTP_TIMEOUT=time configuration variable.

12. (Optional) Set the TFTP_VERBOSE=setting configuration variable.

13. Use the set command to verify that you have set the variables correctly.

14. Use the tftpdnld [-r] command to download the image.

DETAILED STEPS


Step 1 Enter ROM monitor mode.

Step 2 Set the IP address of the router. For example:

rommon > IP_ADDRESS=172.16.23.32

Step 3 Set the IP subnet mask. For example:

rommon > IP_SUBNET_MASK=255.255.255.224

Step 4 Set the default gateway address. For example:

rommon > DEFAULT_GATEWAY=172.16.23.40

Step 5 Set the TFTP server IP address, which is the location from which the software will be downloaded:

rommon > TFTP_SERVER=172.16.23.33

Step 6 Set the name and directory location to which the image file will be downloaded onto the router. For example:

rommon > TFTP_FILE=archive/rel22/c2600-i-mz

Step 7 (Optional) Set the input port to use a Gigabit Ethernet port, available on Cisco 2800 series and Cisco 3800 series routers. Usage is GE_PORT=[0 | 1], selecting either gig 0/0 or gig 0/1. For example:

rommon > GE_PORT=0

Step 8 (Optional) Set the Ethernet connection media type, RJ-45 or SFP. Usage is MEDIA_TYPE=[0 | 1], where RJ-45=0 and SFP=1 (SFP is applicable only if GE_PORT=0 in the previous step):

rommon > MEDIA_TYPE=1

Step 9 (Optional) Decide whether the router will perform a checksum test on the downloaded image. Usage is TFTP_CHECKSUM=[0|1], where 1=checksum test is performed (default) and 0=no checksum test. For example:

rommon > TFTP_CHECKSUM=0

Step 10 (Optional) Set the number of times that the router will attempt Address Resolution Protocol (ARP) and TFTP download. The default is 7 attempts. For example:

rommon > TFTP_RETRY_COUNT=10

Step 11 (Optional) Set the amount of time, in seconds, before the download process times out. The default is 2400 seconds (40 minutes). The following example shows 1800 seconds (30 minutes):

TFTP_TIMEOUT=1800

Step 12 (Optional) Configure how the router will display the file download progress. Usage is TFTP_VERBOSE=[0 | 1 | 2], where:

0=No progress is displayed.

1=Exclamation points (!!!) are displayed to indicate file download progress. This is the default setting.

2=Detailed progress is displayed during the file download process, for example:

Initializing interface.
Interface link state up.
ARPing for 1.4.0.1
ARP reply for 1.4.0.1 received.  
MAC address 00:00:0c:07:ac:01

Step 13 Use the set command to display the ROM monitor environment variables to verify that you have configured them correctly. For example:

rommon > set

Step 14 Download the system image, as specified by the ROM monitor environmental variables, using the tftpdnld [-r] command. Without the -r option, the command downloads the specified image and saves it in flash memory, deleting all existing data in all partitions in flash memory. Using the -r option downloads and boots the new software but does not save the software to flash memory.

rommon> tftpdnld [-r] 

A prompt is displayed:

Do you wish to continue? y/n:  [n]:  y 

Entering "y" confirms that you want to continue with the TFTP download.


What to Do Next

Proceed to the "Loading the New System Image" section.

Using a PC with a CompactFlash Card Reader to Copy the System Image into Flash Memory

Because the system image is stored on an external CompactFlash memory card, you can use a PC with a compact flash card reader to format the card and copy a new system image file onto the card. However, this upgrade method is not commonly used.

For more information about using flash memory cards, see Using CompactFlash Memory Cards.

Prerequisites

Download the new Cisco IOS Software image to the PC. See the "Where Do I Download the System Image?" section.

Locate the compact flash memory card slot on the router chassis. For help with locating the slot and instructions for removing and inserting the card, see the hardware installation guide for your router.


Caution Removing the compact flash memory card may disrupt the network because some software features use the compact flash memory card to store tables and other important data.

SUMMARY STEPS

1. Remove the compact flash memory card from the router.

2. Insert the card into the compact flash card reader on a PC.

3. Use the PC to copy the system image file to the compact flash memory card.

4. Remove the card from the compact flash card reader.

5. Insert the compact flash memory card into the router.

DETAILED STEPS


Step 1 Remove the compact flash memory card from the router.

Step 2 Insert the card into the compact flash card reader on a PC.

Step 3 Use the PC to copy the system image file to the compact flash memory card.

Step 4 Remove the card from the compact flash card reader.

Step 5 Insert the compact flash memory card into the router.


What to Do Next

Proceed to the "Loading the New System Image" section.

Using Console Download (xmodem) in ROM Monitor to Copy the System Image into Flash Memory

Use console download, a ROM monitor function, when you do not have access to a TFTP server.

For detailed information about the console download function and the xmodem ROM monitor command, see the Xmodem Console Download Procedure Using ROMmon tech note.

Prerequisites

Download the new Cisco IOS software image to your PC. See the "Where Do I Download the System Image?" section.

Connect your PC to the router console port, and launch a terminal emulator program. For examples of performing this task on similar routers, see the Xmodem Console Download Procedure Using ROMmon tech note.

Restrictions

If you use a PC to download a Cisco IOS image over the router console port at 115,200 bps, make sure that the PC serial port uses a 16550 universal asynchronous receiver/transmitter (UART).

If the PC serial port does not use a 16550 UART, we recommend using a speed of 38,400 bps or lower when downloading a Cisco IOS image over the console port.

The xmodem transfer works only on the console port.

You can only use the xmodem command to download files to the router. You cannot use xmodem to get files from the router.

Because the ROM monitor console download uses the console to perform the data transfer, error messages are displayed on the console only after the data transfer is terminated. If an error occurs during console download, the download is terminated, and an error message is displayed. If you changed the baud rate from the default rate, the error message is followed by a message that tells you to restore the terminal to the baud rate specified in the configuration register.

SUMMARY STEPS

1. xmodem [-[c][y][r][x]] destination-file-name

DETAILED STEPS


Step 1 xmodem [-[c][y][r][x]] destination-file-name

Use this command to download the system image over the console port, using the ROM monitor. See Table 1 for command syntax descriptions.

Table 1 xmodem Command Syntax Descriptions

Keyword or Argument
Description

-c

(Optional) Performs the download using 16-bit cyclic redundancy check (CRC) error checking to validate packets. The default is 8-bit CRC.

-y

(Optional) Performs the download using ymodem protocol. The default is xmodem protocol. The protocols differ as follows:

The xmodem protocol supports a 128-block transfer size, whereas the ymodem protocol supports a 1024-block transfer size.

The ymodem protocol uses 16-bit CRC error checking to validate each packet. Depending on the device that the software is being downloaded from, this function might not be supported by the xmodem protocol.

-r

(Optional) Image is loaded into DRAM for execution. The default is to load the image into flash memory.

-x

(Optional) Image is loaded into DRAM without being executed.

destination-file-name

The name of the system image file or the system configuration file. For the router to recognize it, the name of the configuration file must be router_config.


What to Do Next

Proceed to the "Loading the New System Image" section.

Loading the New System Image

This section describes how to load the new system image that you copied into flash memory. First, determine whether you are in ROM monitor mode or in the Cisco IOS CLI. Then choose one of the following methods of loading the new system image:

Loading the New System Image from the Cisco IOS Software

Loading the New System Image from ROM Monitor Mode

Loading the New System Image from the Cisco IOS Software

This section describes how to load the new system image from the Cisco IOS software.

SUMMARY STEPS

1. dir flash:

2. configure terminal

3. no boot system

4. (Optional) boot system flash: system-image-filename

5. (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.

6. exit

7. show version

8. If the last digit in the configuration register is 0 or 1, proceed to Step 9. However, if the last digit in the configuration register is between 2 and F, proceed to Step 12.

9. configure terminal

10. config-register 0x2102

11. exit

12. copy run start

13. reload

14. When prompted to save the system configuration, enter no.

15. When prompted to confirm the reload, enter y.

16. show version

DETAILED STEPS


Step 1 dir flash:

Use this command to display a list of all files and directories in flash memory:

Router# dir flash: 

Directory of flash:/

    3  -rw-     6458388   Mar 01 1993 00:00:58  c38xx-i-mz.tmp 
 1580  -rw-     6462268   Mar 06 1993 06:14:02  c38xx-i-mz.2800ata

63930368 bytes total (51007488 bytes free)


Note Determine whether the new system image is the first file or the only file listed in the dir flash command output ( is not required if it is the first file or only file listed).


Step 2 configure terminal

Use this command to enter global configuration mode:

Router# configure terminal

Router(config)#

Step 3 no boot system

Use this command to delete all entries in the bootable image list, which specifies the order in which the router attempts to load the system images at the next system reload or power cycle:

Router(config)# no boot system 

Step 4 If the new system image is the first file or the only file displayed in the dir flash: command output, you do not need to perform the following step.

boot system flash: system-image-filename

Use this command to load the new system image after the next system reload or power cycle. For example:

Router(config)# boot system flash: c2600-i-mz.121-14.bin 

Step 5 (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.

Step 6 exit

Use this command to exit global configuration mode:

Router(config)# exit  
Router#

Step 7 show version

Use this command to display the configuration register setting:

Router# show version 

Cisco Internetwork Operating System Software
.
.
.
Configuration register is 0x0 

Router#

Step 8 If the last digit in the configuration register is 0 or 1, proceed to Step 9. However, if the last digit in the configuration register is between 2 and F, proceed to Step 12.

Step 9 configure terminal

Use this command to enter global configuration mode:

Router# configure terminal

Router(config)#

Step 10 config-register 0x2102

Use this command to set the configuration register so that, after the next system reload or power cycle, the router loads a system image from the boot system commands in the startup configuration file:

Router(config)# config-register 0x2102 

Step 11 exit

Use this command to exit global configuration mode:

Router(config)# exit  
Router#

Step 12 copy run start

Use this command to copy the running configuration to the startup configuration:

Router# copy run start 
 
   

Step 13 reload

Use this command to reload the operating system:

Router# reload

Step 14 When prompted to save the system configuration, enter no:

System configuration has been modified. Save? [yes/no]: no 

Step 15 When prompted to confirm the reload, enter y:

Proceed with reload? [confirm] y

Step 16 show version

Use this command to verify that the router loaded the proper system image:

Router# show version

00:22:25: %SYS-5-CONFIG_I: Configured from console by console
Cisco Internetwork Operating System Software 
.
.
.
System returned to ROM by reload
System image file is "flash:c2600-i-mz.121-14.bin"


What to Do Next

Proceed to the "Saving Backup Copies of Your New System Image and Configuration" section.

Loading the New System Image from ROM Monitor Mode

This section describes how to load the new system image from ROM monitor mode.

SUMMARY STEPS

1. dir flash:[partition-number:]

2. confreg 0x2102

3. boot flash:[partition-number:]filename

4. After the system loads the new system image, press Return a few times to display the Cisco IOS command-line interface (CLI) prompt.

5. enable

6. configure terminal

7. no boot system

8. boot system flash new-system-image-filename

9. (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.

10. exit

11. copy run start

DETAILED STEPS


Step 1 dir flash:[partition-number:]

Use this command to list files in flash memory:

rommon > dir flash: 

         File size               Checksum   File name
       2229799 bytes (0x220627)   0x469e    C2600-j-m2.113-4T

Note whether the new system image is the first file or the only file listed in the dir flash command output. ( is not required if the image is the first file or only file listed.)

Step 2 confreg 0x2102

Use this command to set the configuration register so that, after the next system reload or power cycle, the router loads a system image from the boot system commands in the startup configuration file:

rommon > confreg 0x2102 

Step 3 boot flash:[partition-number:]filename

Use this command to force the router to load the new system image:

rommon > boot flash:C2600-j-m2.113-4T 
 
   

Step 4 After the system loads the new system image, press Return a few times to display the Cisco IOS CLI prompt.

Step 5 enable

Use this command to enable privileged EXEC mode, and enter your password if prompted:

Router> enable 
Password: <password> 
Router#

Step 6 configure terminal

Use this command to enter global configuration mode:

Router# configure terminal
Router(config)#

Step 7 no boot system

Eliminate all entries in the bootable image list, which specifies the system image that the router loads at startup:

Router(config)# no boot system 

Step 8 If the new system image is the first file or only the file displayed in the dir flash: command output, this step is not required.

boot system flash new-system-image-filename

Use this command to load the new system image after the next system reload or power cycle:

Router(config)# boot system flash c2600-i-mz.121-14.bin 

Step 9 (Optional) Repeat to specify the order in which the router should attempt to load any backup system images.

Step 10 exit

Use this command to exit global configuration mode:

Router(config)# exit  
Router#

Step 11 copy run start

Use this command to copy the running configuration to the startup configuration:

Router# copy run start 
 
   

What to Do Next

Proceed to the "Saving Backup Copies of Your New System Image and Configuration" section.

Saving Backup Copies of Your New System Image and Configuration

To aid file recovery and to minimize downtime in the event of file corruption, we recommend that you save backup copies of the startup configuration file and the Cisco IOS software system image file on a server.


Tip Do not erase any existing backup copies of your configuration and system image that you saved before upgrading your system image. If you encounter serious problems using your new system image or startup configuration, you can quickly revert to the previous working configuration and system image, if necessary.


For more detailed information, see the "Managing Configuration Files" chapter and the "Loading and Maintaining System Images" chapter of the Cisco IOS Configuration Fundamentals and Network Management Configuration Guide.

To save backup copies of the startup configuration file and the system image file, complete the following steps.

SUMMARY STEPS

1. enable

2. copy nvram:startup-config {ftp: | rcp: | tftp:}

3. dir flash:

4. copy flash: {ftp: | rcp: | tftp:}

DETAILED STEPS

 
Command or Action
Purpose

Step 1 

enable

Example:

Router> enable

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2 

copy nvram:startup-config {ftp: | rcp: | tftp:}

Example:

Router# copy nvram:startup-config ftp:

Copies the startup configuration file to a server.

The configuration file copy serves as a backup copy.

Enter the destination URL when prompted.

Step 3 

dir flash:

Example:

Router# dir flash:

Displays the layout and contents of a flash memory file system.

Write down the name of the system image file.

Step 4 

copy flash: {ftp: | rcp: | tftp:}

Example:

Router# copy flash: ftp:

Copies a file from flash memory to a server.

Copy the system image file to a server to serve as a backup copy.

Enter the flash memory partition number if prompted.

Enter the filename and destination URL when prompted.

Examples

Copying the Startup Configuration to a TFTP Server: Example

The following example shows the startup configuration being copied to a TFTP server:

Router# copy nvram:startup-config tftp: 

Remote host[]? 172.16.101.101 

Name of configuration file to write [rtr2-confg]? <cr> 
Write file rtr2-confg on host 172.16.101.101?[confirm] <cr> 
![OK] 

Copying from Flash Memory to a TFTP Server: Example

The following example uses the dir flash: privileged EXEC command to obtain the name of the system image file and the copy flash: tftp: privileged EXEC command to copy the system image (c2800-2is-mz) to a TFTP server. The router uses the default username and password.

Router# dir flash: 

System flash directory:
File Length Name/status
1 4137888 c2800-image-mz
[4137952 bytes used, 12639264 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)\

Router# copy flash: tftp: 
IP address of remote host [255.255.255.255]? 192.0.0.1 
filename to write on tftp host? c2800-image-mz 
writing c2800-image-mz !!!!...
successful ftp write. 

Additional References

The following sections provide references related to upgrading the system image on your router.

Related Documents and Websites

Related Topic
Document Title or Website

Matching Cisco IOS releases and features to hardware

Cisco Feature Navigator at http://www.cisco.com/go/fn1

Choosing the Cisco IOS release and feature set

How to Choose a Cisco IOS Software Release

Downloading system images

Displaying minimum DRAM and flash memory requirements

Download Software Area at http://www.cisco.com/kobayashi/sw-center/index.shtml1

Choosing and downloading system images

Software Center at http://www.cisco.com/kobayashi/sw-center/index.shtml

Loading and maintaining system images

Cisco IOS Configuration Fundamentals and Network Management Configuration Guide

Using external compact flash memory cards

Using Compact Flash Memory Cards

Removing, inserting, and upgrading compact flash memory cards

hardware installation guide for your router

Connecting your PC to the router console port

quick start guide for your router

Upgrading the system image on similar routers

Software Installation and Upgrade Procedure 

Verifying that the router and the server are on the same network

Determining IP Addresses: Frequently Asked Questions

Troubleshooting while using TFTP or RCP to copy the system image into flash memory

Common Problems in Installing Images Using TFTP or an RCP Server 

Using the ROM monitor

Using the ROM Monitor

Using console download (xmodem) in the ROM monitor to copy the system image into flash memory

Xmodem Console Download Procedure Using ROMmon

Upgrading the system image from boot mode

How to Upgrade from ROMmon Using the Boot Image

1 You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.


Technical Assistance

Description
Link

Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.1

http://www.cisco.com/public/support/tac/home.shtml

1 You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.