Using the IOS Filesystem for Images

The upgrade procedure described in the previous sections is for a Class B IOS filesystem. Class B filesystems are probably the most common, but they aren’t universal—particularly on high-end routers. There are also Class A and Class C filesystems; the filesystem you have depends on the router you’re using. Table 2-4 shows which filesystem is used in a number of different routers.

Table 2-4. Flash filesystem types

Filesystem type

Router

Class A

7000 series, C12000, and LightStream 1010

Class B

1003, 1004, 1005, 2500, 3600, 4000, AS5200, 800

Class C

3810

As far as a user is concerned, the filesystems differ primarily in the commands that they support. Table 2-5 lists the filesystem commands and what they do.

Table 2-5. Filesystem commands

Command

Filesystem

Description

cd

All

Changes the working directory.

delete

All

Deletes a file. On Class A filesystems, this command marks the file for deletion; the squeeze command purges deleted files from the filesystem. On Class B filesystems, the files disappear from directory listings (unless you use /all), but there is no way to reclaim the space, short of erasing the entire filesystem. On Class C filesystems, the file is deleted immediately.

dir

All

Displays the directory’s contents. The /all option shows deleted and undeleted files.

erase

A, B

Erases the entire filesystem.

format

A, C

Formats the filesystem.

fsck

C

Verifies the filesystem’s consistency.

mkdir ...

Get CISCO IOS in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.