You want to change how your router’s flash memory is partitioned.
The partition command allows you to create a partition in the router’s flash memory:
The erase command deletes the entire contents of a flash device. On routers that don’t support the delete and squeeze commands, there is no way to delete an individual file from flash Without erasing all of the files in the flash device. Fortunately, you can use the partition command on flash devices to shelter some files from the effects of the erase command.
After you have partitioned a flash device, the erase command only affects one partition at a time. This command doesn’t affect any of the other partitions on the same flash device. You can use it to allow you to delete individual files without having to wipe out the entire flash device.
In the next example, we partitioned a flash device into two equal parts. We then stored an IOS image on each of the partitions. You can see the partitions and their contents with the Following command:
Notice that the router treats the two partitions as if they were separate flash devices. You can erase the contents a particular partition by specifying the flash device name, followed by the partition number and a colon as follows:
Then, if you view the entire flash device again, you can see that the file in partition 2 has been erased, while the contents of partition 1 remain untouched:
you attempt to erase one file from this flash device without partitioning it first, the router will erase both IOS images.
You can remove an existing set of partitions with the no partition command:
Finally, you can safely partition a flash device that already contains files, as long as you don’t attempt to create a partition partway through an existing file. If you do attempt create a partition that partitions an existing file, then the router will identify it as a problem.