09-23-2009
12:24 AM
- last edited on
05-23-2023
12:57 PM
by
Translator
Hi,
We are upgrading the IOS on our switches as the current image does not support SSH.
If I copy the new IOS to flash, it will still boot up with the old IOS which is in a directory in flash.
How do I delete the entire directory in one command?
I tried to use
boot system
command but this doesn't work.
What I was going to do is delete the directory containing the IOS, copy the new IOS over.
Solved! Go to Solution.
09-23-2009
11:05 AM
- last edited on
05-23-2023
01:01 PM
by
Translator
Here is my assumption
1) you want to copy the .bin file only to the flash. Where the .bin file is your new IOS image
2) you want to remove the old IOS in
flash:/c3560-ipbase-mz.122-25.SEB4/
You can use the following command to remove the directory
delete /force /recursive flash:/c3560-ipbase-mz.122-25.SEB4/
DO NOT REBOOT THE BOX. Once that is done, copy the new IOS into the flash via TFTP or FTP. Then
verify /md5 image_name
Compare the MD5 checksum with the checksum on CCO.
To change the boot variable
config t
boot system flash:/image_name.bin
exit
wri mem
Use show boot to verify.
Here is the output of show boot in my switch in the lab
SW1#sh boot
BOOT path-list : flash:/c3560e-universalk9-mz.122-44.SE6.bin
Config file : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break : no
Manual Boot : no
HELPER path-list :
Auto upgrade : yes
Auto upgrade path :
Timeout for Config
Download: 0 seconds
Config Download
via DHCP: disabled (next boot: disabled)
SW1#
HTH,
jerry
09-23-2009
06:04 AM
- last edited on
05-23-2023
12:59 PM
by
Translator
When I upgraded my switches using the
archive download-sw
command, it was all done for me. I used the files with the -tar in them. There was an option to delete the old file / directory as part of the command and it even modified the boot.
09-23-2009
11:05 AM
- last edited on
05-23-2023
01:01 PM
by
Translator
Here is my assumption
1) you want to copy the .bin file only to the flash. Where the .bin file is your new IOS image
2) you want to remove the old IOS in
flash:/c3560-ipbase-mz.122-25.SEB4/
You can use the following command to remove the directory
delete /force /recursive flash:/c3560-ipbase-mz.122-25.SEB4/
DO NOT REBOOT THE BOX. Once that is done, copy the new IOS into the flash via TFTP or FTP. Then
verify /md5 image_name
Compare the MD5 checksum with the checksum on CCO.
To change the boot variable
config t
boot system flash:/image_name.bin
exit
wri mem
Use show boot to verify.
Here is the output of show boot in my switch in the lab
SW1#sh boot
BOOT path-list : flash:/c3560e-universalk9-mz.122-44.SE6.bin
Config file : flash:/config.text
Private Config file : flash:/private-config.text
Enable Break : no
Manual Boot : no
HELPER path-list :
Auto upgrade : yes
Auto upgrade path :
Timeout for Config
Download: 0 seconds
Config Download
via DHCP: disabled (next boot: disabled)
SW1#
HTH,
jerry
09-23-2009 11:36 PM
Thanks a million, this worked like a dream.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide