Configuration Fundamentals Command Reference
Router Memory Commands

Table Of Contents

Router Memory Commands

cd

copy

copy verify

copy verify bootflash

delete

dir

erase

erase bootflash

erase flash

format

memory-size iomem

partition

partition flash

pwd

show bootflash

show flash

show flash devices

squeeze

undelete


Router Memory Commands


This chapter provides detailed descriptions of the commands used to maintain router memory.


Note   Commands in this chapter that have been replaced by new commands continue to perform their normal functions in the current release, but are no longer documented. Support for these commands will cease in a future release. maps the old commands with their replacements.


Table 11 Mapping Old Commands to New Commands 

Old Command
New Command

copy erase flash

erase flash

copy verify or copy verify flash

verify flash (on all systems except the Cisco 700 family)

verify (on the Cisco 700 family)

copy verify bootflash

verify bootflash

write memory

copy running-config startup-config

write network

copy running-config [ rcp | tftp ]

configure network

copy [ rcp | tftp ] running-config

configure overwrite-network

copy [rcp | tftp] startup-config


For configuration information and examples, refer to the "Maintaining Router Memory" chapter in the Configuration Fundamentals Configuration Guide.

cd

To set the default Flash device for the system, use the cd EXEC command.

cd [device:]

Syntax Description

device:

(Optional) Default device. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family. For the Cisco 7000 family, this device is the initial default device and the default device when you omit the device: argument.

slot1—Second PCMCIA slot on the Cisco 7000 family.


Default

For the Cisco 7000 family, slot0 is the initial default device and the default device when you omit the device: argument.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

Use this command only with the Cisco 7000 family. For all EXEC commands that have an optional device: argument, the system uses the device specified by the cd command when you omit the optional device: argument. For example, the dir command contains an optional device: argument and displays a list of files on a Flash memory device. When you omit this device: argument, the system shows a list of the files on the Flash device specified by the cd command.

Example

The following example sets the default device to the Flash memory card inserted in the slot 0:

cd slot0:

Related Commands

You can use the master indexes or search online to find documentation of related commands.

copy
delete
dir
pwd
show flash
undelete

copy

To copy any file from a source to a destination, use the copy EXEC command.

The copy running-config startup-config command replaces the write memory command. The copy running-config rcp or copy running-config tftp command replaces the write network command. The copy rcp running-config or copy tftp running-config command replaces the configure network command. The copy rcp startup-config or copy tftp startup-config command replaces the configure overwrite-network command.

copy source destination

Syntax Description

source

The source location for the file to be copied. See for a list of possible sources.

destination

Destination of the copied file. See for a list of possible destinations.


Table 12 Copy Command Sources and Destinations 

Keyword
Source or Destination

running-config

The current running configuration.

startup-config

The configuration used for initialization. The startup configuration is contained in NVRAM for all platforms except the Cisco 7000 family. The CONFIG_FILE environment variable specifies the startup configuration on a Cisco 7000 family. The Cisco 4500 series cannot use the copy running startup command.

tftp

A TFTP server.

rcp

An rcp server.

mop

A MOP server. This option is not valid for the Cisco 7500 series. This keyword cannot be used as a destination of a copy command.

flash

Internal Flash memory for all platforms except the Cisco 1600, Cisco 3600 and the Cisco 7000 family. On the Cisco 7000 family, this keyword can only be used as the source; in this case the software prompts you for the device and filename. This keyword is never valid on Cisco 1600 series and Cisco 3600.

bootflash

Boot Flash memory. This keyword is only valid on platforms which have boot Flash memory.

device:[partition-number:][filename]

A file in a partition in flash memory device. This option is only valid on the Cisco 1600 and Cisco 3600 series.

device —The colon (:) is required in the device name. See for valid devices.

partition-number—You must enter a colon (:) after the partition number if a filename follows it.

filename—Name of the source or destination file. Wildcards are not permitted. The maximum filename length is 63 characters. If you omit the destination filename, the software uses the source filename.

[device:]filename

A file in a flash memory device. This option is only valid on the Cisco 7000 family.

device —The device is optional. If you omit the source or destination device, the Cisco IOS software uses the default device, as specified by the cd command. If a device is listed, the colon (:) is required. See for valid devices.

filename —Name of the source or destination file. Wildcards are not permitted. The maximum filename length is 63 characters.The source filename is required. If you omit the destination filename, the software uses the source filename.


Table 13 Devices 

Keyword
Device

flash

Internal Flash memory on the Cisco 3600 series. On Cisco 1600 series routers, the keyword specifies the local Flash memory device, a Flash memory PC card inserted in a PCMCIA slot. This is the only valid device for the Cisco 1600 series.

bootflash

Internal Flash memory in the Cisco 7000 family.

slot0

First PCMCIA slot on the Cisco 3600 series and Cisco 7000 family.

slot1

Second PCMCIA slot on the Cisco 3600 series and Cisco 7000 family.

nvram

Router's NVRAM. If you specify NVRAM, omit the filename. The colon (:) is required. Some platforms, such as the Cisco 1600 series and Cisco 3600 series, cannot use this keyword.

slavebootflash

Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0

First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1

Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slavenvram

NVRAM of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA. If you specify NVRAM, omit the filename.


Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

If you do not specify a filename, the router prompts you for it.

This section contains usage guidelines for the following situations:

Invalid Combinations of Source and Destination

Copy Character Descriptions

Partitions

Using rcp

Using TFTP

Using MOP

Store Images on Servers

Copying from a Server to Flash

Verifying Images

Copy a Configuration File from a Server to the Running Configuration

Copy a Configuration File from a Server to the Startup Configuration

Store the Running or Startup Configuration on a Server

Save the Running Configuration to the Startup Configuration

CONFIG_FILE, BOOT, and BOOTLDR Environment Variables

High System Availability

Invalid Combinations of Source and Destination

Some invalid combinations exist. Specifically, you cannot copy:

A running configuration to a running configuration.

A startup configuration to a startup configuration.

From a server to a server.

From a device to the same device (for example, the copy flash: flash: command is invalid).

Copy Character Descriptions

describes the characters that you may see during processing of the copy command.

Table 14 Copy Character Descriptions 

Character
Description

!

An exclamation point indicates that the copy process is taking place. Each exclamation point indicates that ten packets (512 bytes each) have been successfully transferred.

.

A period indicates the copy process timed out. Many periods in a row typically mean that the copy process may fail.

O

An uppercase O indicates a packet was received out of order and the copy process may fail.

e

A lowercase e indicates a device is being erased.

E

An uppercase E indicates an error and the copy process may fail.

V

A series of uppercase Vs indicates the progress during the verification of the image checksum.


Partitions

You cannot copy an image or configuration file to a Flash partition from which you are currently running. For example, if partition 1 is running the current system image, copy the configuration file or image to partition 2. Otherwise, the copy operation will fail.

On the Cisco 3600 series, you can identify the available device partitions by entering the show flash:, show slot0:, or show slot1: command.

Using rcp

The rcp protocol requires a client to send a remote username on each rcp request to a server. When you copy a configuration file or image between the router and a server using rcp, the Cisco IOS software sends the first valid username in the following list:

1 The username set by the ip rcmd remote-username command, if the command is configured.

2 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.

3 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 network administrator of the destination server did not establish an account for the remote username, this command will not execute successfully. If the server has a directory structure, the configuration file or image is written to or copied from the directory associated with the remote username on the server. Use the ip rcmd remote-username command to specify which directory on the server to use. For example, if the system image resides in the home directory of a user on the server, you can 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. Suppose the router contains the following configuration lines:

hostname Rtr1
ip rcmd remote-username User0

If the router's IP address translates to Router1.company.com, then the .rhosts file for User0 on the rcp server should contain the following line:

Router1.company.com Rtr1

Refer to the documentation for your rcp server for more details.

If you are using a personal computer as a file server, the computer must support rsh.

Using TFTP

The system prompts for the address of the TFTP server and TFTP filename if you do not provide them at the command line. When copying to internal Flash memory, the system provides an option to erase existing internal Flash memory before writing onto it. The entire copying process takes several minutes and differs from network to network.

Using MOP


Note   Standard Cisco IOS images can not be downloaded from a Maintenance Operation Protocol (MOP) server. However, you may have access to specially modified Cisco IOS images which contain a MOP-specific header. In these cases you can copy a system image from a MOP server to Flash memory. Cisco does not sell images which can be downloaded from a MOP server.


You do not need to specify the address of a MOP server. The Cisco IOS software automatically solicits a MOP boot server for the specified file by sending a multicast file-request message.

Use the copy mop flash or copy mop bootflash command to copy a system or bootstrap image from a MOP server to Flash memory. MOP must be enabled on the relevant interfaces before you can use these command. Note that this procedure will not work unless you have a specially modified software image.

The router prompts for the name of the image file. It provides an option to erase the existing boot image in Flash before writing the new image into Flash. If no free space is available, or if files have never been written to Flash memory, you must erase Flash memory before copying the MOP image.

Store Images on Servers

Use the copy flash rcp, copy flash tftp, copy bootflash rcp, copy bootflash tftp or copy file-id command to copy a system image or boot image from Flash memory to a network server. You can use the copy of the image as a backup copy. You can also use it to verify that the copy in Flash memory is the same as the original file.

Copying from a Server to Flash

Use the copy rcp flash, copy tftp flash, copy rcp bootflash, copy tftp bootflash, copy mop bootflash, copy rcp file-id, or copy tftp file-id command to copy an image from a server to Flash memory.

If you are using rcp or TFTP, the Cisco IOS software prompts for the address of the server and source filename. If you are using MOP, the router prompts for the source filename.

The system provides an option to erase existing Flash memory before writing onto it. The entire copying process takes several minutes and differs from network to network.


Caution   
Verify the image in Flash memory before booting the image.

Verifying Images

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 image. The checksum of the image in Flash memory is displayed when the copy command completes. The README file was copied to the server automatically when you installed the image.


Caution   
If the checksum values do not match, do not reboot the router. Instead, reissue the copy command and compare the checksums again. If the checksum is repeatedly wrong, copy the original 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 memory, the router will start the system image contained in ROM (assuming booting from a network server is not configured). If ROM does not contain a fully functional system image, the router might not function and will have to be reconfigured through a direct console port connection.

Copy a Configuration File from a Server to the Running Configuration

Use the copy rcp running-config or copy tftp running-config command to load a configuration file from a network server to the router's running configuration. The configuration will be added to the running configuration as if the commands were typed in the command line interface. Thus, the resulting configuration will be a combination of the previous running configuration and the loaded configuration file, with the loaded configuration file having precedence.

You can copy either a host configuration file or a network configuration file. Accept the default value of host to copy and load a host configuration file containing commands that apply to one network server in particular. Enter network to copy and load a network configuration file containing commands that apply to all network servers on a network.


Note   The copy rcp startup-config and copy tftp startup-config commands replaces the configure network command.


Copy a Configuration File from a Server to the Startup Configuration

Use the copy rcp startup-configuration or copy tftp startup-configuration command to copy a configuration file from a network server to the router's startup configuration. These commands replace the startup configuration file with the copied configuration file.


Note   When using rcp, the copy rcp startup-config command replaces the configure overwrite-network command.


Store the Running or Startup Configuration on a Server

Use the copy running-config {rcp | tftp} command to copy the current configuration file to a network server using rcp or TFTP. Use the copy startup-config {rcp | tftp} command to copy the startup configuration file to a network server using rcp or TFTP.The configuration file copy can serve as a backup copy. You are prompted for a destination host and filename.

Save the Running Configuration to the Startup Configuration

On all platforms except the Cisco 7000 family, the copy running-config startup-config command copies the currently running configuration to NVRAM. Use this command in conjunction with the reload command to restart the router with the configuration information stored in NVRAM.


Caution   
Some specific commands might not get saved to NVRAM. You will have to enter these commands again if you reboot the machine. These commands are noted in the documentation. We recommend that you keep a listing of these settings so you can quickly reconfigure your router after rebooting.

If you issue the copy running-config startup-config command from a bootstrap system image, you receive a warning instructing you to indicate whether you want your previous NVRAM configuration to be overwritten and configuration commands lost. This warning does not appear if NVRAM contains an invalid configuration or if the previous configuration in NVRAM was generated by a bootstrap system image.

On the Cisco 7000 family, the copy running-config startup-config command copies the currently running configuration to the location specified by the CONFIG_FILE environment variable. This variable specifies the device and configuration file used for initialization. When the CONFIG_FILE environment variable points to NVRAM or when this variable does not exist (such as at first-time startup), the software writes the current configuration to NVRAM. If the current configuration is too large for NVRAM, the software displays a message and stops executing the command. Use this command in conjunction with the reload command to restart the router with the configuration information stored in the CONFIG_FILE environment variable.

When the CONFIG_FILE environment variable specifies a valid device other than nvram: (that is, flash, bootflash, slot0, or slot1), the software writes the current configuration to the specified device and filename and stores a distilled version of the configuration in NVRAM. A distilled version of the configuration is one that does not contain access list information. If NVRAM already contains a copy of a complete configuration, the router prompts you to confirm the copy.

CONFIG_FILE, BOOT, and BOOTLDR Environment Variables

For the Cisco 7000 family:

The CONFIG_FILE environment variable specifies the configuration file used during router initialization.

The BOOTLDR environment variable specifies the Flash device and filename containing the rxboot image that ROM uses for booting.

The BOOT environment variable specifies a list of bootable images on various devices.

For the Cisco 3600:

There is no CONFIG_FILE environment variable. The startup-configuration is always the configuration in NVRAM.

Cisco 3600 routers do not use a dedicated boot helper image (rxboot), which many other routers use to help with the boot process. Instead, the BOOTLDR ROM monitor environment variable identifies the Flash memory device and filename that are used as the boot helper; the default is the first system image in Flash memory.

The BOOT environment variable specifies a list of bootable images on various devices.

To view the contents of environment variables, use the show boot command. To modify the CONFIG_FILE environment variable, use the boot config command. To modify the BOOTLDR environment variable use the boot bootldr command. To modify the BOOT environment variable, use the boot system command. To save your modifications, use the copy running-config startup-config command.

When the destination is specified by the CONFIG_FILE or BOOTLDR environment variable, the router prompts you for confirmation before proceeding with the copy. When the destination is the only valid image in the BOOT environment variable, the router also prompts you for confirmation before proceeding with the copy.

High System Availability

High System Availability (HSA) refers to how quickly your router returns to an operational status after a failure occurs. On the Cisco 7507 and Cisco 7513, you can install two RSP cards in a single router to improve system availability.

On a Cisco 7507 or Cisco 7513 configured for HSA, the copy rcp startup-configuration command used with automatic synchronization disabled causes the system to ask you if you also want to copy the file to the slave's startup configuration. The default answer is yes. If automatic synchronization is enabled, the system automatically copies the file to the slave's startup configuration each time you use this command.

Examples

The following examples illustrate uses of the copy command. Depending on your platform, the output might be different from the output shown in the example.

Copy from a Server to Flash Memory Examples

Save a Copy of an Image on a Server Examples

Copy from a Server to the Startup Configuration Example

Copy from a Server to the Running Configuration Example

Copy the Running Configuration to a Server Example

Copy the Startup Configuration to a Server Example

Save the Current Running Configuration Example

Move Configuration Files to Other Locations Examples

Copy from a Server to Flash Memory Examples

The following example use a copy rcp, copy tftp, or copy mop command to copy an image from a server to Flash memory.

Copy an Image from a Server to Flash Memory

This example copies a system image named file1 from the netadmin1 directory on the remote rcp server 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.

For a TFTP server, use the copy tftp flash command. You do not need to specify a remote username with the ip rcmd remote-username command.

For a MOP server, use the copy mop flash command.You do not need to specify a remote username with the ip rcmd remote-username command. In addition, you do not specify an address for the remote host.

Router# configure terminal

Router(config)# ip rcmd remote-username netadmin1
Router(config)# end
Router# copy rcp flash 

System flash directory, partition 2:
File  Length   Name/status
  1   984      file1 [deleted]
  2   984      file1
[2096 bytes used, 8386512 available, 8388608 total]
Address or name of remote host [255.255.255.255]? 172.16.101.101
Source file name? file1
Destination file name [file1]?
Accessing file 'file1' on 172.16.101.101...
Loading file1 from 172.16.101.101 (via Ethernet0): ! [OK]

Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]

Copy 'file1' from server
  as 'file1' into Flash WITH erase? [yes/no] yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...erased
Loading file1 from 172.16.101.101 (via Ethernet0): !
[OK - 984/8388608 bytes]

Verifying checksum... OK (0x14B3)
Flash copy took 0:00:01 [hh:mm:ss]

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully. A series of "V" characters indicates that a checksum verification of the image is occurring after the image is written to Flash memory.

Copy a Boot Image from a Server to Bootflash Memory Example 

The following example shows how to use the copy mop bootflash command to copy the bootstrap image c4500-xboot.101.

To use TFTP for the copy operation, use the copy tftp bootflash command; you will be prompted for the IP address of the TFTP server.

To use rcp, first specify a remote username with the ip rcmd remote-username global configuration command. Then, in privileged EXEC mode, enter the copy rcp bootflash command.

Router# copy mop bootflash
Boot flash directory:
File  Length   Name/status
  1   2622607  c4500-xboot
[2622672 bytes used, 1571632 available, 4194304 total]

Source file name? c4500-xboot.101
Destination file name [c4500-xboot.101]? 

Erase flash device before writing? [confirm]
Flash contains files. Are you sure you want to erase? [confirm]

Copy 'c4500-xboot.101' from server into
     bootflash as 'c4500-xboot.101' WITH erase? [yes/no] yes
Erasing device... eeeeeeeeeeeeeeee...erased
Loading c4500-xboot.101 from 1234.5678.9abc via Ethernet0: !
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[OK - 2622607/4194304 bytes]

Verifying checksum... OK (0xE408)
Flash copy took 0:00:10 [hh:mm:ss]

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.


Copy from a Server to a Flash Memory Using Flash Load Helper Example

The following example copies a system image into a partition of Flash memory. The system will prompt for a partition number only if there are two or more read/write partitions or one read-only and one read/write partition and dual Flash bank support in boot ROMs. If the partition entered is not valid, the process terminates. You can enter a partition number, a question mark (?) for a directory display of all partitions, or a question mark and a number (?number) for directory display of a particular partition. The default is the first read/write partition. In this case, the partition is read-only and has dual Flash bank support in boot ROM, so the system uses Flash Load Helper.

For an rcp server, first specify a remote username with the rcmd remote-username command. Then use the copy rcp flash command. The dialogue will be similar.

For a MOP server, use the copy mop flash command.You do not specify an address for the remote host.

Router# copy tftp flash

System flash partition information:
Partition   Size     Used    Free    Bank-Size   State       Copy-Mode
    1       4096K    2048K   2048K   2048K       Read Only   RXBOOT-FLH
    2       4096K    2048K   2048K   2048K       Read/Write  Direct

[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 2]

                               **** NOTICE ****
Flash load helper v1.0
This process will accept the copy options and then terminate
the current system image to use the ROM based image for the copy.
Routing functionality will not be available during that time.
If you are logged in via telnet, this connection will terminate.
Users with console access can see the results of the copy operation.
                               ---- ******** ----
Proceed? [confirm]
System flash directory, partition 1:
File  Length   Name/status
  1   3459720  master/igs-bfpx.100-4.3
[3459784 bytes used, 734520 available, 4194304 total]
Address or name of remote host [255.255.255.255]? 172.16.1.1
Source file name? master/igs-bfpx-100.4.3
Destination file name [default = source name]?

Loading master/igs-bfpx.100-4.3 from 172.16.1.111: !
Erase flash device before writing? [confirm]
Flash contains files. Are you sure? [confirm]
Copy 'master/igs-bfpx.100-4.3' from TFTP server
as 'master/igs-bfpx.100-4.3' into Flash WITH erase? [yes/no] yes

Copy an Image from a Server to a Flash Memory Card Partition Example

The following example copies the file c3600-i-mz from the rcp server at IP address 172.23.1.129 to the Flash memory card in slot 0 of a Cisco 3600 series router, which has only one partition. As the operation progresses, the Cisco IOS software asks you to erase the files on the Flash memory PC card to accommodate the incoming file. This entire operation takes 18 seconds to perform, as indicated at the end of the example.

If you use TFTP rather than rcp, type copy tftp slot0: instead. Most of the dialogue remains the same, although some of the output may vary slightly.

Router# copy rcp slot0:
PCMCIA Slot0 flash

Partition   Size    Used      Free      Bank-Size  State          Copy Mode
  1         4096K   3068K     1027K     4096K      Read/Write     Direct
  2         4096K   1671K     2424K     4096K      Read/Write     Direct
  3         4096K      0K     4095K     4096K      Read/Write     Direct
  4         4096K   3825K      270K     4096K      Read/Write     Direct

[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 1] 

PCMCIA Slot0 flash directory, partition 1:
File  Length   Name/status
  1   3142288  c3600-j-mz.test  
[3142352 bytes used, 1051952 available, 4194304 total]
Address or name of remote host [172.23.1.129]? 
Source file name? /tftpboot/images/c3600-i-mz
Destination file name [/tftpboot/images/c3600-i-mz]? 
Accessing file '/tftpboot/images/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/images/c3600-i-mz' from server
  as '/tftpboot/images/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: 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!

Verifying checksum...  OK (0xF89A)
Flash device copy took 00:00:18 [hh:mm:ss]

Save a Copy of an Image on a Server Examples

The following example use copy flash or copy file-id commands to copy images to a server for storage.

Copy an Image from Flash Memory to an rcp Server Example

The following example illustrates how to copy a system image from Flash Memory to an rcp server. To copy to a TFTP server, use the copy flash tftp command instead.

Router# copy flash rcp
IP address of remote host [255.255.255.255]? 172.16.13.110
Name of file to copy? gsxx
writing gsxx - copy complete

Copy an Image from a Partition of Flash Memory to a Server Example

The following example illustrates how to use the copy flash rcp command when copying from a particular partition of Flash memory. The process is similar using copy flash tftp.

The system will prompt if there are two or more partitions. If the partition entered is not valid, the process terminates. You have the option to enter a partition number, a question mark (?) for a directory display of all partitions, or a question mark and a number (?number) for a directory display of a particular partition. The default is the first partition.

Router# configure terminal
Router# ip rcmd remote-username netadmin1
Ctrl-Z
Router# copy flash rcp
System flash partition information:
Partition   Size     Used    Free    Bank-Size   State       Copy-Mode
    1       4096K    2048K   2048K   2048K       Read Only   RXBOOT-FLH
    2       4096K    2048K   2048K   2048K       Read/Write  Direct
[Type ?<number> for partition directory; ? for full directory; q to abort]
Which partition? [1] 2

System flash directory, partition 2:
File  Length   Name/status
  1   3459720  master/igs-bfpx.100-4.3
[3459784 bytes used, 734520 available, 4194304 total]
Address or name of remote host [ABC.CISCO.COM]?
Source file name? master/igs-bfpx.100-4.3
Destination file name [master/igs-bfpx.100-4.3]?
Verifying checksum for 'master/igs-bfpx.100-4.3' (file # 1)... OK
Copy 'master/igs-bfpx.100-4.3' from Flash to server
as 'master/igs-bfpx.100-4.3'? [yes/no] yes
!!!!...
Upload to server done
Flash copy took 0:00:00 [hh:mm:ss]

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.


Copy an Image from a Flash Memory Device to a Server

The following example copies the file c3600-i-mz from partition 1 of the Flash memory card in slot 0 to a TFTP server that has IP address 172.23.1.129. Because the Flash memory card has multiple partitions, and a partition number and filename are not specified in the command line, you must provide this information during the copy operation.

Router# copy slot0: tftp
PCMCIA Slot0 flash

Partition   Size    Used      Free      Bank-Size  State          Copy Mode
  1         4096K   1671K     2424K     4096K      Read/Write     Direct
  2         4096K   3068K     1027K     4096K      Read/Write     Direct
  3         4096K   1671K     2424K     4096K      Read/Write     Direct
  4         4096K   3825K      270K     4096K      Read/Write     Direct

[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 1] 1

PCMCIA Slot0 flash directory, partition 1:
File  Length   Name/status
  1   1711088  /tftpboot/cisco_rules/c3600-i-mz 
[1711152 bytes used, 2483152 available, 4194304 total]
Address or name of remote host [172.23.1.129]? 
Source file name? /tftpboot/cisco_rules/c3600-i-mz
Destination file name [/tftpboot/cisco_rules/c3600-i-mz]? dirt/cisco_rules/c3700-i-mz
Verifying checksum for '/tftpboot/cisco_rules/c3600-i-mz' (file # 1)...  OK
Copy '/tftpboot/cisco_rules/c3600-i-mz' from Flash to server
  as 'dirt/cisco_rules/c3700-i-mz'? [yes/no] yes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Upload to server done
Flash device copy took 00:00:23 [hh:mm:ss]

Copy an Image from Boot Flash Memory to a Server

The following example shows how to use the copy bootflash rcp command on a Cisco 4500 router. To use TFTP, use the copy bootflash tftp command; you do not need to enter the ip rcmd remote-username command

Router(config)# ip rcmd remote-username netadmin1
Router(config)# end
Router# copy bootflash rcp

System flash directory, partition 2:
File  Length   Name/status
  1   984      file1
[1048 bytes used, 8387560 available, 8388608 total]
Address or name of remote host [223.255.254.254]?
Source file name? file1
Destination file name [file1]? file1
Verifying checksum for 'file1' (file # 1)... OK
Copy 'file1' from Flash to server
  as 'file1'? [yes/no]y
!!!!...
Upload to server done
Flash copy took 0:00:00 [hh:mm:ss]

The exclamation point (!) indicates that the copy process is taking place. Each exclamation point (!) indicates that ten packets have been transferred successfully.

Copy from a Server to the Running Configuration Example

The following example shows how to use the copy rcp running-config command. This example specifies a remote username of netadmin1. Then it copies and runs a host configuration filename host1-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101.

Router# configure terminal
Router(config)# ip rcmd remote-username netadmin1
Router(config)# Ctrl-Z
Router# copy rcp running-config 

Host or network configuration file [host]?
Address of remote host [255.255.255.255]? 172.16.101.101
Name of configuration file [Router-confg]? host1-confg
Configure using host1-confg from 172.16.101.101? [confirm]
Connected to 172.16.101.101
Loading 1112 byte file host1-confg:![OK]
Router#
%SYS-5-CONFIG: Configured from host1-config by rcp from 172.16.101.101

Copy from a Server to the Startup Configuration Example

The following example shows how to use copy rcp startup-config command. This example specifies a remote username of netadmin1. Then it copies and stores a configuration file host2-confg from the netadmin1 directory on the remote server with an IP address of 172.16.101.101.

Router# configure terminal
Router(config)# ip rcmd remote-username netadmin1
Router(config)# end
Router# copy rcp startup-config 

Address of remote host [255.255.255.255]? 172.16.101.101
Name of configuration file[rtr2-confg]? host2-confg
Configure using rtr2-confg from 172.16.101.101?[confirm]
Connected to 172.16.101.101
Loading 1112 byte file rtr2-confg:![OK]
[OK]
Router#
%SYS-5-CONFIG_NV:Non-volatile store configured from rtr2-config by  
rcp from 172.16.101.101

Copy the Running Configuration to a Server Example

The following example shows how to use the copy running-config rcp command. This example specifies a remote username of netadmin1. Then it copies the running configuration file, named Rtr2-confg to the netadmin1 directory on the remote host with an IP address of 172.16.101.101.

Router# configure terminal
Router(config)# ip rcmd remote-username netadmin1
Router(config)# Ctrl-Z
Router# copy running-config rcp
Remote host[]? 172.16.101.101

Name of configuration file to write [Rtr2-confg]?
Write file rtr2-confg on host 172.16.101.101?[confirm]
Building configuration...[OK]
Connected to 172.16.101.101

Copy the Startup Configuration to a Server Example

The following example shows how to use the copy startup-config rcp command.

Router# configure terminal
Router(config)# ip rcmd remote-username netadmin2
Router(config)# end
Router# copy startup-config rcp
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]

Save the Current Running Configuration Example

The following example copies the running configuration to the startup configuration. On a Cisco 7000 family router, this command copies the running configuration to the startup configuration specified by the CONFIG_FILE variable:

copy running-config startup-config

The following example shows the copy running-config startup-config command and the warning the system provides if you are trying to save configuration information from bootstrap into the system:

Router(boot)# copy running-config startup-config 

Warning: Attempting to overwrite an NVRAM configuration written
by a full system image. This bootstrap software does not support
the full configuration command set. If you perform this command now,
some configuration commands may be lost.
Overwrite the previous NVRAM configuration?[confirm]

Enter no to escape writing the configuration information to memory.

Move Configuration Files to Other Locations Examples

On some routers, you can store copies of configuration files on a Flash memory device.

Copy the Startup Configuration to a Flash Memory Device Example

The following example uses the copy startup-config command to copy the startup configuration file (specified by the CONFIG_FILE environment variable) to a Flash memory card inserted in slot 0. To copy the running configuration file instead, use the copy running-config command instead.

copy startup-config slot0:router-confg

Copy the Running Configuration to a Flash Memory Device Example

The following example copies the running configuration from the router to the Flash memory PC card in slot 1:

Router# copy running-config slot1:

PCMCIA Slot1 flash directory:
File  Length   Name/status
  1   1711088  dirt/images/c3600-i-mz  
[1711152 bytes used, 2483152 available, 4194304 total]
Destination file name [running-config]? 
Building configuration...

Erase flash device before writing? [confirm] no

Copy 'running-config'
  as 'running-config' into flash device WITHOUT erase? [yes/no] yes
!
 [OK - 850/2483152 bytes]

Verifying checksum...  OK (0x16)
Flash device copy took 00:00:00 [hh:mm:ss]

Copy to the Running Configuration from a Flash Memory Device Example

The next example copies the file ios-upgrade-1 from the Flash memory card in slot 0 on a Cisco 3600 series to the running configuration.

Router# copy slot0:4:ios-upgrade-1 running-config

Copy 'ios-upgrade-1' from flash device
  as 'running-config' ? [yes/no] yes

Copy to the Startup Configuration from a Flash Memory Device Example

The following example copies the router-image file from the Flash memory card inserted in the slot 0 on a Cisco 7000 family to the startup configuration:

copy slot0:router-image startup-config

Copy a Configuration File from one Flash Device to Another Example

This example copies the file running-config from the first partition in internal Flash memory to the Flash memory PC card in slot 1 on a Cisco 3600 series. The file's checksum is verified, and its copying time of 30 seconds is displayed:

Router# copy flash: slot1:
System flash

Partition   Size    Used      Free      Bank-Size  State          Copy Mode
  1         4096K   3070K     1025K     4096K      Read/Write     Direct
  2        16384K   1671K    14712K     8192K      Read/Write     Direct

[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 1] 

System flash directory, partition 1: 
File  Length   Name/status
  1   3142748  dirt/images/mars-test/c3600-j-mz.latest 
  2   850      running-config 
[3143728 bytes used, 1050576 available, 4194304 total]

PCMCIA Slot1 flash directory:
File  Length   Name/status
  1   1711088  dirt/images/c3600-i-mz 
  2   850      running-config 
[1712068 bytes used, 2482236 available, 4194304 total]
Source file name? running-config 
Destination file name [running-config]? 
Verifying checksum for 'running-config' (file # 2)...  OK
Erase flash device before writing? [confirm] 
Flash contains files. Are you sure you want to erase? [confirm] 

Copy 'running-config' from flash: device
  as 'running-config' into slot1: device WITH erase? [yes/no] yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased
!
 [OK - 850/4194304 bytes]

Flash device copy took 00:00:30 [hh:mm:ss]
Verifying checksum...  OK (0x16)

Copy an Image from the Master RSP Card to the Slave RSP Card Example

The following example copies the router-image file from the Flash memory card inserted in slot 1 of the master RSP card to slot 0 of the slave RSP card in the same router:

copy slot1:router-image slaveslot0:

Related Commands

You can use the master indexes or search online to find documentation of related commands.

boot config
boot system flash
cd
copy xmodem flash
copy ymodem flash
delete
dir
erase bootflash
ip rcmd remote-username
reload
show boot
show bootflash
slave auto-sync config
verify
verify bootflash
write erase

copy verify

The verify or verify flash command replaces this command. Refer to the descriptions of the verify and verify flash commands in the "System Image and Microcode Commands" chapter of the Configuration Fundamentals Command Reference for more information.

copy verify bootflash

The verify bootflash command replaces this command. Refer to the description of the verify bootflash command in the "System Image and Microcode Commands" chapter of the Configuration Fundamentals Command Reference for more information.

delete

To delete any file on a Flash memory device of the Cisco 7000 family, use the delete EXEC command.

delete [device:]filename

Syntax Description

device:

(Optional) Device containing the file to be deleted. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family. For the Cisco 7000 family, this device is the initial default device.

slot1—Second PCMCIA slot on the Cisco 7000 family.

slavebootflash—Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0—First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1—Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

filename

Name of the file to be deleted. The maximum filename length is 63 characters.


Default

For the Cisco 7000 family, the initial default device is slot0:. Otherwise, the default device is that specified by the cd command.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

Use this command only with the Cisco 7000 family.

If you omit the device, the Cisco IOS software uses the default device specified by the cd command.

If you attempt to delete the configuration file specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion. Also, if you attempt to delete the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion. When you delete a file, the software simply marks the file as deleted, but does not erase the file. This feature allows you to later recover a "deleted" file using the undelete command. You can delete and undelete a file up to 15 times. To permanently delete all "deleted" files on a Flash memory device, use the squeeze command.

Example

The following example deletes the router-backupconfig file from the Flash card inserted in slot 0:

delete slot0:router-backupconfig

Related Commands

You can use the master indexes or search online to find documentation of related commands.

cd
dir
show boot
squeeze
undelete

dir

To display a list of files on a Flash memory device of the Cisco 7000 family, use the dir EXEC command.

dir [/all | /deleted | /long] [device:][filename]

Syntax Description

/all

(Optional) Lists deleted files, undeleted files, and files with errors.

/deleted

(Optional) Lists only the deleted files.

/long

(Optional) Lists only valid files. Valid files are those that are undeleted and without errors.

device:

(Optional) Device containing the file(s) to list. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family. For the Cisco 7000 family, this device is the initial default device.

slot1—Second PCMCIA slot on the Cisco 7000 family.

slavebootflash—Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0—First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1—Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

filename

(Optional) Name of the file(s) to display on a specified device. The files can be of any type. You can use wildcards in the filename. A wildcard character (*) matches all patterns. Strings after a wildcard are ignored.


Default

For the Cisco 7000 family, the initial default device is slot0:. Otherwise, the default device is that specified by the cd command. When you omit all keywords and arguments, the Cisco IOS software displays only undeleted files for the default device specified by the cd command in short format.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

Use this command only with the Cisco 7000 family. If you omit the device, the software uses the default device specified by the cd command.

When you use one of the keywords (/all, /deleted, /long), the system displays file information in long format. The long format includes the following categories:

File's index number (#).

Whether the file contains an error (E) or is deleted (D).

File's type (1 = configuration file, 2 = image file). The software displays these values only when the file's type is certain. When the file's type is unknown, the system displays a zero or FFFFFFFF in this field.

File's cyclic redundant check (crc).

Offset into the file system of the next file (seek).

Length of the file's name (nlen).

Length of the file itself (length).

Date and time the file was created (date/time).

File's name (name).

When you omit all keywords (/all, /deleted, /long), the system displays file information in short format. Short format includes the following categories:

File's index number (#)

Length of the file itself (length)

Date and time the file was created (date/time)

File's name (name)

Examples

The following example instructs a router to list undeleted files for the default device specified by the cd command. Notice that the router displays the information in short format because no keywords are used.

Router# dir
-#- -length- -----date/time------ name
1   620      May 4  1993 21:38:04 config1
2   620      May 4  1993 21:38:14 config2

7993896 bytes available (1496 bytes used)

The following example displays the long version of the same device:

Router# dir /long
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. 1        37CEC52E 202EC   7    620      May 4  1993 21:38:04 config1
2   .. 1        37CEC52E 205D8   7    620      May 4  1993 21:38:14 config2

7993896 bytes available (1496 bytes used)

Related Commands

You can use the master indexes or search online to find documentation of related commands.

cd
delete
undelete

erase

To erase a file, use one of the erase EXEC commands.

erase device:[partition-number] (Cisco 1600 series and Cisco 3600 only)

Syntax Description

device:

Device containing the file to delete. The colon (:) is required. Valid devices are as follows:

flash—Internal Flash memory in the Cisco 1600 series and Cisco 3600 series. This device is the initial default device. This is the only valid device for the Cisco 1600 series.

slot0Flash memory card in PCMCIA slot 0 on the Cisco 3600 series.

slot1—Flash memory card in PCMCIA slot 1 on the Cisco 3600 series.

partition-number

(Optional) Partition number to erase.

filename

Name of the file to delete. The files can be of any type. This command does not support wildcards in the filename.


Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

For the Cisco 1600 and Cisco 3600 series, you cannot erase a single filename. You can erase only an entire Flash memory device or a specified partition.

If you attempt to erase the configuration file specified by the CONFIG_FILE or BOOTLDR environment variable, the system prompts you to confirm the deletion. Also, if you attempt to erase the last valid system image specified in the BOOT environment variable, the system prompts you to confirm the deletion.

Examples

The following example deletes the myconfig file from a Flash memory card inserted in the slot 0:

erase slot0:myconfig

The following example erases all of partition 2 in internal Flash memory on a Cisco 3600 series:

Router# erase flash:2   

System flash directory, partition 2:
File  Length   Name/status
  1   1711088  dirt/images/c3600-i-mz  
[1711152 bytes used, 15066064 available, 16777216 total]

Erase flash device, partition 2? [confirm]
Are you sure? [yes/no]: yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased

The following example erases all of partition 2 in Flash memory on a Cisco 1600 series:

Router# erase flash:2   

System flash directory, partition 2:
File  Length   Name/status
  1   1711088  dirt/images/c1600-i-mz 
[1711152 bytes used, 15066064 available, 16777216 total]

Erase flash device, partition 2? [confirm]
Are you sure? [yes/no]: yes
Erasing device... eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ...erased

Related Commands

You can use the master indexes or search online to find documentation of related commands.

boot config
delete
show boot
undelete

erase bootflash

To erase the boot image in boot Flash memory, use the erase bootflash EXEC command.

erase bootflash

Syntax Description

This command has no arguments or keywords.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

You can use this command only on routers that have two banks of Flash memory: one bank for the boot image and the second bank for the system image.

Example

The following example erases the boot image in Flash memory:

erase bootflash

Related Commands

You can use the master indexes or search online to find documentation of related commands.

copy bootflash tftp
copy mop bootflash
copy tftp bootflash
show bootflash
verify bootflash

erase flash

To erase internal Flash memory, use the erase flash EXEC command. This command replaces the copy erase flash command.

erase flash

Syntax Description

This command has no arguments or keywords.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

The Cisco 7000 family routers do not support this command.

Example

The following example illustrates how to use this command. Note that this example reflects the dual Flash bank feature available only on low-end systems (the AccessPro PC card, Cisco 2500 series, Cisco 3000 series, and Cisco 4000 series).

Router# erase flash

System flash partition information:
Partition   Size     Used    Free    Bank-Size   State       Copy-Mode
    1       4096K    2048K   2048K   2048K       Read Only   RXBOOT-FLH
    2       4096K    2048K   2048K   2048K       Read/Write  Direct

[Type ?<no> for partition directory; ? for full directory; q to abort]
Which partition? [default = 2]

The system will prompt only if there are two or more read/write partitions. If the partition entered is not valid or is the read-only partition, the process terminates. You can enter a partition number, a question mark (?) for a directory display of all partitions, or a question mark and a number (?number) for directory display of a particular partition. The default is the first read/write partition.

System flash directory, partition 2:
File  Length   Name/status
  1   3459720  master/igs-bfpx.100-4.3
[3459784 bytes used, 734520 available, 4194304 total]

Erase flash device, partition 2? [confirm] <Return>

format

To format Flash memory on the Cisco 7000 family, use the format EXEC command.

format [spare spare-number] device1: [[device2:][monlib-filename]]


Caution   
The following formatting procedure erases all information in the Flash memory. To prevent the loss of important data, proceed carefully.

Syntax Description

spare

(Optional) Reserves spare sectors as specified by the spare-number argument when formatting a device.

spare-number

(Optional) Number of the spare sectors to reserve on formatted device. Valid values are 0 to 16. The default value is zero.

device1:

Device to format. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family.

slot1—Second PCMCIA slot on the Cisco 7000 family.

slavebootflash—Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0—First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1—Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

device2:

(Optional) Device containing the monlib file to use for formatting device1. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family. For the Cisco 7000 family, this device is the initial default device.

slot1—Second PCMCIA slot on the Cisco 7000 family.

monlib-filename

(Optional) Name of the ROM monitor library file (monlib file) to use for formatting device1. The default monlib file is the one bundled with the system software.

When used with HSA and you do not specify the monlib-filename, the system takes ROM monitor library file from the slave image bundle. If you specify the monlib-filename, the system assumes that the files reside on the slave devices.


Default

The default monlib file is the one bundled with the system software.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

Use this command with the Cisco 7000 family to format internal Flash memory (bootflash) or your Flash memory cards.

In some cases, you might need to insert a new PCMCIA Flash memory card and load images or backup configuration files onto it. Before you can use a new Flash memory card, you must format it.

Flash memory cards have sectors that can fail. On the Cisco 7000 family, you can reserve certain Flash memory sectors as "spares" for use when other sectors fail. Use the format command to specify between 0 and 16 sectors as spares. If you reserve a small number of spare sectors for emergencies, you do not waste space because you can use most of the Flash memory card. If you specify zero spare sectors and some sectors fail, you must reformat the Flash memory card and thereby erase all existing data.

The monlib file is the ROM monitor library, which is contained in the Cisco IOS system software. The ROM monitor uses the monlib file to access files in the Flash file system.

In the command syntax, device1 is the device to format and device2 contains the monlib file to use. When you omit the [[device2:][monlib-filename]] argument, the system formats device1 using the monlib that is bundled with the system software. When you omit device2 from the [[device2:][monlib-filename]] argument, the system formats device1 using the named monlib file from the device specified by the cd command. When you omit monlib-filename from the [[device2:][monlib-filename]] argument, the system formats device1 using device2's monlib file. When you specify the whole [[device2:][monlib-filename]] argument, the system formats device1 using the specified monlib file from the specified device. Note that you can specify device1's own monlib file in this argument. When the system cannot find a monlib file, the system terminates the formatting process.


Caution   
You can read from or write to Flash memory cards formatted for Cisco 7000 series Route Processor (RP) cards in your Cisco 7200 series and Cisco 7500 series, but you cannot boot the Cisco 7200 series and Cisco 7500 series from a Flash memory card that is formatted for the Cisco 7000 series. Similarly, you can read from or write to Flash memory cards formatted for the Cisco 7200 series and Cisco 7500 series in your Cisco 7000 series, but you cannot boot the Cisco 7000 series from a Flash memory card that is formatted for the Cisco 7200 series and Cisco 7500 series.

Example

The following example shows the format command that formats a Flash memory card inserted in slot 0:

Router# format slot0:
Running config file on this device, proceed? [confirm]y
All sectors will be erased, proceed? [confirm]y
Enter volume id (up to 31 characters): <Return>
Formatting sector 1 (erasing)
Format device slot0 completed

When the Cisco IOS software returns you to the EXEC prompt, the new Flash memory card is successfully formatted and ready for use.

Related Commands

You can use the master indexes or search online to find documentation of related commands.

copy
delete
dir
show file
show flash
squeeze
undelete

memory-size iomem

To reallocate the percentage of DRAM memory to use for I/O memory and processor memory on Cisco 3600 series routers, use the memory-size iomem global configuration command. The no form of this command reverts to the default allocation of 25 percent I/O memory and 75 percent processor memory.

memory-size iomem I/O-memory-percentage
no memory-size iomem I/O-memory-percentage

Syntax Description

I/O-memory-percentage

The percentage of DRAM allocated to I/O memory. The values permitted are 10, 15, 20, 25, 30, 40, and 50 percent. A minimum of 4 MB of memory is required for I/O memory.


Default

The default allocation is 25 percent I/O memory and 75 percent processor memory.

Command Mode

Global configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 11.2 P.

When you specify the percentage of I/O memory in the command line, processor memory automatically acquires the remaining percentage of DRAM memory.

Example

The following configuration allocates 40 percent of the DRAM memory to I/O memory and the remaining 60 percent to processor memory.

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# memory-size iomem 40
Router(config)# exit
Router# copy running-config startup-config
Building configuration...
[OK]

Router# reload

rommon 1 > boot
program load complete, entry point: 0x80008000, size: 0x32ea24
Self decompressing the image : 
#######################################################################################
#######################################################################################
######################################################################## [OK]

partition

To separate Flash memory into partitions on the Cisco 1600 series and Cisco 3600 series, use the partition global configuration command. Use the no form of this command to undo partitioning and to restore Flash memory to one partition.

partition device: [number-of-partitions][partition-size]
no partition device:

Syntax Description

device

One of the following devices, which must be followed by a colon (:). The Cisco 1600 series can only use the flash keyword.

flash—Internal Flash memory

slot0—Flash memory card in PCMCIA slot 0

slot1—Flash memory card in PCMCIA slot 1

number-of-partitions

(Optional) Number of partitions in Flash memory.

partition-size

(Optional) Size of each partition. The number of partition size entries must be equal to the number of specified partitions.


Default

Flash memory consists of one partition.

If the partition size is not specified, partitions of equal size are created.

Command Mode

Global configuration

Usage Guidelines

To undo partitioning, use the partition device:1 or no partition device: command. If there are files in a partition other than the first, you must use the command erase device:partition-number to erase the partition before reverting to a single partition.

When creating two partitions, you must not truncate a file or cause a file to spill over into the second partition.

Examples

The following example divides the Flash memory card in slot 0 into two partitions, each 8 MB in size on the Cisco 3600:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# partition slot0: 2 8 8

The following example creates four partitions of equal size in the card in slot 0 on the Cisco 3600.

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# partition slot0: 4

The following example divides the Flash memory card into two partitions, each 4 MB in size on a Cisco 1600 series:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# partition flash: 2 4 4

The following example creates four partitions of equal size in the card on a Cisco 1600 series:

Router# configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)# partition flash: 4

partition flash

To separate Flash memory into two partitions, use the partition flash global configuration command. Use the no form of this command to undo partitioning and restore Flash memory to one partition.

partition flash partitions [size1 size2]
no partition flash

Syntax Description

partitions

Number of partitions in Flash memory. Can be 1 or 2.

size1

(Optional) Size of the first partition in megabytes.

size2

(Optional) Size of the second partition in megabytes.


Default

Flash memory consists of one partition.

If this command is entered but partition size is not specified, two partitions of equal size will be created.

Command Mode

Global configuration

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

Although the software supports up to eight partitions, current hardware allows only two. To undo partitioning, use either the partition flash 1 or no partition flash command. If one or more files exist in the second partition, you must manually erase the second partition with the erase flash command before reverting to a single partition.

When creating two partitions, you must not truncate a file or cause the spillover of a file into the second partition.

Example

The following example creates two partitions of 4 MB each in Flash memory:

partition flash 2 4 4

pwd

To show the current setting of the cd command on the Cisco 7000 family, use the pwd EXEC command.

pwd

Syntax Description

This command has no arguments or keywords.

Default

This command has no default.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

Use this command with the Cisco 7000 family.

Use the pwd command to show what device is specified as the system's default device by the cd command. For all EXEC commands that have an optional device: argument, the system uses the device specified by the cd command when you omit the optional device: argument.

For example, the dir command contains an optional device: argument and displays a list of files on a Flash memory device. When you omit this device: argument, the system shows a list of the files on the Flash device specified by the cd command.

Examples

The following example shows that the present working device specified by the cd command is slot 0:

Router> pwd
slot0

The following example uses the cd command to change the present working device to slot 1 and then uses the pwd command to display that present working device:

Router> cd slot1:
Router> pwd
slot1

Similarly, the following example uses the cd command on the Cisco 7500 series to change the present working device to bootflash and then uses the pwd command to display that present working device:

Router> cd bootflash: 
Router> pwd
bootflash

Related Commands

You can use the master indexes or search online to find documentation of related commands.

cd

show bootflash

To display information about boot Flash memory, use the show bootflash EXEC command.

show bootflash

Syntax Description

This command has no arguments or keywords.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 10.3.

You can use this command only on routers that have two banks of Flash: one bank for the boot image and the second bank for the system image.

The show bootflash command displays the type of boot Flash memory present, any files that may currently exist in boot Flash memory, and the amount of boot Flash memory used and remaining.

Sample Display

The following is sample output from the show bootflash command:

Router# show bootflash
Boot flash directory:
File  name/status
  1   c4500-xboot
[1387336 bytes used, 2806968 bytes available]

describes the fields shown in the output.

Table 15 Show Bootflash Field Descriptions 

Field
Description

Boot File

Number of the boot file.

flash directory: name/status

Name and status of the boot file. The status is displayed if appropriate and can be one of the following:

[deleted]—File has been deleted.

[invalid checksum]—File has an incorrect checksum.


show flash

To display the layout and contents of Flash memory, use one of the following show flash EXEC commands:

show flash [all | chips | detailed | err | partition number [all | chips | detailed | err] | summary]

show device: [all | chips | detailed | err | partition number | summary] (Cisco 1600 series and Cisco 3600 series)

show flash [all | chips | filesys] [device:] (Cisco 7000 family only)

Syntax Description

all

(Optional) On all platforms except the Cisco 7000 family, all shows complete information about Flash memory, including information about the individual ROM devices in Flash memory and the names and sizes of all system image files stored in Flash memory, including those that are invalid.

On the Cisco 7000 family, all shows the following information:

The information displayed by the dir command when you use the /all and /long keywords together.

The information displayed by the filesys keyword.

The information displayed by the chips keyword.

chips

(Optional) Shows information per partition and per chip, including which bank the chip is in plus its code, size, and name.

detailed

(Optional) Shows detailed file directory information per partition, including file length, address, name, Flash memory checksum, computer checksum, bytes used, bytes available, total bytes, and bytes of system Flash memory.

err

(Optional) Shows write or erase failures in the form of number of retries.

partition number

(Optional) Shows output for the specified partition number. If you specify the partition keyword, you must specify a partition number. You can use this keyword only when Flash memory has multiple partitions.

summary

(Optional) Shows summary information per partition, including the partition size, bank size, state, and method by which files can be copied into a particular partition. You can use this keyword only when Flash memory has multiple partitions.

filesys

(Optional) Shows the Device Info Block, the Status Info, and the Usage Info.

device:

(Optional for the Cisco 7000 family) Specifies the device about which to show Flash information.

For the Cisco 7000 family, the device is optional; but when it is used, the colon (:) is required. When it is omitted, the default device is that specified by the cd command.

Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

flashInternal Flash memory in the Cisco 3600 series. A Flash memory PC card on the Cisco 1600 series. This is the only valid device for the Cisco 1600 series.

slot0—First PCMCIA slot on the Cisco 3600 series and Cisco 7000 family.

slot1—Second PCMCIA slot on the Cisco 3600 series and Cisco 7000 family.

slavebootflash—Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0—First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1—Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.


Command Mode

EXEC

Usage Guidelines

The show flash all command first appeared in Cisco IOS Release 10.0. The remaining commands, such as chips and detailed, first appeared in Cisco IOS Release 10.3.)

The show flash command displays the type of Flash memory present, any files that currently exist in Flash memory, and the amounts of Flash memory used and remaining.

For the Cisco 7000 family, when you specify a PCMCIA slot as the device, the router displays the layout and contents of the Flash memory card inserted in the specified slot of the RP or RSP card. When you omit the device: argument, the router displays the default device specified by the cd command. Use the pwd command to show the current default device.

Sample Displays

The output of the show flash command depends on the platform. This section contains the following examples:

Show Flash Example

Show Flash Example with Partitioned Memory

Show Flash All Example

Show Flash All Example with Security Jumper Not Installed

Show Flash All Example with Partitioned Memory

Show Flash Chips Example with Partitioned Memory

Show Flash Detailed Example with Partitioned Memory

Show Flash Err Example with Partitioned Memory

Show Flash Summary Example with Partitioned Memory

Show Flash Examples for Cisco 7000 Family

Show Flash Examples for Cisco 1600 Series  and Cisco 3600 Series

Show Flash Example

The following is sample output from the show flash command. The output might vary for your platform.

Router# show flash

4096K bytes of flash memory sized on embedded flash.

File   name/status
 0     ahp4/gs7-k
 1     micro/eip1-0
 2     micro/sp1-3
 3     micro/trip1-1
 4     micro/hip1-0
 5     micro/fip1-1
 6     flyspecked
 7     spucode
 8     tripucode
 9     fipucode
 10    eipucode
 11    hipucode
 12    sipucode
 13    sp_q160-1
 14    ahp4/sp160-3 [deleted]
 15    ahp4/sp160-3
[682680/4194304 bytes free/total]

describes the show flash fields in this display.

Table 16 Show Flash Field Descriptions 

Field
Description

File

Number of file in Flash memory.

name/status

Files that currently exist in Flash memory.

bytes free

Amount of Flash memory remaining.

[deleted]

Flag indicating that another file exists with the same name or that the process has been abnormally terminated.


As the display shows, the Flash memory can store and display multiple, independent software images for booting itself or for TFTP server software for other products. This feature is useful for storing default system software. These images can be stored in compressed format (but cannot be compressed by the router).

To eliminate any files from Flash memory (invalidated or otherwise) and free up all available memory space, the entire Flash memory must be erased; individual files cannot be erased from Flash memory.

Show Flash Example with Partitioned Memory

The following is a sample output from the show flash command on a router that has Flash memory partitioned:

Router# show flash

System flash directory, partition 1:
  File  Length   Name/status
    1   3459720  master/igs-bfpx.100-4.3
  [3459784 bytes used, 734520 available, 4194304 total]
4096K bytes of processor board System flash (Read Only)

System flash directory, partition 2:
  File  Length   Name/status
    1   3459720  igs-kf
  [3459784 bytes used, 734520 available, 4194304 total]
  4096K bytes of processor board System flash (Read/Write)

Show Flash All Example

The following is a sample output from the show flash all command. The format of your display might differ.

Router# show flash all

4096K bytes of flash memory sized on embedded flash.
    Chip    socket   code      bytes     name
     0       U63     89BD   0x040000   INTEL 28F020
     1       U62     89BD   0x040000   INTEL 28F020
     2       U61     89BD   0x040000   INTEL 28F020
     3       U60     89BD   0x040000   INTEL 28F020
     4       U48     89BD   0x040000   INTEL 28F020
     5       U47     89BD   0x040000   INTEL 28F020
     6       U46     89BD   0x040000   INTEL 28F020
     7       U45     89BD   0x040000   INTEL 28F020
     8       U30     89BD   0x040000   INTEL 28F020
     9       U29     89BD   0x040000   INTEL 28F020
    10       U28     89BD   0x040000   INTEL 28F020
    11       U27     89BD   0x040000   INTEL 28F020
    12       U17     89BD   0x040000   INTEL 28F020
    13       U16     89BD   0x040000   INTEL 28F020
    14       U15     89BD   0x040000   INTEL 28F020
    15       U14     89BD   0x040000   INTEL 28F020

Flash file directory:
File  name/status
addr          length        fcksum    ccksum
0  gs7-k
0x12000080    2601100       0x4015    0x4015
1  micro/eip1-0
0x1227B14C    53364         0x0       0x0
2  micro/sp1-3
0x12288200    55418         0x0       0x0
3  micro/trip1-1
0x12295ABC    105806        0x0       0x0
4  micro/hip1-0
0x122AF84C    35528         0x0       0x0
5  micro/fip1-1
0x122B8354    97070         0x0       0x0
6  fsipucode
0x122CFEC4    6590          0x0       0x0
7  spucode
0x122D18C4    55418         0x0       0x0
8  tripucode 
0x122DF180    105806        0x0       0x0
9  fipucode
0x122F8F10    97070         0x0       0x0
10  eipucode
0x12310A80    53330         0x60A1    0x60A1
11  hipucode
0x1231DB14    35528         0x0       0x0
12  sipucode
0x1232661C    54040         0x0       0x0
13  sp_q160-1
0x1233974    42912          0x0       0x0
14  ahp4/sp160-3 [deleted]
0x1233E154    55730         0x0       0x0
15  ahp4/sp160-3
0x1234BB48    55808         0x0       0x0
[682680/4194304 bytes free/total]

describes the show flash all display fields.

Table 17 Show Flash All Field Descriptions 

Field
Description

bytes of flash memory sized on embedded flash

Total amount of Flash memory present.

Chip

Identifies the ROM unit.

socket

Location of the ROM unit.

code

Vendor code identifying the vendor of the ROM unit.

bytes

Size of the ROM unit (in hex bytes).

name (in row beginning with Chip)

Vendor name and chip part number of the ROM unit.

security jumper, flash memory

Security jumper is/is not installed. Flash memory is programmable or read-only. If the security jumper is not installed, you will see the show flash display with a message indicating that the jumper is not installed.

File

Number of the system image file. If no filename is specified in the boot system flash command, the router boots the system image file with the lowest file number.

name/status

Filename and status of a system image file. The status [invalidated] appears when a file has been rewritten (recopied) into Flash memory. The first (now invalidated) copy of the file is still present within Flash memory, but it is rendered unusable in favor of the newest version. The [invalidated] status can also indicate an incomplete file that results from the user abnormally terminating the copy process, a network timeout, or a Flash memory overflow.

addr

Address of the file in Flash memory.

length

Size of the system image file (in bytes).

fcksum

Checksum recorded in Flash memory.

ccksum

Computer checksum.

[deleted]

Flag indicating that another file exists with the same name or that process has been abnormally terminated.

bytes free/total

Amount of Flash memory used/total amount of Flash memory.


Show Flash All Example with Security Jumper Not Installed

In the following example, the security jumper is not installed. You cannot write to Flash memory until the security jumper is installed:

Router# show flash all

4096K bytes of flash memory on embedded flash (in RP1).
 security jumper(12V) is not installed,
flash memory is read-only.

file     offset       length       name
0        0xDCD0       1903892      gs7-k [deleted]
1        0x1DEA24     1903912      gs7-k
 [329908/4194304 bytes free]

Show Flash All Example with Partitioned Memory

The following is sample output for the show flash all command on router that has Flash memory partitioned:

Router# show flash all

System flash partition information:
Partition   Size    Used       Free     Bank-Size     State         Copy-Mode
    1       4096K    3459K     637K     4096K         Read Only     RXBOOT-FLH
    2       4096K    3224K     872K     4096K         Read/Write    Direct

System flash directory, partition 1:
File     Length     Name/status
        addr     fcksum     ccksum
  1     3459720     master/igs-bfpx.100-4.3
        0x40     0x3DE1     0x3DE1
[3459784 bytes used, 734520 available, 4194304 total]
4096K bytes of processor board System flash (Read ONLY)

   Chip    Bank     Code      Size      Name
    1      1        89A2      1024KB    INTEL 28F008SA
    2      1        89A2      1024KB    INTEL 28F008SA
    3      1        89A2      1024KB    INTEL 28F008SA
    4      1        89A2      1024KB    INTEL 28F008SA
Executing current image from System flash [partition 1]
 System flash directory, partition2:
File     Length     Name/status
        addr     fcksum     ccksum
  1     3224008     igs-kf.100
        0x40     0xEE91     0xEE91
[3224072 bytes used, 970232 available, 4194304 total]
4096K bytes of processor board System flash (Read/Write)

   Chip    Bank     Code      Size      Name
    1      2        89A2      1024KB    INTEL 28F008SA
    2      2        89A2      1024KB    INTEL 28F008SA
    3      2        89A2      1024KB    INTEL 28F008SA
    4      2        89A2      1024KB    INTEL 28F008SA

describes the additional fields in the display.

Table 18 Show Flash All Fields for Partitioned Flash Memory 

Field
Description

Partition

Partition number in Flash memory.

Size

Size of partition in bytes.

Used

Number of bytes used in partition.

Free

Number of bytes free in partition.

Bank-Size

Size of bank in bytes.

State

State of the partition. It can be one of the following values:

Read-Only indicates the partition that is being executed from.

Read/Write is a partition that can be copied to.

Copy-Mode

Method by which the partition can be copied to:

RXBOOT-FLH indicates copy via Flash load helper.

Direct indicates user can copy directly into Flash memory.

None indicates that it is not possible to copy into that partition.

System flash directory, partition 1

Flash directory and its contents.

File

Number of the system image file. If no filename is specified in the boot system flash command, the router boots the system image file with the lowest file number.

Length

Size of the system image file (in bytes).

Name/status

Filename and status of a system image file. The status [invalidated] appears when a file has been rewritten (recopied) into Flash memory. The first (now invalidated) copy of the file is still present within Flash memory, but it is rendered unusable in favor of the newest version. The [invalidated] status can also indicate an incomplete file that results from the user abnormally terminating the copy process, a network timeout, or a Flash memory overflow.

addr

Address of the file in Flash memory.

fcksum

Checksum recorded in Flash memory.

ccksum

Computer checksum.

Chip

Chip number.

Bank

Bank number.

Code

Code number.

Size

Size of chip.

Name

Name of chip manufacturer and chip type.


Show Flash Chips Example with Partitioned Memory

The following is sample output for the show flash chips command on a router that has Flash memory partitioned:

Router# show flash chips

System flash partition 1:
4096K bytes of processor board System flash (Read ONLY)

  Chip    Bank    Code      Size      Name
   1      1       89A2      1024KB    INTEL 28F008SA
   2      1       89A2      1024KB    INTEL 28F008SA
   3      1       89A2      1024KB    INTEL 28F008SA
   4      1       89A2      1024KB    INTEL 28F008SA
Executing current image from System flash [partition 1]

System flash partition 2:
4096K bytes of processor board System flash (Read/Write)

  Chip    Bank    Code      Size      Name
   1      2       89A2      1024KB    INTEL 28F008SA
   2      2       89A2      1024KB    INTEL 28F008SA
   3      2       89A2      1024KB    INTEL 28F008SA
   4      2       89A2      1024KB    INTEL 28F008SA

Show Flash Detailed Example with Partitioned Memory

The following is sample output for the show flash detailed command on a router that has Flash memory partitioned:

Router# show flash detailed

System flash directory, partition 1:
File  Length   Name/status
        addr      fcksum  ccksum
  1   3224008  igs-kf.100
        0x40      0xEE91  0xEE91
[3224072 bytes used, 970232 available, 4194304 total]
4096K bytes of processor board System flash (Read/Write)

System flash directory, partition 2:
File  Length   Name/status
        addr      fcksum  ccksum
  1   3224008  igs-kf.100
        0x40      0xEE91  0xEE91
[3224072 bytes used, 970232 available, 4194304 total]
4096K bytes of processor board System flash (Read/Write)

Show Flash Err Example with Partitioned Memory

The following is sample output for the show flash err command on a router that has Flash memory partitioned:

Router# show flash err

System flash directory, partition 1:
File  Length   Name/status
  1   37376    master/igs-bfpx.100-4.3  [invalid checksum]
[37440 bytes used, 4156864 available, 4194304 total]
4096K bytes of processor board System flash (Read/Write)

   Chip    Bank     Code      Size      Name                erase  write
    1      1        89A2      1024KB    INTEL 28F008SA      0      0
    2      1        89A2      1024KB    INTEL 28F008SA      0      0
    3      1        89A2      1024KB    INTEL 28F008SA      0      0
    4      1        89A2      1024KB    INTEL 28F008SA      0      0
Executing current image from System flash [partition 1]

System flash directory, partition 2:
File  Length   Name/status
  1   37376    master/igs-bfpx.100-4.3  [invalid checksum]
[37440 bytes used, 4156864 available, 4194304 total]
4096K bytes of processor board System flash (Read/Write)

   Chip    Bank     Code      Size      Name                erase  write
    1      2        89A2      1024KB    INTEL 28F008SA      0      0
    2      2        89A2      1024KB    INTEL 28F008SA      0      0
    3      2        89A2      1024KB    INTEL 28F008SA      0      0
    4      2        89A2      1024KB    INTEL 28F008SA      0      0

Show Flash Summary Example with Partitioned Memory

The following is sample output for the show flash summary command on a router that has Flash memory partitioned. The partition in the Read Only state is the partition from which the Cisco IOS image is being executed.

Router# show flash summary

System flash partition information:
Partition   Size     Used      Free    Bank-Size   State       Copy-Mode
    1       4096K    2048K     2048K   2048K       Read Only   RXBOOT-FLH
    2       4096K    2048K     2048K   2048K       Read/Write  Direct

The following are possible values for Copy-Mode:

RXBOOT-MANUAL—User can copy manually by reloading to the boot ROM image.

RXBOOT-FLH—User can copy via Flash load helper.

Direct—User can copy directly into Flash memory.

None—Copy not allowed into that partition.

Show Flash Examples for Cisco 7000 Family

The following sample output shows the show flash command on a Cisco 7000 family:

Router# cd slot1:
Router# show flash
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. 1        46A11866 2036C   4    746      May 16 1995 16:24:37 test

If you do not use the cd command to change the present working device to slot 1, you can display the same sample output with the following command:

Router# show flash slot1:
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. 1        46A11866 2036C   4    746      May 16 1995 16:24:37 test

The following is sample output for the show flash filesys command on a Cisco 7000 family:

Router# show flash filesys slot1:

-------- F I L E   S Y S T E M   S T A T U S --------
  Device Number = 1
DEVICE INFO BLOCK: test
  Magic Number          = 6887635   File System Vers = 10000    (1.0)
  Length                = 800000    Sector Size      = 20000
  Programming Algorithm = 4         Erased State     = FFFFFFFF
  File System Offset    = 20000     Length = 7A0000
  MONLIB Offset         = 100       Length = A140
  Bad Sector Map Offset = 1FFF8     Length = 8
  Squeeze Log Offset    = 7C0000    Length = 20000
  Squeeze Buffer Offset = 7E0000    Length = 20000
  Num Spare Sectors     = 0
    Spares:
STATUS INFO:
  Writable
  NO File Open for Write
  Complete Stats
  No Unrecovered Errors
  Squeeze in progress
USAGE INFO:
  Bytes Used     = 36C     Bytes Available = 79FC94
  Bad Sectors    = 0       Spared Sectors = 0
  OK Files       = 1       Bytes = 2EC
  Deleted Files  = 0       Bytes = 0
  Files w/Errors = 0       Bytes = 0

The following is sample output for the show flash chips bootflash: command on a Cisco 7000 family:

Router# show flash chips bootflash:
******** RSP Internal Flash Bank -- Intel Chips ********
Flash SIMM Reg: 401
  Flash SIMM PRESENT
  2 Banks
  Bank Size = 4M
  HW Rev = 1

Flash Status Registers: Bank 0
  Intelligent ID Code: 89898989 A2A2A2A2
  Status Reg: 80808080

Flash Status Registers: Bank 1
  Intelligent ID Code: 89898989 A2A2A2A2
  Status Reg: 80808080

In the following example, the present working device is bootflash on a Cisco 7000 family. The sample output displays the show flash all output.

Router# cd bootflash:
Router# show flash all 
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. FFFFFFFF 49B403EE 3D0510  21   3736719  May 30 1995 17:47:54 dirt/yanke/m

3865328 bytes available (3736848 bytes used)

-------- F I L E   S Y S T E M   S T A T U S --------
  Device Number = 2
DEVICE INFO BLOCK: test
  Magic Number          = 6887635   File System Vers = 10000    (1.0)
  Length                = 800000    Sector Size      = 40000
  Programming Algorithm = 5         Erased State     = FFFFFFFF
  File System Offset    = 40000     Length = 740000
  MONLIB Offset         = 100       Length = A270
  Bad Sector Map Offset = 3FFFC     Length = 4
  Squeeze Log Offset    = 780000    Length = 40000
  Squeeze Buffer Offset = 7C0000    Length = 40000
  Num Spare Sectors     = 0
    Spares:
STATUS INFO:
  Writable
  NO File Open for Write
  Complete Stats
  No Unrecovered Errors
  Squeeze in progress

USAGE INFO:
  Bytes Used     = 390510 Bytes Available = 3AFAF0
  Bad Sectors    = 0       Spared Sectors = 0
  OK Files       = 1       Bytes = 390490
  Deleted Files  = 0       Bytes = 0
  Files w/Errors = 0       Bytes = 0

******** RSP Internal Flash Bank -- Intel Chips ********
Flash SIMM Reg: 401
  Flash SIMM PRESENT
  2 Banks
  Bank Size = 4M
  HW Rev = 1

Flash Status Registers: Bank 0
  Intelligent ID Code: 89898989 A2A2A2A2
  Status Reg: 80808080

Flash Status Registers: Bank 1
  Intelligent ID Code: 89898989 A2A2A2A2
  Status Reg: 80808080

Router# show flash chips bootflash:

******** RSP Internal Flash Bank -- Intel Chips ********
Flash SIMM Reg: 401
  Flash SIMM PRESENT
  2 Banks
  Bank Size = 4M
  HW Rev = 1

Flash Status Registers: Bank 0
  Intelligent ID Code: 89898989 A2A2A2A2
  Status Reg: 80808080

Flash Status Registers: Bank 1
  Intelligent ID Code: 89898989 A2A2A2A2
  Status Reg: 80808080

Show Flash Examples for Cisco 1600 Series  and Cisco 3600 Series

The following example shows detailed information about the second partition in internal Flash memory on a Cisco 3600 series router:

Router# show flash: partition 2

System flash directory, partition 2:
File  Length   Name/status
  1   1711088  dirt/images/c3600-i-mz 
[1711152 bytes used, 15066064 available, 16777216 total]
16384K bytes of processor board System flash (Read/Write)

The following example shows copy and file space information about each partition in the card in slot 1 on a Cisco 3600 series router:

Router# show slot1: summary

The following example shows the state of the Flash memory PC card on a Cisco 1600 series router:

Router# show flash: all

The following example illustrates the show flash: chips command on a Cisco 1600 series router:

Router# show flash: chips

The following example illustrates the show flash: detailed command:

Router# show flash: detailed

The following example illustrates the show flash: err command:

Router# show flash: err

show flash devices

To display the names of the Flash devices supported on the Cisco 7000 family, use the show flash devices EXEC command.

show flash devices

Syntax Description

This command has no arguments or keywords.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.1.

Use this command for the Cisco 7200 series or a Cisco 7507 or Cisco 7513 that is configured for High System Availability (HSA). HSA refers to how quickly your router returns to an operational status after a failure occurs. On the Cisco 7507 and Cisco 7513, you can install two RSP cards in a single router to improve system availability.

When you issue this command, the router returns a list of valid Flash devices supported on the NPE card (for a Cisco 7200 series) and both RSP cards (for a Cisco 7507 or Cisco 7513). Use this command to learn the names of the Flash devices that the NPE card or slave RSP supports.

Sample Display

In the following example, the Flash devices for a Cisco 7507 or Cisco 7513 are displayed:

slot-10# show flash devices
nvram, tftp, rcp, slot0, slot1, bootflash, slaveslot0,
slaveslot1, slavebootflash, slavenvram
slot-10#

squeeze

To permanently delete Flash files on the Cisco 7000 family, use the squeeze EXEC command.

squeeze device:

Syntax Description

device:

Flash device from which to permanently delete files. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory on the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family.

slot1—Second PCMCIA slot on the Cisco 7000 family.

slavebootflash—Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0—First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1—Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.


Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.1.

Use this command with the Cisco 7000 family.

When Flash memory is full, you might need to rearrange the files so that the space used by the "deleted" files can be reclaimed. When you issue the squeeze command, the router copies all valid files to the beginning of Flash memory and erases all files marked "deleted." At this point, you cannot recover "deleted" files and you can write to the reclaimed Flash memory space.

In addition to removing deleted files, the squeeze command removes any files that the system has marked as error. An error file is created when a file write fails (for example, because the device is full) and is automatically deleted. To remove error files, you must use the squeeze command.


Note   The squeeze operation might take as long as several minutes because it can involve erasing and rewriting almost an entire Flash memory space.


Example

The following example instructs the router to permanently erase the files marked "deleted" from the Flash memory card inserted in slot 1:

squeeze slot1:

Related Commands

You can use the master indexes or search online to find documentation of related commands.

delete
dir
undelete

undelete

To recover a deleted file on a specified device of the Cisco 7000 family, use the undelete EXEC command.

undelete index [device:]

Syntax Description

index

Number that indexes the file in the dir command output.

device:

(Optional) Device to contain the recovered configuration file. The colon (:) is required. Valid devices are as follows:

bootflash—Internal Flash memory in the Cisco 7000 family.

slot0—First PCMCIA slot on the Cisco 7000 family.

slot1—Second PCMCIA slot on the Cisco 7000 family.

slavebootflash—Internal Flash memory on the slave RSP card of a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot0—First PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.

slaveslot1—Second PCMCIA slot of the slave RSP card on a Cisco 7507 or Cisco 7513 configured for HSA.


Default

The default device is the one specified by the cd command.

Command Mode

EXEC

Usage Guidelines

This command first appeared in Cisco IOS Release 11.0.

Use this command with the Cisco 7000 family.

When you delete a file, the Cisco IOS software simply marks the file as deleted, but does not erase the file. This command allows you to recover a "deleted" file on a specified Flash memory device. You must undelete a file by its index because you could have multiple deleted files with the same name. For example, the "deleted" list could contain multiple configuration files with the name router-config. You undelete by index to indicate which of the many router-config files from the list to undelete. Use the dir command to learn the index number of the file you want to undelete.

You cannot undelete a file if a valid (undeleted) one with the same name exists. Instead, you first delete the existing file and then undelete the file you want. For example, if you had an undeleted version of the router-config file and you wanted to use a previous, deleted version instead, you could not simply undelete the previous version by index. You would first delete the existing router-config file and then undelete the previous router-config file by index. You can delete and undelete a file up to 15 times.

If you try to recover the configuration file pointed to by the CONFIG_FILE environment variable, the system prompts you to confirm recovery of the file. This prompt reminds you that the CONFIG_FILE environment variable points to an undeleted file. To permanently delete all "deleted" files on a Flash memory device, use the squeeze command. If you try to recover a file that has the same name as an existing valid file, the system displays an error message.

Example

The following example recovers the deleted file whose index number is 1 to the Flash memory card inserted in slot 0:

undelete 1 slot0:

Related Commands

You can use the master indexes or search online to find documentation of related commands.

delete
dir
squeeze

.

.

.

.

.

.

.

To report documentation errors in this book, send a detailed message referencing the "Cisco IOS Release 11.3 Configuration Fundamentals Command Reference" to bug-doc@cisco.com.