cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7679
Views
10
Helpful
14
Replies

Where is free space after deleting ios file in switch

eigrpy
Level 4
Level 4

 

Hi There is not enough space in flash in the switch 3560 for upgrading ios. So I deleted the original ios to get more space. However, after deleting the ios, the free space did not increase, instead it decrease a little. please see the blow which is output after deleting ios. so I still cannot import the ios (11MB) into flash. Where is the space that the original ios occupied? Maybe I need to reboot, but that would be an issue without ios. 

 

Switch#sh flash

Directory of flash:/

2 -rwx 736 Mar 1 1993 00:32:39 +00:00 vlan.dat
3 -rwx 2461 Mar 1 1993 01:47:20 +00:00 config.text
4 -rwx 24 Mar 1 1993 01:47:20 +00:00 private-config.text
5 drwx 192 Mar 1 1993 00:05:49 +00:00 c3560-ipbase-mz.122-25.SEE2

15998976 bytes total (7841792 bytes free)
Switch#

1 Accepted Solution

Accepted Solutions

Try

delete /force /recursive flash:/c3560-ipbase-mz.122-25.SEE2/

If this works, Do NOT reload the switch.

HTH

View solution in original post

14 Replies 14

Reza Sharifi
Hall of Fame
Hall of Fame

Hi,

Hopefully, you didn't delete the IOS that the switch is running because if you did, you don't want to reload the switch.

What is the output of "sh ver" and "dir"?

HTH

 

Thanks for your reply. the current version is the same as before because i have not rebooted yet since i deleted the ios. Please see the below:

Switch#show flash

Directory of flash:/

2 -rwx 736 Mar 1 1993 00:32:39 +00:00 vlan.dat
3 -rwx 2461 Mar 1 1993 01:47:20 +00:00 config.text
4 -rwx 24 Mar 1 1993 01:47:20 +00:00 private-config.text
5 drwx 192 Mar 1 1993 00:05:49 +00:00 c3560-ipbase-mz.122-25.SEE2

15998976 bytes total (7841792 bytes free)
Switch#
Switch#show ver
Cisco IOS Software, C3560 Software (C3560-IPBASEK9-M), Version 12.2(25)SEE2, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 28-Jul-06 12:34 by yenanh
Image text-base: 0x00003000, data-base: 0x00FF4334

ROM: Bootstrap program is C3560 boot loader
BOOTLDR: C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(25r)SEC, RELEASE SOFTWARE (fc4)

Switch uptime is 4 hours, 27 minutes
System returned to ROM by power-on
System image file is "flash:/c3560-ipbasek9-mz.122-25.see2.bin"


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C3560-24PS (PowerPC405) processor (revision P0) with 118784K/12280K bytes of memory.
Processor board ID CAT1038RKF1
Last reset from power-on
3 Virtual Ethernet interfaces
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 00:19:56:B4:CD:00
Motherboard assembly number : 73-9673-09
Power supply part number : 341-0029-05
Motherboard serial number : CAT10385GQY
Power supply serial number : DTH1038CGXR
Model revision number : P0
Motherboard revision number : A0
Model number : WS-C3560-24PS-S
System serial number : CAT1038RKF1
Top Assembly Part Number : 800-25861-04
Top Assembly Revision Number : B0
Version ID : V06
CLEI Code Number : COM1X00ARC
Hardware Board Revision Number : 0x01


Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C3560-24PS 12.2(25)SEE2 C3560-IPBASEK9-M


Configuration register is 0xF

Leo Laohoo
Hall of Fame
Hall of Fame

@eigrpy wrote:
5 drwx 192 Mar 1 1993 00:05:49 +00:00 c3560-ipbase-mz.122-25.SEE2

The IOS is BIN file is found in this sub-directory. 

Before you begin to delete this:

  1. What is the IOS version you are planning to upgrade to? 
  2. What is the complete filename of the firmware you are going to use for the upgrade?

This is output of dir before deleting the original ios :

Switch#dir
Directory of flash:/

2 -rwx 736 Mar 1 1993 00:32:39 +00:00 vlan.dat
3 -rwx 2461 Mar 1 1993 01:47:20 +00:00 config.text
4 -rwx 24 Mar 1 1993 01:47:20 +00:00 private-config.text
5 drwx 192 Mar 1 1993 00:05:49 +00:00 c3560-ipbase-mz.122-25.SEE2
409 -rwx 7007616 Mar 1 1993 04:24:30 +00:00 c3560-ipbasek9-mz.122-25.see2.bin

15998976 bytes total (833536 bytes free)

 

The new one for upgrade is c3560-ipbasek9-mz.122-55.SE7.bin, which is 11,489 KB

You may have to squeeze the flash to get more space but be very careful because a reboot will cause the switch to go to rommon since you don't have the original IOS on the flash anymore. Take a look at this document.

 

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3650/software/release/3se/system_management/configuration_guide/b_sm_3se_3650_cg/b_sm_3se_3650_cg_chapter_010010.html

HTH

After reboot, every output show the same as before. It looks like the original ios is still in flash and hide itself in some place. That also means I did not delete it though i used delete command. However I have to delete the original ios, otherwise no space to upgrade it to the new ios. 

 

Switch#show flash:

Directory of flash:/

2 -rwx 736 Mar 1 1993 00:32:39 +00:00 vlan.dat
3 -rwx 3578 Mar 1 1993 04:54:13 +00:00 private-config.text
5 drwx 192 Mar 1 1993 00:05:49 +00:00 c3560-ipbase-mz.122-25.SEE2
409 -rwx 2534 Mar 1 1993 04:54:13 +00:00 config.text

15998976 bytes total (7838720 bytes free)
Switch#
Switch#
Switch#show ver
Cisco IOS Software, C3560 Software (C3560-IPBASE-M), Version 12.2(25)SEE2, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 28-Jul-06 07:19 by yenanh
Image text-base: 0x00003000, data-base: 0x00EB0F14

ROM: Bootstrap program is C3560 boot loader
BOOTLDR: C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(25r)SEC, RELEASE SOFTWARE (fc4)

Switch uptime is 1 minute
System returned to ROM by power-on
System image file is "flash:/c3560-ipbase-mz.122-25.SEE2/c3560-ipbase-mz.122-25.SEE2.bin"

cisco WS-C3560-24PS (PowerPC405) processor (revision P0) with 118784K/12280K bytes of memory.
Processor board ID CAT1038RKF1
Last reset from power-on
3 Virtual Ethernet interfaces
24 FastEthernet interfaces
2 Gigabit Ethernet interfaces
The password-recovery mechanism is enabled.

512K bytes of flash-simulated non-volatile configuration memory.
Base ethernet MAC Address : 00:19:56:B4:CD:00
Motherboard assembly number : 73-9673-09
Power supply part number : 341-0029-05
Motherboard serial number : CAT10385GQY
Power supply serial number : DTH1038CGXR
Model revision number : P0
Motherboard revision number : A0
Model number : WS-C3560-24PS-S
System serial number : CAT1038RKF1
Top Assembly Part Number : 800-25861-04
Top Assembly Revision Number : B0
Version ID : V06
CLEI Code Number : COM1X00ARC
Hardware Board Revision Number : 0x01


Switch Ports Model SW Version SW Image
------ ----- ----- ---------- ----------
* 1 26 WS-C3560-24PS 12.2(25)SEE2 C3560-IPBASE-M


Configuration register is 0xF

 

 

This time I even could not delete, please see below

Switch#delete
Switch#delete flash
Switch#delete flash:c3560-ipbase-mz.122-25.SEE2
Delete filename [c3560-ipbase-mz.122-25.SEE2]?
Delete flash:c3560-ipbase-mz.122-25.SEE2? [confirm]
%Error deleting flash:c3560-ipbase-mz.122-25.SEE2 (Is a directory)
Switch#
Switch#delete flash:c3560-ipbase-mz.122-25.SEE2.bin
Delete filename [c3560-ipbase-mz.122-25.SEE2.bin]?
Delete flash:c3560-ipbase-mz.122-25.SEE2.bin? [confirm]
%Error deleting flash:c3560-ipbase-mz.122-25.SEE2.bin (No such file or directory)
Switch#


@eigrpy wrote:

The new one for upgrade is c3560-ipbasek9-mz.122-55.SE7.bin, which is 11,489 KB


DO NOT DELETE THE SUB-DIRECTORY. 

Get the IOS file with the extension of "TAR". 

Use the tried-and-tested command to upload the firmware to the switch: 

archive download-sw /overwrite /image tftp://<TFTP_IP_ADDRESS>/<IOS_FILENAME>.tar

NOTE

  1. If you have valid Service Contract, 3560 firmware can still be downloaded from HERE
  2. 12.2(55)SE or 15.0(2)SE are very stable trains.
  3. Download the TAR file.

Try

delete /force /recursive flash:/c3560-ipbase-mz.122-25.SEE2/

If this works, Do NOT reload the switch.

HTH

After using command: delete /force /recursive flash:/c3560-ipbase-mz.122-25.SEE2/ , I can see all space in flash, which is like this:

15998976 bytes total (15990784 bytes free),

Now my switch has new ios. Thank you!

 

15998976 bytes total (15990784 bytes free)

Yeah, you almost have the whole flash available now except a few bytes.

Good Luck!

How do we reload the new image without rebooting?

"The recommended firmware for the upgrade should be c3560-ipbasek9-mz.122-55.SE7.bin, not a TAR file."

Just curious, where did you see the .bin recommended vs. the .tar?


@beverlymomo wrote:
I'm sorry to bother, but I have to disagree. The recommended firmware for the upgrade should be c3560-ipbasek9-mz.122-55.SE7.bin, not a TAR file.

Wrong.  TAR file trumps BIN file by a wide margin.  Inside the TAR file is the BIN and other relevant files.  

Since 2011, I have fixed many broken IOS upgrades by those who simply copied the BIN file (instead of using "archive download-sw") and people are still continuing to use this old and archaic method.  

 


@beverlymomo wrote:
You should use the command "archive download-sw /overwrite /image" followed by the direct link to the .bin file for the firmware upgrade

Using the "archive download-sw" against a BIN file?  I can 100% guarantee it will not work.  The "archive download-sw" will only work with TAR file extension.   

 


@beverlymomo wrote:
make sure to verify the compatibility and stability of the firmware version before proceeding with the upgrade

Wrong. If-and-when using the "archive download-sw", at the end of the process, the "archive" automation will perform a verification check at the end of the process.  This is why the "archive download-sw" will always be the best option to use for IOS upgrade.