Table Of Contents
Loading and Maintaining System Images and Microcode
System Images and Microcode Task List
Displaying System Image Information
Understanding Images
Types of Images
Image Naming Conventions
General Output Conventions for Copy Operations
Copying Images from Flash Memory to a Network Server
Copying an Image from Flash Memory to a TFTP Server
Copying an Image from Flash Memory to an rcp Server
Understanding the rcp Username
Copying an Image from Flash Memory to an rcp Server Tasks
Copying an Image from Flash Memory to an FTP Server
Understanding the FTP Username and Password
Copy from Flash Memory to an FTP Server Tasks
Copying Images from a Network Server to Flash Memory
Restrictions on File Naming
Understanding Flash Memory Space Considerations
Output for Image Downloading Process
Output for Partitioned Flash Memory
Copying to Flash Memory for Run-from-Flash Systems
Copying an Image from a TFTP Server to a Flash Memory File System
Copying an Image from an rcp Server to a Flash Memory File System
Understanding the rcp Username
Copying from an rcp Server to Flash Memory Tasks
Copying an Image from an FTP Server to a Flash Memory File System
Understanding the FTP Username and Password
Copying from an FTP Server to Flash Memory Tasks
Verifying the Image in Flash Memory
Copying Images Between Local Flash Memory Devices
Specifying the Startup System Image in the Configuration File
Loading the System Image from Flash Memory
Flash Memory Configuration Process
Configuring the Router to Automatically Boot from an Image in Flash Memory
Loading the System Image from a Network Server
Changing MOP Request Parameters
Loading the System Image from ROM
Using a Fault-Tolerant Booting Strategy
Recovering a System Image Using Xmodem or Ymodem
Xmodem Transfer Example Using the Cisco IOS Software
Xmodem Transfer Example Using the ROM Monitor
Loading and Displaying Microcode Images
Understanding Microcode Images
Specifying the Location of the Microcode Images
Reloading the Microcode Image
Displaying Microcode Image Information
Using Microcode on Specific Platforms
Loading Microcode Images on the Cisco 12000 GSR
Loading and Maintaining System Images and Microcode
This chapter describes how to load and maintain system images and microcode. System images contain the system software. Microcode images contain microcode (ROM-based machine instructions) to be downloaded to various hardware devices.
To benefit most from the instructions and organization of this chapter, your router must contain a minimal configuration that allows you to interact with the system software. You can create a basic configuration file using the setup command facility. See the "Using Configuration Tools" chapter in this document for information on using setup.
For a complete description of the system image and microcode commands mentioned in this chapter, refer to the "System Image and Microcode Commands" chapter in the Release 12.1 Cisco IOS Configuration Fundamentals Command Reference. To locate documentation of other commands that appear in this chapter, use the command reference master index or search online.
System Images and Microcode Task List
You can perform the tasks involving images described in the following sections:
•
Displaying System Image Information
•
Understanding Images
•
General Output Conventions for Copy Operations
•
Copying Images from Flash Memory to a Network Server
•
Copying Images from Flash Memory to a Network Server
•
Copying Images from a Network Server to Flash Memory
•
Copying Images Between Local Flash Memory Devices
•
Specifying the Startup System Image in the Configuration File
•
Recovering a System Image Using Xmodem or Ymodem
•
Loading and Displaying Microcode Images
Note
These tasks assume you have a minimal configuration that you want to modify.
Displaying System Image Information
Use the following commands in EXEC mode to display information about system software:
Command
|
Purpose
|
show bootvar
|
Lists the contents of the BOOT environment variable, the name of the configuration file pointed to by the CONFIG_FILE environment variable, and the contents of the BOOTLDR environment variable.
|
show flash-filesystem: [partition number] [all | chips |
detailed | err | summary] (Class B Flash file systems)
show flash-filesystem: [all | chips | filesys] (Class A Flash
file systems)
show flash-filesystem: (Class C Flash file systems)
|
Lists information about Flash memory.
|
show microcode
|
Displays microcode information.
|
show version
|
Lists the currently running system image file name. Also list system software release version, configuration register setting, and other information.
|
Refer to the Cisco IOS Configuration Fundamentals Command Reference for examples of these commands.
Understanding Images
System images contain the Cisco IOS software. Your router already has an image on it when you receive it. However, you may want to load a different image onto the router at some point. For example, you may wish to upgrade your software to the latest release, or use the same version of the software for all the routers in a network. Different system images contain different sets of Cisco IOS features. To find out which version (release number) of Cisco IOS is currently running on your system, and the file name of the system image, use the show version command. For example, "Version 12.1" indicates Cisco IOS Release 12.1, and "c7200-js-mz" indicates the system image for a Cisco 7200 series router containing the Enterprise feature set.
Types of Images
The following are two main types of images your router may use:
•
System image—The complete Cisco IOS software. This image is loaded when your router boots and is used most of the time.
On most platforms, the image is located in Flash memory. On platforms with multiple Flash memory file systems (Flash, Bootflash, slot 0, or slot 1), the image can be located in any existing Flash file system. Use the show file systems command to determine which file systems your router supports. Refer to your hardware documentation for information about where these images are located by default.
•
Boot image—A subset of the Cisco IOS software. This image is used to perform network booting or to load Cisco IOS images onto the router. This image is also used if the router cannot find a valid system image. Depending on your platform, this image may be called xboot image, rxboot image, bootstrap image, or boot loader/helper image.
On some platforms, the boot image is contained in ROM. In others, the boot image can be stored in Flash memory. On these platforms, you can specify which image should be used as the boot image using the boot bootldr command.
Refer to your hardware documentation for information about the boot image used on your router.
Image Naming Conventions
You can identify the platform, features, and image location by the name of the image. The naming convention for images that are stored on a UNIX system is as follows:
platform-features-type
The platform variable indicates which platforms can use this image. Examples of platform variables are rsp (Cisco 7000 series with RSP7000 and Cisco 7500 series), c1600 (Cisco 1600 series), and c1005 (Cisco 1005).
The feature variable identifies the feature sets supported by the image.
The type field can contain the following characters:
•
f—The image runs from Flash memory.
•
m—The image runs from RAM.
•
r—The image runs from ROM.
•
l—The image is relocatable.
•
z—The image is zip compressed.
•
x—The image is mzip compressed.
General Output Conventions for Copy Operations
During a copy operation, you may get the following characters:
•
A pound sign (#) generally means that a Flash memory device is being cleared and initialized. (Different platforms use different ways of indicating that Flash is being cleared.)
•
An exclamation point (!) means that ten packets have been transferred successfully.
•
A series of "V" characters means that a checksum verification of the file is occurring after the file is written to Flash memory.
•
An "O" means an out-of-order packet.
•
A period (.) means a timeout.
The last line in the output indicates whether or not the copy was successful.
To interrupt a copy operation, press Ctrl-^ or Ctrl-Shift-6. The operation terminates, but any partial file copied remains until Flash memory is erased.
Refer to the Internetwork Troubleshooting Guide publication for procedures on how to resolve Flash memory problems.
Copying Images from Flash Memory to a Network Server
You can copy system images from Flash memory to an FTP, rcp, or TFTP server. You can use this server copy of the system image as a backup copy, or you can use it to verify that the copy in Flash is the same as the original file on disk. The following sections describe these tasks:
•
Copying an Image from Flash Memory to a TFTP Server
•
Copying an Image from Flash Memory to an rcp Server
•
Copying an Image from Flash Memory to an FTP Server
The protocol you use depends on which type of server you are using. The FTP and rcp transport mechanisms provide faster performance and more reliable delivery of data than TFTP. These improvements are possible because the FTP and rcp transport mechanisms are built on and use the Transmission Control Protocol/Internet Protocol (TCP/IP) stack, which is connection-oriented.
To stop the copy process, press Ctrl-^ or Ctrl-Shift-6.
In the output, an exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.
Refer to the Internetwork Troubleshooting Guide publication for procedures on how to resolve Flash memory problems.
Copying an Image from Flash Memory to a TFTP Server
You can copy a system image to a TFTP network server. In some implementations of TFTP, you must first create a "dummy" file on the TFTP server and give it read, write, and execute permissions before copying a file over it. Refer to your TFTP documentation for more information.
To copy a system image to a TFTP network server, use the following commands in EXEC mode:
| |
Command
|
Purpose
|
Step 1
|
show flash-filesystem:
|
(Optional) Displays the system image filename in Flash memory. Use this command to verify the url-path of the file and the exact spelling of the system image filename for use in the next command.
|
Step 2
|
copy flash-url
tftp:[[[//location]/directory]/filename]
|
Copies the system image from Flash memory to a TFTP server. Specify the file location and filename as the flash-url argument.
|
Step 3
|
|
Reply to any router prompts for additional information or confirmation. The prompting will depending on how much information you provide in the copy command and the current setting of the file prompt command.
|
Example: Copying an Image from Flash Memory to a TFTP Server
The following example uses the show flash: command to learn the name of the system image file and the copy flash: tftp: command to copy the system image to a TFTP server.
1 4137888 c3640-c2is-mz.Feb24
[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]? 172.16.13.110
filename to write on tftp host? c3640-c2is-mz.Feb24
writing c3640-c2is-mz.Feb24 !!!!...
Example: Copying an Image from Partitioned Flash Memory to a TFTP Server
In this example, the file your-ios is copied from partition 1 of the Flash memory PC card in slot 0 to the TFTP server at 172.23.1.129. The file will be saved with the name your-ios in the dirt/sysadmin directory relative to the directory of the remote username.
Router# copy slot0:1:your-ios tftp://172.23.1.129/dirt/sysadmin/your-ios
Verifying checksum for 'your-ios' (file # 1)... OK
Copy 'your-ios' from Flash to server
as 'dirt/sysadmin/ios-2'? [yes/no] yes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Flash device copy took 00:00:23 [hh:mm:ss]
Copying an Image from Flash Memory to an rcp Server
You can copy a system image from Flash memory to an rcp network server.
If you copy the configuration file to a personal computer used as a file server, the computer must support rsh.
Understanding the rcp Username
The rcp protocol requires a client to send a remote username on each rcp request to a server. When you copy an image from the router to a server using rcp, the Cisco IOS software sends the first valid username in the following list:
1.
The remote username specified in the copy command, if one if specified.
2.
The username set by the ip rcmd remote-username command, if the command is configured.
3.
The remote username associated with the current TTY (terminal) process. For example, if the user is connected to the router through Telnet and was authenticated through the username command, the router software sends the Telnet username as the remote username.
4.
The router host name.
For the rcp copy request to execute successfully, an account must be defined on the network server for the remote username. If the server has a directory structure, the configuration file or image is written or copied relative to the directory associated with the remote username on the server. The path for all files and images to be copied begins at the remote user's home directory. For example, if the system image resides in the home directory of a user on the server, specify that user's name as the remote username.
If you are writing to the server, the rcp server must be properly configured to accept the rcp write request from the user on the router. For UNIX systems, you must add an entry to the .rhosts file for the remote user on the rcp server. For example, suppose the router contains the following configuration lines:
ip rcmd remote-username User0
If the router's IP address translates to Router1.domain.com, then the .rhosts file for User0 on the rcp server should contain the following line:
Refer to the documentation for your rcp server for more details.
Copying an Image from Flash Memory to an rcp Server Tasks
To copy the system image from Flash memory to a network server, use the following commands:
| |
Command
|
Purpose
|
Step 1
|
show flash-filesystem:
|
(Optional) Displays the system image filename in Flash memory. Use this command to verify the url-path of the file and the exact spelling of the system image filename for use in the copy command.
|
Step 2
|
configure terminal
|
(Optional) Enters global configuration mode from the terminal. This step is required only if you want to change the default remote username (see Step 3).
|
Step 3
|
ip rcmd remote-username username
|
(Optional) Configures the remote username.
|
Step 4
|
end
|
(Optional) Exits global configuration mode. This step is required only if you want to change the default remote username (see Step 3).
|
Step 5
|
copy flash-url
rcp:[[[//[username@]location]/directory]/filename]
|
Copies the system image from Flash memory to a network server using rcp.
|
Step 6
|
|
Reply to any router prompts for additional information or confirmation. The prompting will depending on how much information you provide in the copy command and the current setting of the file prompt command.
|
Example: Copy from Flash to RCP Server
The following example copies the system image c5200-ds-l to the network server at 172.16.1.111 using rcp and a username of netadmin:
Router# copy flash:c5200-ds-l rcp:netadmin1@172.16.1.111/c5200-ds-l
Verifying checksum for `c5200-ds-l' (file # 1)...[OK]
Example: Copy from Slot1 to RCP Server
The following example copies a system image file called test from the second PCMCIA slot to a network server using rcp. The remote username is netadmin1. Because the destination address and filename are not specified, the router prompts for this information.
Router# configure terminal
Router(config)# ip rcmd remote-username netadmin1
Router# copy slot1:test rcp:
Address or name of remote host [UNKNOWN]? 172.16.1.111
File name to write to? test
Verifying checksum for `test' (file # 1)...[OK]
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Flash device copy took 00:00:08 [hh:mm:ss]
Copying an Image from Flash Memory to an FTP Server
You can copy a system image to an FTP network server.
Understanding the FTP Username and Password
The FTP protocol requires a client to send a remote username and password on each FTP request to a server. When you copy a configuration file from the router to a server using FTP, the Cisco IOS software sends the first valid username in the following list:
1.
The username specified in the copy command, if a username is specified.
2.
The username set by the ip ftp username command, if the command is configured.
3.
Anonymous.
The router sends the first valid password in the following list:
1.
The password specified in the copy command, if a password is specified.
2.
The password set by the ip ftp password command, if the command is configured.
3.
The router forms a password username@routername.domain. The variable username is the username associated with the current session, routername is the configured host name, and domain is the domain of the router.
The username and password must be associated with an account on the FTP server. If you are writing to the server, the FTP server must be properly configured to accept the FTP write request from the user on the router.
If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the username on the server. For example, if the system image resides in the home directory of a user on the server, specify that user's name as the remote username.
Refer to the documentation for your FTP server for more details.
Use the ip ftp username and ip ftp password commands to specify a username and password for all copies. Include the username in the copy command if you want to specify a username for that copy operation only.
Copy from Flash Memory to an FTP Server Tasks
To copy a system image to an FTP network server, use the following commands, beginning in privileged EXEC mode:
| |
Command
|
Purpose
|
Step 1
|
configure terminal
|
(Optional) Enters global configuration mode. This step is required only if you override the default remote username or password (see Steps 2 and 3).
|
Step 2
|
ip ftp username username
|
(Optional) Changes the default remote username.
|
Step 3
|
ip ftp password password
|
(Optional) Changes the default password.
|
Step 4
|
end
|
(Optional) Exits global configuration mode. This step is required only if you override the default remote username or password (see Steps 2 and 3).
|
Step 5
|
show flash-filesystem:
|
(Optional) Displays the system image file in the specified Flash directory. If you do not already know it, note the exact spelling of the system image filename in Flash memory.
|
Step 6
|
copy flash-filesystem:filename ftp:[[[//[username
[:password]@]location]/directory]/filename]
|
Copies the image to the FTP server.
|
Step 7
|
|
Reply to any router prompts for additional information or confirmation. The prompting will depending on how much information you provide in the copy command and the current setting of the file prompt command.
|
Example: Copying from Flash Memory to an FTP Server
The following example uses the show flash: command to learn the name of the system image file and the copy flash: tftp: command to copy the system image (c3640-2is-mz) to a TFTP server. The router uses the default username and password.
[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]? 172.16.13.110
filename to write on tftp host? c3600-c2is-mz
writing c3640-c2is-mz !!!!...
Example: Copying from Slot1 to an FTP Server
The following example uses the show slot1: command to display the name of the system image file in the second PCMCIA slot and the copies the file (test) to an FTP server.
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1 .. 1 46A11866 2036C 4 746 May 16 1995 16:24:37 test
Router# copy slot1:test ftp://thisuser:thatpass@172.16.13.110/test
Example: Copying from Partitioned Flash to an FTP Server
In this example, the file your-ios is copied from partition 1 of the Flash memory PC card in slot 0 to the TFTP server at 172.23.1.129. The file will be saved with the name your-ios in the dirt/sysadmin directory relative to the directory of the remote username.
Router# show slot0: partition 1
PCMCIA Slot0 flash directory, partition 1:
[1711152 bytes used, 2483152 available, 4194304 total]
Router# copy slot0:1:your-ios ftp://myuser:mypass@172.23.1.129/dirt/sysadmin/your-ios
Verifying checksum for 'your-ios' (file # 1)... OK
Copy 'your-ios' from Flash to server
as 'dirt/sysadmin/ios-2'? [yes/no] yes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Flash device copy took 00:00:23 [hh:mm:ss]
Copying Images from a Network Server to Flash Memory
You can copy system images or boot image from a TFTP, rcp, or FTP server to a Flash memory file system to upgrade or change the Cisco IOS software or boot image on your router.
The protocol you use depends on which type of server you are using. The FTP and rcp transport mechanisms provide faster performance and more reliable delivery of data than TFTP. These improvements are possible because the FTP and rcp transport mechanisms are built on and use the Transmission Control Protocol/Internet Protocol (TCP/IP) stack, which is connection-oriented.
The following sections describe the copying tasks. The first two tasks and the last task are required. If you have a run-from-Flash system, the third section is required. Perform one of the remaining tasks, depending on which file transfer protocol you use.
•
Restrictions on File Naming
•
Understanding Flash Memory Space Considerations
•
Output for Image Downloading Process
•
Copying to Flash Memory for Run-from-Flash Systems
•
Copying an Image from a TFTP Server to a Flash Memory File System
•
Copying an Image from an rcp Server to a Flash Memory File System
•
Copying an Image from an FTP Server to a Flash Memory File System
•
Verifying the Image in Flash Memory
Note
When you are upgrading or changing to a different Cisco IOS release, refer to the appropriate release notes for information on system requirements and limitations.
Restrictions on File Naming
Filenames in Flash memory can be up to 63 characters long; they are not case-sensitive and are always converted to lowercase.
Note
The destination filename must be an alphanumeric expression. For example, the filename 1 is invalid.
The filename can be in either lowercase or uppercase; the system ignores case. If more than one file of the same name is copied to Flash, regardless of case, the last file copied becomes the valid file.
Understanding Flash Memory Space Considerations
Be sure there is enough space available before copying a file to Flash memory. Use the show flash-filesystem: command, and compare the size of the file you want to copy to the amount of Flash memory available. If the space available is less than the amount needed, the copy command is partially executed, but the entire file is not copied into Flash memory. The failure message "buffer overflow - xxxx/xxxx" appears, where xxxx/xxxx is the number of bytes read from the source file and the number of bytes available on the destination device.
Caution 
Do not reboot the router if there is no valid image in Flash memory.
Note
For the Cisco 3600 series, if you do not have access to a network server and need to download a system image, you can copy an image from a local or remote computer (such as a PC, UNIX workstation, or Macintosh) using the Xmodem or Ymodem protocols. See the section "Recovering a System Image Using Xmodem or Ymodem" later in this chapter.
On Cisco 2500, Cisco 3000, and Cisco 4000 systems, if the file being downloaded to Flash memory is an uncompressed system image, the copy command automatically determines the size of the file being downloaded and validates it with the space available in Flash memory.
On Class B Flash file systems, the router gives you the option of erasing the existing contents of Flash memory before writing to it. If there is no free Flash memory available, or if no files have ever been written to Flash memory, the erase routine is required before new files can be copied. If there is enough free Flash memory, the router gives you the option of erasing the existing Flash memory before writing to it. The system will inform you of these conditions and prompt you for a response.
Note
If you enter n after the "Erase flash before writing?" prompt, the copy process continues. If you enter y and confirm the erasure, the erase routine begins. Be sure to have ample Flash memory space before entering n at the erasure prompt.
If you attempt to copy a file into Flash memory that is already there, a prompt informs you that a file with the same name already exists. This file is "deleted" when you copy the new file into Flash.
•
On Class A and B Flash file systems, the first copy of the file still resides within Flash memory, but it is rendered unusable in favor of the newest version and is listed with the "deleted" tag when you use the show flash-filesystem: command. If you terminate the copy process, the newer file is marked "deleted" because the entire file was not copied and is not valid. In this case, the original file in Flash memory is valid and available to the system.
•
On Class C Flash file systems, the first copy of the file is erased.
You can copy normal or compressed images to Flash memory. You can produce a compressed system image on any UNIX platform using the compress command. Refer to your UNIX platform's documentation for the exact usage of the compress command.
On some platforms, the Flash security jumper must be installed in order to write to Flash memory. In addition, some platforms have a write protect switch which must be set to unprotected in order to write to Flash memory.
Output for Image Downloading Process
The output and dialogue may vary depending on the platform.
Output for Partitioned Flash Memory
One of the following prompts displayed after the command indicates how the file can be downloaded:
•
None—The file cannot be copied.
•
RXBOOT-Manual—You must manually reload to the rxboot image in ROM to copy the image.
•
RXBOOT-FLH—The copy is done automatically via the Flash load helper software in boot ROMs.
•
Direct—The copy can be done directly.
If the file can be downloaded into more than one partition, you are prompted for the partition number. To obtain help, enter any of the following at the partition number prompt:
•
?—Display the directory listings of all partitions.
•
?1—Display the directory of the first partition.
•
?2—Display the directory of the second partition.
•
q—Quit the copy command.
Copying to Flash Memory for Run-from-Flash Systems
You cannot run the system from Flash memory and copy to it at the same time. Therefore, for systems that run from Flash, do one of the following before copying to Flash:
•
Partition Flash memory or use Flash load helper to allow the system to run from Flash memory while you copy to it.
•
Reload the system to use a system image from boot ROMs.
Refer to "Compare Types of Memory" section in the "Maintaining Router Memory" chapter of the Configuration Fundamentals Configuration Guide for more information on run-from-Flash systems.
Refer to the appropriate hardware installation and maintenance publication for information about the jumper settings required for your configuration.
Copying an Image from a TFTP Server to a Flash Memory File System
To copy a system image from a Trivial File Transfer Protocol (TFTP) server to a Flash memory file system, use the following commands in EXEC mode:
| |
Command
|
Purpose
|
Step 1
|
See the instructions in the section "Copying Images
from Flash Memory to a Network Server."
|
Make a backup copy of the current software image or bootstrap image.
|
Step 2
|
copy tftp:[[[//location]/directory]/filename]
flash-filesystem:[filename]
|
Copies a system image or a boot image to Flash memory.
|
Step 3
|
|
Reply to any router prompts for additional information or confirmation. The prompting will depending on how much information you provide in the copy command and the current setting of the file prompt command.
|
Example: Copying from a TFTP Server to Flash Memory
In the following example, a file is copied from a TFTP server to slot1:
Router# copy tftp://theserver/tftpboot/kristen/ken/c7200-js-mz slot1:
Destination filename [c7200-js-mz]?
Accessing tftp://theserver/tftpboot/kristen/ken/c7200-js-mz...Translating
"theserver"...domain server (192.168.2.132) [OK]
Loading tftpboot/kristen/ken/c7200-js-mz from 192.168.2.132 (via Ethernet3/0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4823492 bytes copied in 264.312 secs (18270 bytes/sec)
The following example copies a system image named igs-p-l from a TFTP server to a Class B Flash file system when Flash memory is too full to copy the file.
Router# copy tftp: flash:
IP address or name of remote host [255.255.255.255]? dirt
Translating "DIRT"...domain server (255.255.255.255) [OK]
Name of file to copy? igs-p-l
Copy igs-p-l from 172.16.13.111 into flash memory? [confirm]
Flash is filled to capacity.
Erasure is needed before flash may be written.
Erase flash before writing? [confirm]
Erasing flash EPROMs bank 0
Zeroing bank...zzzzzzzzzzzzzzzz
Verify zeroed...vvvvvvvvvvvvvvvv
Erasing bank...eeeeeeeeeeeeeeee
Erasing flash EPROMs bank 1
Zeroing bank...zzzzzzzzzzzzzzzz
Verify zeroed...vvvvvvvvvvvvvvvv
Erasing bank...eeeeeeeeeeeeeeee
Erasing flash EPROMs bank 2
Zeroing bank...zzzzzzzzzzzzzzzz
Verify zeroed...vvvvvvvvvvvvvvvv
Erasing bank...eeeeeeeeeeeeeeee
Erasing flash EPROMs bank 3
Zeroing bank...zzzzzzzzzzzzzzzz
Verify zeroed...vvvvvvvvvvvvvvvv
Erasing bank...eeeeeeeeeeeeeeee
Loading from 172.16.1.111:!!!!...
Verifying via checksum...
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Flash verification successful. Length = 1906676, checksum = 0x12AD
Example: Copying from a TFTP Server to Flash Example When File by the Same Name Already Exists
The following example shows how to copy a system image named igs-p-l into the current Flash configuration in which a file named igs-p-l already exists:
Router# copy tftp://172.16.13.111/igs-p-l flash:igs-p-l
File igs-p-l already exists; it will be invalidated!
Copy igs-p-l from 172.16.13.111 into flash memory? [confirm]
2287500 bytes available for writing without erasure.
Erase flash before writing? [confirm]n
Loading from 172.16.1.111:!!!!...
Verifying via checksum...
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
Flash verification successful. Length = 1902192, checksum = 0x12AD
Example: Copying from TFTP Server to Flash Example without Security Jumper Installed
In the following example, the Flash security jumper is not installed, so you cannot write files to Flash memory.
Router# copy tftp: flash:
Flash: embedded flash security jumper(12V)
must be strapped to modify flash memory
Example:Copying from TFTP Server to Partitioned Flash
In the following example, the file c3600-i-mz on the TFTP server at 172.23.1.129 is copied to the first partition of internal Flash Memory.
Router# copy tftp://172.23.1.129/c3600-i-mz flash:1:c3600-i-mz/c3600-i-mz
Accessing file 'c3600-i-mz' on 172.23.1.129...
Loading c3600-i-mz from 172.23.1.129 (via Ethernet1/0): ! [OK]
Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]
Copy 'c3600-i-mz' from server
as 'c3600-i-mz' into Flash WITH erase? [yes/no] yes
Erasing device... eeeeeeeeeeeeeeee ...erased
Loading c3600-i-mz from 172.23.1.129 (via Ethernet1/0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Verifying checksum... OK (0xF89A)
Flash device copy took 00:00:17 [hh:mm:ss]
Copying an Image from an rcp Server to a Flash Memory File System
You can copy a system image from an rcp network server to a Flash memory file system.
If you copy the configuration file to a personal computer used as a file server, the computer must support rsh.
Understanding the rcp Username
The rcp protocol requires a client to send a remote username on each rcp request to a server. When you copy an image from the router to a server using rcp, the Cisco IOS software sends the first valid username in the following list:
1.
The remote username specified in the copy command, if one if specified.
2.
The username set by the ip rcmd remote-username command, if the command is configured.
3.
The remote username associated with the current TTY (terminal) process. For example, if the user is connected to the router through Telnet and was authenticated through the username command, the router software sends the Telnet username as the remote username.
4.
The router host name.
For the rcp copy request to execute successfully, an account must be defined on the network server for the remote username. If the server has a directory structure, the configuration file or image is written or copied relative to the directory associated with the remote username on the server. The path for all files and images to be copied begins at the remote user's home directory. For example, if the system image resides in the home directory of a user on the server, specify that user's name as the remote username.
Copying from an rcp Server to Flash Memory Tasks
To copy an image from an rcp server to Flash memory, use the following commands, beginning in privileged EXEC mode:
| |
Command
|
Purpose
|
Step 1
|
See the instructions in the section "Copying Images
from Flash Memory to a Network Server."
|
Make a backup copy of the current system or bootstrap software image.
|
Step 2
|
configure terminal
|
(Optional) Enters global configuration mode from the terminal. This step is required only if you override the default remote username (see Step 3).
|
Step 3
|
ip rcmd remote-username username
|
(Optional) Specifies the remote username.
|
Step 4
|
end
|
(Optional) Exits global configuration mode. This step is required only if you override the default remote username (see Step 3).
|
Step 5
|
copy rcp:[[[//[username@]location]/directory]
/filename] flash-filesystem:[filename]
|
Copies the image from an rcp server to a Flash memory file system.
|
Step 6
|
|
Reply to any router prompts for additional information or confirmation. The prompting will depending on how much information you provide in the copy command and the current setting of the file prompt command.
|
Example: Copying from an rcp Server to Flash
The following example copies a system image named mysysim1 from the netadmin1 directory on the remote server named SERVER1.CISCO.COM with an IP address of 172.16.101.101 to Flash memory. To ensure that enough Flash memory is available to accommodate the system image to be copied, the Cisco IOS software allows you to erase the contents of Flash memory first.
Router1# configure terminal
Router1(config)# ip rcmd remote-username netadmin1
[2076072 bytes used, 21080 bytes available]
Address or name of remote host[UNKNOWN]? 172.16.101.101
Name of file to copy? mysysim1
Copy mysysim1 from SERVER1.CISCO.COM?[confirm]
Checking for file `mysysim1' on SERVER1.CISCO.COM...[OK]
Erase Flash device before writing?[confirm]
Erasing device...ezeeze...erased.
Connected to 172.16.101.101
Loading 2076007 byte file mysysim1:!!!!...
Verifying checksum... (0x87FD)...[OK]
Example: Copying from an rcp Server to Partitioned Slot0
In the following example, the file /tftpboot/gate/c3600-i-mz on the rcp server at 172.23.1.129 is copied to partition 3 in slot 0. Because no username is specified, the router uses the default rcp remote username.
Router# show slot0: partition 3
PCMCIA Slot0 flash directory, partition 3:
[492 bytes used, 4193812 available, 4194304 total]
Router# copy rcp://172.23.1.129/tftpboot/gate/c3600-i-mz slot0:3:/tftpboot/gate/c3600-i-mz
Accessing file '/tftpboot/gate/c3600-i-mz' on 172.23.1.129...
Connected to 172.23.1.129
Loading 1711088 byte file c3600-i-mz: ! [OK]
Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]
Copy '/tftpboot/gate/c3600-i-mz' from server
as '/tftpboot/gate/c3600-i-mz' into Flash WITH erase? [yes/no] yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
Connected to 172.23.1.129
Loading 1711088 byte file c3600-i-mz:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [OK]
Verifying checksum... OK (0xF89A)
Flash device copy took 00:00:16 [hh:mm:ss]
Copying an Image from an FTP Server to a Flash Memory File System
You can copy a system image from an FTP server to a Flash memory file system.
Understanding the FTP Username and Password
The FTP protocol requires a client to send a remote username and password on each FTP request to a server. When you copy a configuration file from the router to a server using FTP, the Cisco IOS software sends the first valid username in the following list:
1.
The username specified in the copy command, if a username is specified.
2.
The username set by the ip ftp username command, if the command is configured.
3.
Anonymous.
The router sends the first valid password in the following list:
1.
The password specified in the copy command, if a password is specified.
2.
The password set by the ip ftp password command, if the command is configured.
3.
The router forms a password username@routername.domain. The variable username is the username associated with the current session, routername is the configured host name, and domain is the domain of the router.
The username and password must be associated with an account on the FTP server. If you are writing to the server, the FTP server must be properly configured to accept the FTP write request from the user on the router.
If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the username on the server. For example, if the system image resides in the home directory of a user on the server, specify that user's name as the remote username.
Refer to the documentation for your FTP server for more details.
Use the ip ftp username and ip ftp password commands to specify a username and password for all copies. Include the username in the copy command if you want to specify a username for that copy operation only.
Copying from an FTP Server to Flash Memory Tasks
To copy a system image from an FTP server to a Flash memory file system, use the following commands in EXEC mode:
| |
Command
|
Purpose
|
Step 1
|
See the instructions in the section "Copying Images
from Flash Memory to a Network Server."
|
Make a backup copy of the current software image or bootstrap image.
|
Step 2
|
configure terminal
|
(Optional) Enters global configuration mode from the terminal. This step is required only if you wish to override the default remote username or password (see Steps 3 and 4).
|
Step 3
|
ip ftp username username
|
(Optional) Changes the default remote username.
|
Step 4
|
ip ftp password password
|
(Optional) Changes the default password.
|
Step 5
|
end
|
(Optional) Exits global configuration mode. This step is required only if you override the default remote username or password (see Steps 3 and 4).
|
Step 6
|
copy ftp:[[[//[username[:password]@]location]
/directory]/filename] flash-filesystem:[filename]
|
Copies the configuration file from a network server to running memory or the startup configuration using rcp.
|
Step 7
|
|
Reply to any router prompts for additional information or confirmation. The prompting will depending on how much information you provide in the copy command and the current setting of the file prompt command.
|
Example: Copy from FTP Server to Flash Memory
The following example copies a the file c7200-js-mz from the FTP server the server using a username of myuser and a password of mypass:
Router# copy ftp://myuser:mypass@theserver/tftpboot/ken/c7200-js-mz slot1:c7200-js-mz
Accessing ftp://theserver/tftpboot/ken/c7200-js-mz...Translating "theserver"...domain
server (192.168.2.132) [OK]
Loading c7200-js-mz from 192.168.2.132 (via Ethernet3/0):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4823492 bytes copied in 264.312 secs (18270 bytes/sec)
Verifying the Image in Flash Memory
Before booting from Flash memory, verify that the checksum of the image in Flash memory matches the checksum listed in the README file that was distributed with the system software image by using the verify command. The checksum of the image in Flash memory is displayed at the bottom of the screen when you issue the copy command to copy an image. The README file was copied to the network server automatically when you installed the system software image on the server.

Caution 
If the checksum value does not match the value in the README file, do not reboot the router. Instead, issue the
copy command and compare the checksums again. If the checksum is repeatedly wrong, copy the original system software image back into Flash memory before you reboot the router from Flash memory. If you have a corrupted image in Flash memory and try to boot from Flash, the router will start the system image contained in ROM (assuming that booting from a network server is not configured). If ROM does not contain a fully functional system image, the router will not function and must be reconfigured through a direct console port connection.
The Flash memory content listing does not include the checksum of individual files. To recompute and verify the image checksum after an image is copied into Flash memory or a Flash memory device, use the following EXEC mode command:
Command
|
Purpose
|
verify flash-filesystem:[partition-number:][filename]
|
Recomputes and verifies the image checksum after the image is copied into Flash memory.
|
If you do not provide the filename in the command, the router prompts you. By default, it prompts for the last (most recent) file in Flash. Press Return to recompute the default file checksum, or enter the filename of a different file at the prompt. Note that the checksum for microcode images is always 0x0000.
The following example verifies the image c7200-js-mz in slot0:
Router# verify slot0:c7200-js-mz
Verified slot0:c7200-js-mz
Copying Images Between Local Flash Memory Devices
On routers will multiple Flash memory file systems, you can copy images from one Flash memory file system, such as internal Flash memory or a Flash memory card in a PCMCIA slot, to another Flash memory file system, as shown in Figure 8. One reason to copy the image to a different flash device is to make a backup copy of it.
Figure 8 Copying Images Between Flash Memory File Systems
To copy an image between Flash memory file systems, use these commands in EXEC mode:
| |
Command
|
Purpose
|
Step 1
|
show flash-filesystem:
|
Displays the layout and contents of Flash memory.
|
Step 2
|
copy source-url destination-url
|
Copies an image between Flash memory devices.
|
Step 3
|
verify flash-filesystem:filename
|
Verifies the checksum of the image you copied.
|
Note
The source device and the destination device cannot be the same. For example, the command copy slot1: slot1: is invalid.
Example: Copying a File Between Local Flash Memory Devices
The following example copies the file admin/images/new-ios from partition 1 of internal Flash memory to slot 0:
Router# show flash: partition 1
System flash directory, partition 1:
1 3142748 admin/images/new-ios
[3142812 bytes used, 1051492 available, 4194304 total]
<