cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
870
Views
25
Helpful
7
Replies

Is it possible to erase flash while it is in use?

Darren Preuss
Level 1
Level 1

Hello all,

This may sound a silly question however I have just purcahsed a 2801 running CME.  When i show the content of the flash: there are approximately 110 files.

I understand that there will be a *.bin file in order to load the IOS image during startup, there will also be a *.tar file for the CME software. The other files, i appreciate are partly due to the previous owner having phones etc installed.

I would like to tidy the flash up and start from the beginning. I do not have a PCMCIA device available on the PC etc to delete files from the flash that I don't want so my question is.......

Can i copy the *.bin IOS file and the CME *.tar file to a TFTP server, erase the entire contents of the flash (that will be in use by the 2801 at this moment in time) so that the flash is empty and then re-copy the IOS and CME files from the TFTP server to the flash without it dieing a horrible death?

I am sure it can be done but i would rather check.

Thank you very much

Daz

CCNA, CCNA (Voice),
1 Accepted Solution

Accepted Solutions

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Can i copy the *.bin IOS file and the CME *.tar file to a TFTP server, erase the entire contents of the flash (that will be in use by the 2801 at this moment in time) so that the flash is empty and then re-copy the IOS and CME files from the TFTP server to the flash without it dieing a horrible death?

Yes, you can.  You can also delete the individual files and just leave the 2 you need on the flash.  If you do it the way you noted here, make sure you don't reboot or turn off the router until you reload the file back to the flash.  If not, you will have to use Xmodem to load the IOS and that can be painful.

HTH 

View solution in original post

7 Replies 7

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Can i copy the *.bin IOS file and the CME *.tar file to a TFTP server, erase the entire contents of the flash (that will be in use by the 2801 at this moment in time) so that the flash is empty and then re-copy the IOS and CME files from the TFTP server to the flash without it dieing a horrible death?

Yes, you can.  You can also delete the individual files and just leave the 2 you need on the flash.  If you do it the way you noted here, make sure you don't reboot or turn off the router until you reload the file back to the flash.  If not, you will have to use Xmodem to load the IOS and that can be painful.

HTH 

Thank you very much Reza.

You are a god send.

Thank you for the info on Xmodem just in case it goes belly up.  I have never done that before but it is good to have a backup plan.

Once again thank you

CCNA, CCNA (Voice),

CCNA, CCNA (Voice),

Can i copy the *.bin IOS file and the CME *.tar file to a TFTP server

I've got a better idea for you.  You can copy the files you want to a USB thumb drive.  2800 has two USB ports.  If you can find a suitable one (i. e.  supported and recognized by the router), format the thumb drive using the router (command:  format usbflash0:) and copy the two files across.

Once you are done, you can just format the entire CF and erase unwanted files in one switft stroke.

NOTE:  I have used USB thumb drives up to 2 Gb but some people have sworn to have success up to 8 Gb.   I haven't tried it because I don't have a "spare" 8 Gb lying around.

Thank you for the info on Xmodem just in case it goes belly up.

XModem is so "yesterday".  It's out-of-fashion and very old "skool".  Again, 2800 comes with two USB ports.  If your IOS fails, then you can boot the IOS directly from a USB thumb drive.  Before you can do that, you'll need to upgrade the Bootstrap (Bootstrap and IOS are NOT the same).  If you have access to download the bootstrap, go here.  Download bootstrap version 12.4(13r)T11.  The command to upgrade the boostrap is simple:  upgrade rom-monitor file .

Once you've upgraded the boostrap, the router will reload.  I must warn you that the option to boot an IOS from USB (on an ISR G1) is not documented by Cisco and the command to do so is HIDDEN.  When you are in ROMmon, to boot the IOS from a USB stick, use the command "boot usbflash0:IOS.bin".

Hope this helps.

Thank you Leo.

You have given me some great information.  I appreciate it.  I particularly like that you included the commands.

Many thanks

CCNA, CCNA (Voice),

Thanks for taking the time to rate our posts, Darren.

s.lachica
Level 1
Level 1

Hi Darren,

Just a quick addition to this. The technical explanation on these stuffs about IOS and flash contents. The way the flash works is that during bootup, the router loads the ios, it extracts it and copies the extracted files into the memory (RAM), so during the operation of the router, the IOS is really not running from flash anymore, but from the memory itself, therefore, whatever you do to the file, it won't affect the operation of the router, unless you rebooted it, and at that time it will need to read from flash again during bootup. If your IOS isn't there in the flash, you will be in the rommon mode.

If you happen to end up in rommon mode, there is another method that you can use. i know the usb is the most convinient, but just in case it isn't supported, do not use xmodem because it is ultimately slow. You can use the ethernet port and connect to the PC where your tftp is running (where the ios is coming from), then do the following command under rommon:

RTR[1st ethernet-interface]--------(cross-cable)-----[NIC]Laptop-tftp-server

rommon1>

IP_ADDRESS=172.18.16.76

IP_SUBNET_MASK=255.255.255.192

DEFAULT_GATEWAY=172.18.16.65

TFTP_SERVER=172.18.16.2

TFTP_FILE=/c2600-i-mz

tftpdnld

This is the link for the complete guide from cisco:

http://www.cisco.com/en/US/products/hw/routers/ps259/products_tech_note09186a008015bf9e.shtml

Hope this also helps!

CCIE (R&S) #27666 CCSI HP MASE

S.Lachica,

Thank you very much for your reply too.

All replies have been very helpful. 

Thank you all for taking the time to give such thorough replies.

CCNA, CCNA (Voice),
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco