cc/td/doc/product/lan/cat5000/c5k3_1
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Switch Flash Commands

Switch Flash Commands

This chapter describes the Flash commands used in the Catalyst 5000 series switch CLI for the Supervisor Engine III. For a summary of the available switch CLI commands, refer to the "Switch Command Quick Reference " chapter. For more information about using the switch CLI, refer to the "Switch Command-Line Interface" chapter.


Note The commands in this chapter apply only to the Supervisor Engine III. If you attempt to run these commands on a Supervisor Engine I or II, you will receive an error message. For information on installing and configuring the Supervisor Engine III, refer to the Catalyst 5000 Series Installation and Configuration Note.

Other commands are described elsewhere in this publication:

Switch CLI:

ATM module CLI:

cd

Use the cd command to set the default Flash device for the system.

cd [[m/]device:]
Syntax Description
m/ (Optional) Module number of the supervisor engine containing the Flash device.
device: (Optional) Valid devices include bootflash, slot0, slot1.
Default

The default Flash device is bootflash.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guidelines

A colon is required between the word "device" and the specified device.

For those commands where device is an option, default device set by cd will be used if the device is not specified.

Example

This example shows the system default Flash device is bootflash.

Console> cd bootflash:
Default flash device set to bootflash.
Related Command

pwd

copy

Use the copy command to copy a device configuration between Flash memory device and a file.

copy file-id [tftp | flash | file-id]
copy tftp [flash |
file-id]
copy flash [tftp |
file-id]
copy [tftp |
file-id]

where:

file-id has the format of m/device:filename
Syntax Description
m/ Module number of the supervisor engine containing the Flash device.
device: Device where the Flash resides.
filename Name of the configuration file.
flash (Optional) Keyword used to support multiple module download. Based on the file type derived, a prompt will be given for all modules of the same type. A different prompt will be given depending on the command argument and reply.
tftp (Optional) Keyword that specifies interactive prompting for the host and the file.
Default

If a source or destination device is not given, the one specified by the cd command is used.

If a destination filename is omitted, the source filename is used.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guideline

A colon is required between the word "device" and the specified device.

Examples

These examples show how to download an image from tftp to a Flash device:

Console> (enable) copy cat5k_r47_1.cbi slot1:
7995264 bytes available on device 1/slot1, proceed (y/n) [n]?y
.................................................................
Console> (enable) show flash slot1:
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. 2        43B312DF 201ed8  15   1052608  Nov 30 1996 11:12:30 cat5k_r47_1.cbi
6942656 bytes available (1052736 bytes used)
Console> (enable) copy cat5k_r47_1.cbi slot1:
6942528 bytes available on device 1/slot1, proceed (y/n) [n]?y
.................................................................
Console> (enable) show flash slot1:
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .D 2        43B312DF 201ed8  15   1052608  Nov 30 1996 11:12:30 cat5k_r47_1.cbi
1   .. 2        43B312DF 201ed8  15   1052608  Nov 30 1996 11:18:25 cat5k_r47_1.cbi
5889920 bytes available (2105472 bytes used)
Console> (enable)
< after copy 5 more times >
Console> (enable) copy cat5k_r47_1.cbi slot1:
626112 bytes available on device 1/slot1, proceed (y/n) [n]?y
...............
Not enough space left on device 1/slot1
Console> (enable)

This example shows how to squeeze or format the device, when there is not enough space to copy a new file:

Console> (enable) copy tftp slot0:
Address or name of remote host [172.20.22.7]?
Enter source file name [cat5k_r47_1.cbi]?
Enter destination file name [cat5k_r47_1.cbi]?
6942528 bytes available on device 1/slot0, proceed (y/n) [n]?y
...............................................................

This example shows how to download an image to multiple supervisor modules:

Console> (enable) copy tftp flash
Address or name of remote host [172.20.22.7]? 
Enter source file name [cat5k_r47_1.cbi]? 
Download image fddi_image to Module 1 FLASH (y/n) [n]? y
   Flash device [slot0]?
   Enter destination file name [cat5k_r47_1.cbi]?
Download image fddi_image to Module 2 FLASH (y/n) [n]? y
   Flash device [slot0]?
   Enter destination file name [cat5k_r47_1.cbi]?
6942528 bytes available on device 1/slot0, proceed (y/n) [n]?y
..................................................................
6942528 bytes available on device 2/slot0, proceed (y/n) [n]?y
..................................................................

This example shows how to download an image to multiple FDDI modules:

Console> (enable) copy tftp flash
Address or name of remote host [172.20.22.7]? 
Enter source file name [cat5k_r47_1.cbi]? fddi_image
Download image fddi_image to Module 5 FLASH (y/n) [n]? y
Download image fddi_image to Module 7 FLASH (y/n) [n]? n
Download image fddi_image to Module 8 FLASH (y/n) [n]? y
Downloading Module 5 ..........................
Downloading Module 8 ..........................

delete

Use the delete command to delete a file.

delete [[m/]device:]filename
Syntax Description
m/ (Optional) Module number of the supervisor engine containing the Flash device.
device: (Optional) Device where the Flash resides.
filename Name of the configuration file.
Default

This command has no default setting.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guidelines

A colon is required between the word "device" and the specified device.

Related Command

undelete

dir

Use the dir command to display a list of files on a Flash memory device.

dir [[m/]device:][filename] [all | deleted | long]
Syntax Description
m/ (Optional) Module number of the supervisor engine containing the Flash device.
device: (Optional) Device where the Flash resides.
filename (Optional) Name of the configuration file.
all (Optional) Keyword that displays all files, deleted or not.
deleted (Optional) Keyword that displays only deleted files.
long (Optional) Keyword that displays files that have not been deleted, in long format.
Default

This command has no default setting.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guidelines

A colon is required between the word "device" and the specified device.

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:

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

Examples

The following example shows how to use the dir command:

Console> dir
-#- -length- -----date/time------ name
2   1052608  Jun 26 1995 15:43:50 cat5k_r47_1.cbi
6283877 bytes available (2104731 bytes used)
Console> dir long
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
2   .. 2        43B312DF 201ed8  15   1052608  Nov 26 1996 15:43:50 cat5k_r47_1.cbi
6283877 bytes available (2104731 bytes used)
Console> dir all
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .D 2        2D6B310A 100fc0  15   1052123  Nov 26 1996 15:43:50 cat5k_r47_1.cbi
2   .. 2        43B312DF 201ed8  15   1052608  Nov 27 1996 10:23:30 cat5k_r47_1.cbi
6283877 bytes available (2104731 bytes used)
Console>

format

Use the format command to format a Flash card. A Flash card must be formatted before it can be used.

format [spare spare-number] [m/]device1: [[device2:][monlib-filename]]
Syntax Description
spare spare_number (Optional) Number of spare sectors to reserve when other sectors fail.
m/ (Optional) Module number of the supervisor engine containing the Flash device.
device: (Optional) Device where the Flash resides.
filename (Optional) Name of the configuration file.
monlib-filename (Optional) The name of the monlib file to use.
Default

The default number of spare sectors is 0.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guidelines

A colon is required between the word "device" and the specified device.

You can reserve up to 16 spare sectors for use when other sectors fail. If you do not reserve a spare sector and later some sectors fail, you will have to reformat the entire Flash memory, which will erase all existing data.

The monlib file is the ROM monitor library used by the ROM monitor to access files in the Flash file system. It is also compiled into the system image. 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 the monlib file from device2:. When you specify the whole [[device2:][monlib-filename]] argument, the system formats device1: using the specified monlib file from the specified device.


Note 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.
Example

This example shows how to use the format command:

Console> format slot1:
All sectors will be erased, proceed (y/n) [n]?y
Enter volume id (up to 31 characters):
Formatting sector 1
Format device slot1 completed.

pwd

Use the pwd command to show the current setting of the cd command.

pwd [[m/]device:]
Syntax Description
m/ (Optional) Module number of the supervisor engine containing the Flash device.
device: (Optional) Device where the Flash resides.
Default

If no module number or device is specified, pwd defaults to the first module of the active device.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guideline

A colon is required between the word "device" and the specified device.

Example

This example shows how to use the pwd command:

Console> pwd
bootflash
Console> cd
Default flash device set to slot0.
Console> pwd
slot0

squeeze

Use the squeeze command to delete Flash files permanently.

squeeze [m/]device:
Syntax Description
m/ (Optional) Module number of the supervisor engine containing the flash device.
device: Device where the Flash resides.
Default

This command has no default setting.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guideline

A colon is required between the word "device" and the specified device.

Examples

These examples show how to use the squeeze command:

Console> squeeze slot0:
All deleted files will be removed, proceed (y/n) [n]?y
Squeeze operation may take a while, proceed (y/n) [n]?y
..........................................................
Console> show flash
-#- ED --type-- --crc--- -seek-- nlen -length- -----date/time------ name
1   .. 2        43B312DF 100fc0  15   1052608  Nov 27 1996 10:23:30 cat5k_r47_1.cbi
7336000 bytes available (1052608 bytes used)
Console>

undelete

Use the undelete command to recover a deleted file on a Flash memory device. The deleted file can be recovered using its index (because there could be multiple deleted files with the same name).

undelete index [[m/]device:]
Syntax Description
index Index of the deleted file.
m/ (Optional) Module number of the supervisor engine containing the flash device.
device: (Optional) Device where the Flash resides.
Default

This command has no default setting.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guidelines

A colon is required between the word "device" and the specified device.

Use the dir command to learn the index number of the file wanting to be undeleted.

A file cannot be undeleted if a valid file with the same name exists. You must delete the existing file before you can undelete the target file.

A file can be deleted and undeleted up to 15 times.

To delete all deleted files permanently on a device, use the squeeze command.

Examples

These examples show how to use the undelete command:

Console> undelete 1
File undelete error (file not unique)
Console> delete slot1:some-other-image
slot1:some-other-image has been deleted.
Console> undelete 1 slot1
slot1:some-other-image has been recovered.

verify

Use the verify command to confirm the checksum of a file on a Flash device.

verify [[m/]device:] filename
Syntax Description
m/ (Optional) Module number of the supervisor engine containing the Flash device.
device: (Optional) Device where the Flash resides.
filename Name of the configuration file.
Default

This command has no default setting.

Command Type

Flash command.

Command Mode

Privileged.

Usage Guideline

A colon is required between the word "device" and the specified device.

Example

This example shows how to use the verify command:

Console> verify cat5k_r47_1.cbi
..........................................................
File cat5k_r47_1.cbi verified OK.

whichboot

Use the whichboot command to determine which file booted.

whichboot
Syntax Description

None

Default

This command has no default setting.

Command Type

Flash command.

Command Mode

Privileged.

Example

This example shows how to use the whichboot command:

Console> whichboot

hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1997 © Cisco Systems Inc.