The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This appendix describes installation prerequisites you should observe before you can use the CompactFlash Disk in your system, and includes the following sections:
•Hardware and Software Requirements
•"Sample Upgrade Process" section
•Working with a CompactFlash Disk
•Working with a CompactFlash Disk
CompactFlash Disks are designed with Flash technology, a nonvolatile storage solution that does not require a battery to retain data indefinitely. CompactFlash Disks provide complete PCMCIA-ATA functionality and compatibility as defined by the CompactFlash Association in their CF+ and CompactFlash Specification, revision 1.4.
The CompactFlash Disk is more flexible than linear Flash memory because the CompactFlash Disk has controller circuitry that allows it to emulate a hard disk and automatically maps out bad blocks and performs automatic block erasure. Further, the CompactFlash Disk provides the capability to allocate noncontiguous sectors, which eliminates the need for the squeeze command (previously required with linear Flash memory cards).
The CompactFlash Disk provides increased Flash-based memory space—64 MB to 128 MB—for storage of system configuration files, Cisco IOS software images, and other types of system-related files. Table B-1 provides memory information for the CompactFlash Disk.
|
|
---|---|
64 MB |
MEM-7301-FLD64M= |
128 MB |
MEM-7301-FLD128M= |
Note The CompactFlash Disk is only supported on systems with the Cisco IOS File System feature, and the Cisco IOS File System feature is supported in Cisco IOS Release 12.0(1) or later releases of 12.0. In general, CompactFlash Disk functionality requires Cisco IOS Release 12.0(2) or a later release of 12.0.
The Cisco IOS File System feature provides a single interface to all file systems your system uses:
•Flash memory file systems—CompactFlash Disks and onboard Flash memory
•Network file systems—File Transfer Protocol (FTP), Remote Copy Protocol (rcp), and TFTP
•Any other endpoint for reading or writing data—NVRAM, the running configuration, ROM, raw system memory, system bundled microcode, Xmodem, Flash load helper log, modems, and BRI MUX interfaces
Note A complete discussion of the Cisco IOS File System feature is beyond the scope of this publication. For information about this feature, refer to the Configuration Fundamentals Configuration Guide and Configuration Fundamentals Command Reference publications for Cisco IOS Release 12.x. These publications are available on the Documentation DVD and through Cisco.com. ( For information on how to access Cisco.com, see the "Obtaining Documentation and Submitting a Service Request" section on page xi.)
The Cisco 7301 uses only CompactFlash Disks of the following configurations:
•64 MB, Product ID: MEM-7301-FLD64M=
•128 MB, Product ID: MEM-7301-FLD128M=
The minimum Cisco IOS release for the Cisco 7301 CompactFlash Disks is Cisco IOS Release 12.2(11)YZ.
You need some or all of the following tools and parts to install a CompactFlash Disk:
•Antistatic wrist strap
•Access to a Trivial File Transfer Protocol (TFTP) server
•One of the following CompactFlash Disk kits:
–64 MB, Product ID: MEM-7301-FLD64M=
–128 MB, Product ID: MEM-7301-FLD128M=
This section discusses CompactFlash Disk compatibility and use between supported systems.
In order to boot a Cisco IOS software image from the CompactFlash Disk, when the system is executing from the ROM monitor software image, your ROM monitor software image and your boot image must be from one of the minimum Cisco IOS releases listed in the "Hardware and Software Requirements" section. Use the show version or show hardware commands to verify that your system is running these software images.
The format command places a processor-specific file system on the CompactFlash Disk so that the ROM monitor software can read the CompactFlash disk media. If you plan to use the boot or dir commands at the ROM monitor prompt (rommon>), you might need to reformat your CompactFlash Disk if it was not already formatted on a like system processor.
For simple file storage and retrieval functions, CompactFlash Disks can be interchanged between any Cisco 7301 router.
Note The CompactFlash Disk in the Cisco 7301 router is supported on the c7301-boot-mz image.
The read-only memory (ROM) monitor image on your system performs important functions, such as running a brief set of system diagnostics, and initializing the hardware. This image gains control at reset or power on, or after a nonrecoverable event (such as a bus error). The ROM monitor software image has a rudimentary user interface that is recognizable by way of the ROM monitor prompt (rommon>). The ROM monitor software image has console drivers and trap handlers for parity and bus errors; however, the ROM monitor does not have any network interface code and it cannot boot an image over the network.
Note The ROM monitor is only able to load an image from boot flash memory or a CompactFlash Disk.
By default, and as a result of a reset or power on, the ROM monitor loads the boot image from boot flash memory. If the ROM monitor cannot find a bootable image in boot flash memory, it searches the CompactFlash Disk for the first bootable image. Normally, this would be the c7301-boot-mz image.
The boot image, when loaded, looks in the boot environment variables—stored in nonvolatile random-access memory (NVRAM)—to determine the location of the Cisco IOS software image and the configuration to use. If boot environment variables are not defined, the system will boot the first image found on the CompactFlash Disk.
The operation of the boot environment variables is described in the "Boot Environment Variables" section, which follows.
The contents of the boot environment variables, which are stored in the configuration file in NVRAM, determine the actions your system takes on bootup. To see the current settings of these variables, use the show bootvar command as follows:
Router> show bootvar
BOOT variable =
CONFIG_FILE variable =
Current CONFIG_FILE variable =
BOOTLDR variable does not exist
Configuration register is 0x100
Following are explanations for each of these boot environment variables:
•BOOT variable—Points to the Cisco IOS software image that you want to boot; you set it in configuration mode. The default software image is the CISCOxxx image (where xxx is a filename assigned by the system, if you do not enter a specific filename). The system then looks for the first image on the CompactFlash Disk in slot 0.
Enter configuration mode and specify a filename and CompactFlash Disk slot from which to boot using the configure terminal and boot system commands as follows:
Router# configure terminal
Enter configuration commands, one per line. End with CTRL-Z.
System(config)# boot system flash disk0:rsp-p-mz.12-0
The result of this configuration file entry is that the BOOT variable is disk0: c7301-js-mz.122...bin
CONFIG_FILE (configuration file) variable—Determines where the configuration is read from on bootup; you set it in configuration mode as follows:
Router# configure terminal
Enter configuration commands, one per line. End with CTRL-Z.
System(config)# boot config disk0:configfile
The result of this configuration file entry is that the CONFIG_FILE variable is disk0:configfile.
•BOOTLDR (boot loader) variable—Determines which image is used as the boot helper (boot image); you set it in configuration mode as follows:
Router# configure terminal
Enter configuration commands, one per line. End with CTRL-Z.
System(config)# boot bootldr bootflash:c7301-boot-mz
The result of this configuration file entry is that the BOOTLDR variable is bootflash:c7301-boot-mz.
•Configuration register variable—Instructs the system where to look for a bootable Cisco IOS software image; you set it as a hexadecimal value in configuration mode as follows:
Router# configure terminal
Enter configuration commands, one per line. End with CTRL-Z.
System(config)# config-register 0x102
The result of this configuration file entry is that the configuration register is set to hexadecimal 0x102. Please see Chapter 3, "Starting and Configuring the Router," the "Starting the System and Observing Initial Conditions" section on page 3-9 for information about the configuration register.
This section applies to users who want to use CompactFlash Disks for simple file storage.
Step 1 Format your onboard Flash memory—called boot flash memory. (See the format command description in the "Software Command Overview" section.)
Step 2 Upgrade your onboard Flash memory by copying the Cisco IOS Release 12.x boot image (the c7301-boot-mz) into onboard Flash memory. (See the "Software Command Overview" section.)
Step 3 Copy the Cisco IOS Release 12.x software image from onboard Flash memory to the CompactFlash Disk.
Step 4 Change the boot variables in your configuration file to point to the new Cisco IOS image in your CompactFlash Disk. (See the preceding section, "Boot Environment Variables," and the "Making a CompactFlash Disk-Based Software Image the Bootable Software Image" section.)
Step 5 Reboot your system to load the Cisco IOS Release 12.x software image from the CompactFlash Disk.
Step 6 Insert a new CompactFlash Disk. (See "Installing and Removing the CompactFlash Disk" section on page 4-2.)
Step 7 With your system running Cisco IOS Release 12.x, format the blank CompactFlash Disk. (See the format command description in Table B-2, and the "Using the format Command" section.)
You should now be able to store configuration files and Cisco IOS software images on your CompactFlash Disk.
This section provides basic instructions for working with a CompactFlash Disk in your system. Detailed descriptions of more complex CompactFlash Disk options and the Cisco IOS File System feature are beyond the scope of this publication and can be found in the following Cisco IOS Release 12.x publications:
•Configuration Fundamentals Configuration Guide, in the chapter "File Management"
•Configuration Fundamentals Command Reference, in the chapter "File Management Commands"
Note These and all publications are available online, on the Documentation CD-ROM, and on Cisco.com. For information on how to access Cisco.com, see the "Obtaining Documentation and Submitting a Service Request" section on page xi.
This section includes the following subsections:
•Enabling Booting from a CompactFlash Disk
•Making a CompactFlash Disk-Based Software Image the Bootable Software Image
This section lists some of the basic software commands you can use with the CompactFlash Disk. Examples of these commands are included in the sections that follow.
The CompactFlash Disk and other memory devices and locations in your system are defined as file systems, which are locations where you can store, use, or retrieve files and software images. (See the brief discussion about the Cisco IOS File System feature in the "Working with a CompactFlash Disk" section.)
A CompactFlash Disk in the Cisco 7301 is referred to as disk0.
The following partial output of the show file systems command shows a sample system with a CompactFlash Disk—called disk0:—installed in slot 0:
System# show file systems
File Systems:
Size(b) Free(b) Type Flags Prefixes
(Additional displayed text omitted from this example.)
48755200 48747008 flash rw disk0:
Table B-2 lists the software commands that you can use with the CompactFlash Disk.
Note You can use other arguments with some of the commands listed in Table B-2; however, in Table B-2 and throughout this document, command arguments are limited to those that apply to the CompactFlash Disk and related file systems.
For a discussion of additional command arguments, refer to the Configuration Fundamentals Command Reference document, in the chapter "File Management Commands."
This section provides examples of some of the basic software commands you can use with the CompactFlash Disk. See Table B-2 for optional arguments you can use with some of the following commands:
Use the cd command by defining a specific path name. Then to verify your working directory, use the pwd command:
System# cd disk0:
System# pwd
disk0:/
You can also move up (or back) one level in the CompactFlash Disk directory hierarchy using the cd .. command, and then verify your working directory with the pwd command:
System# pwd
disk0:daily_dir/
System# cd ..
System# pwd
disk0:/
System#
To display information about CompactFlash Disk format and geometry, use the show [disk0:] command:
System# show disk0:filesys
******** ATA Flash Card Geometry/Format Info ********
ATA CARD GEOMETRY
Number of Heads: 16
Number of Cylinders 840
Sectors per Cylinder 32
Sector Size 512
Total Sectors 430080
ATA CARD FORMAT
Number of FAT Sectors 105
Sectors Per Cluster 16
Number of Clusters 26822
Number of Data Sectors 429536
Base Root Sector 338
Base FAT Sector 128
Base Data Sector 370
Router#
In this example:
•Number of Heads is the number of heads on the CompactFlash Disk.
•Number of Cylinders is the number of cylinders on the CompactFlash Disk.
•Sectors per Cylinder is the number of sectors in each cylinder.
•Sector Size is the number of bytes in each sector.
•Total Sectors is the total number of sectors on the CompactFlash Disk.
•Number of FAT Sectors is the number of sectors used to track allocation of clusters to files.
•Sectors Per Cluster is the number of sectors contained in each cluster. (Files grow by a minimum of one cluster.)
•Number of Clusters is the total number of clusters available for use by files.
•Number of Data Sectors is the number of sectors available for files.
•Base Root Sector is the logical address of the first sector of the root directory.
•Base FAT Sector is the first sector in the File Allocation Table (FAT).
•Base Data Sector is the first sector available for use by files.
You can verify your working directory by using the pwd command:
System# pwd
disk1:daily_dir/
System# cd ..
System# pwd
disk1:/
System#
To list the directory structure and contents of the CompactFlash Disk from which you are currently working, use the dir command with no arguments:
System# dir
Directory of disk0:/
1 drw- 0 Jul 25 1998 10:23:11 daily_dir
2 drw- 0 Jul 25 1998 10:28:37 access_lists
64755200 bytes total (64742912 bytes free)
System#
Note that the size of the CompactFlash Disk is shown in the output of the dir command. (A 64-MB CompactFlash Disk is shown in this example.) You can also view the contents of other directories and file systems using specific optional arguments with the dir command.
To format a new CompactFlash Disk, use the format [disk0: ] command.
Note You must format a new CompactFlash Disk before you can use it. If you plan to use a CompactFlash Disk that was formatted and used on another type of system, see the "Compatibility Requirements" section to determine if you need to reformat the CompactFlash Disk first.
Note If you order a spare CompactFlash Disk, it is shipped blank; therefore, you must format it before you can use it.
Use the following procedure to format a new CompactFlash Disk using the format command. (The procedure assumes you have already booted your system.)
Step 1 Insert the CompactFlash Disk into slot 0 using the procedures in the "Installing and Removing the CompactFlash Disk" section on page 4-2.
Step 2 Use the format disk0: command to format the CompactFlash Disk in slot 0 as follows:
Router# format disk0:
Format operation may take a while. Continue? [confirm]
Format operation will destroy all data in "disk0:". Continue? [confirm]
Format: Drive communication & 1st Sector Write OK
Writing Monlib
sectors..........................................................
.................................................................
....
Monlib write complete
Format: All system sectors written. OK...
Format: Total sectors in formatted partition: 125152
format: Total bytes in formatted partition: 64077824
Format: Operation completed successfully.
Format of disk0 complete
Note A 64-MB CompactFlash Disk was formatted in this example.
The new CompactFlash Disk is now formatted and ready to use in the system on which you formatted it.
(For specific formatting and compatibility requirements, see the "Compatibility Requirements" section.)
To create a directory on the CompactFlash Disk, use the mkdir command. The following example shows how to create a directory called daily_dir on the CompactFlash Disk in slot 0, and then verify that it was created:
System# mkdir disk0:daily_dir
Created dir disk0:daily_dir
System# dir
Directory of disk0:/
1 drw- 0 Jul 25 1998 10:15:43 daily_dir
48755200 bytes total (48751104 bytes free)
System#
Note If you create a directory and place a file in it that you plan to access or use later on, be sure to define the entire directory path to the file as you enter the appropriate software commands.
For example, if you placed the file itsa.file into the directory daily_dir on the CompactFlash Disk in slot 0, you must designate the entire directory path as follows: disk0:daily_dir/itsa.file. Otherwise, the system might not be able to locate this file.
To remove a directory from the CompactFlash Disk, use the rmdir command. The following example shows how to remove the directory daily_dir from the CompactFlash Disk in slot 0, and then verify that it was removed:
System# rmdir disk0:daily_dir
Delete disk0:daily_dir? [confirm] y
Removed dir disk0:daily_dir
System# dir
Directory of disk0:/
No files in directory.
48755200 bytes total (48751104 bytes free)
System#
To delete a file from a CompactFlash Disk, use the delete command. Use the dir command to find the file you want to delete, and then use the delete command to delete it.
The following example shows how to find a file (called fun1) on the CompactFlash Disk, delete the file, and then verify that it is deleted:
Step 1 Find the file you want to delete:
System# dir
Directory of disk0:/
1 drw- 0 May 10 1998 09:54:53 fun1
48755200 bytes total (48742912 bytes free)
Step 2 Delete the file fun1:
System# delete disk0:fun1
Step 3 Verify that the file fun1 is deleted:
System# dir
Directory of disk0:/
No files in directory.
48755200 bytes total (48742912 bytes free)
System#
This section explains how to enable booting from a CompactFlash Disk.
To enable booting from a CompactFlash Disk, set configuration register bits 3, 2, 1, and 0 to a value between 2 and 15 in conjunction with the boot system [disk0:]filename configuration command. This section includes only descriptions of boot commands specific to the CompactFlash Disk. (You can use either the slotn: argument or the diskn: argument for boot commands.)
Following are definitions of the various CompactFlash Disk-related boot commands:
•boot system flash disk0: or boot system slot0:—Boots the first file in the CompactFlash Disk in slot 0.
•boot system flash disk0:herfile or boot system slot0:herfile—Boots the file named herfile from the CompactFlash Disk in slot 0.
As you enter boot commands, pay attention to how you use the Spacebar, which influences the way your system interprets the commands. Also, ensure that you define the entire path to a file as you enter the boot commands; otherwise, the system might not be able to find the file.
For example, notice the difference in the following correct and incorrect commands:
System(config)# boot system flash disk0:myfile
Based on the preceding correct command, the system boots the file specified (myfile).
System(config)# boot system flash disk0: myfile
Based on the preceding incorrect command, the system finds the filename field blank because there is a space after disk0:. In this case, the system ignores the filename argument and boots the first file on the CompactFlash Disk, which might not be the file called myfile.
Use the following procedure to enable booting the file myfile from a CompactFlash Disk:
Step 1 Enter configuration mode and specify an image filename in the CompactFlash Disk slot from which to boot by using the configure terminal command, as follows:
System# configure terminal
Enter configuration commands, one per line. End with CTRL-Z.
System(config)# boot system flash disk0:myfile
Step 2 Enable the boot system flash disk0:myfile command using the config-register command with the hexadecimal value shown in the following example:
System(config)# config-reg 0x2102
This command, with the hexadecimal value 0x2102, results in the following:
•Enables the system to boot the default boot ROM software if the CompactFlash Disk-based image fails to boot—hexadecimal value 0x2000
•Disables Break—hexadecimal value 0x0100
•Enables the image myfile as the default boot image—hexadecimal value 0x0002
Step 3 Press Ctrl-Z to exit configuration mode:
System(config)#
Crtl-Z
System#
Step 4 Save the new configuration to NVRAM by using the copy system:running-config nvram:startup-config command as follows:
System# copy system:running-config nvram:startup-config
This section explains how to make a CompactFlash Disk-based Cisco IOS software image a bootable image.
After you copy a software image to the CompactFlash Disk, use the following series of commands to make the image bootable (the file named new.image in this example). The software image in this example is located on the CompactFlash Disk in slot 0. Note that the config-register command is also a part of this command sequence because you must set the configuration register to 0x2102 to enable loading an image from the CompactFlash Disk.
System# config terminal
System(config)# no boot system
System(config)# boot system flash disk0:new.image
System(config)# config-register 0x2102
Ctrl-Z
System# copy system:running-config nvram:startup-config
System# reload
When the system reloads, it boots the image new.image from the CompactFlash Disk in slot 0.